Examples of updateContent()


Examples of org.drools.repository.AssetItem.updateContent()

                AssetItem asset = pkg.addAsset( as.name,
                                                "<imported>" );
                asset.updateFormat( as.format );

                asset.updateContent( as.content );
                asset.updateExternalSource( "Imported from external DRL" );
                if ( newVer ) asset.checkin( "Imported change form external DRL" );

            }
        }
View Full Code Here

Examples of org.drools.repository.AssetItem.updateContent()

    @Test @InSequence(-1)
    public void startServers() throws Exception {
        ModuleItem pkgA = rulesRepository.createModule("applyChangeSetTwice",
                "this is package applyChangeSetTwice");
        AssetItem ruleA1 = pkgA.addAsset("ruleA1", "", null, AssetFormats.DRL);
        ruleA1.updateContent("rule 'ruleA1' when org.drools.Person() then end");
        ruleA1.checkin("version 1");
        AssetItem ruleA2 = pkgA.addAsset("ruleA2", "", null, AssetFormats.DRL);
        ruleA2.updateContent("rule 'ruleA2' when org.drools.Person() then end");
        ruleA2.checkin("version 1");
        repositoryPackageService.createModuleSnapshot(pkgA.getName(), "snapshotA1", false, "",false,"","","",false,"","",false,"");
View Full Code Here

Examples of org.drools.repository.AssetItem.updateContent()

                "this is package applyChangeSetTwice");
        AssetItem ruleA1 = pkgA.addAsset("ruleA1", "", null, AssetFormats.DRL);
        ruleA1.updateContent("rule 'ruleA1' when org.drools.Person() then end");
        ruleA1.checkin("version 1");
        AssetItem ruleA2 = pkgA.addAsset("ruleA2", "", null, AssetFormats.DRL);
        ruleA2.updateContent("rule 'ruleA2' when org.drools.Person() then end");
        ruleA2.checkin("version 1");
        repositoryPackageService.createModuleSnapshot(pkgA.getName(), "snapshotA1", false, "",false,"","","",false,"","",false,"");

        ModuleItem pkgB = rulesRepository.createModule("scanForChangeInRepository",
                "this is package scanForChangeInRepository");
View Full Code Here

Examples of org.drools.repository.AssetItem.updateContent()

        repositoryPackageService.createModuleSnapshot(pkgA.getName(), "snapshotA1", false, "",false,"","","",false,"","",false,"");

        ModuleItem pkgB = rulesRepository.createModule("scanForChangeInRepository",
                "this is package scanForChangeInRepository");
        AssetItem ruleB1 = pkgB.addAsset("ruleB1", "", null, AssetFormats.DRL);
        ruleB1.updateContent("rule 'ruleA1' when org.drools.Person() then end");
        ruleB1.checkin("version 1");
        AssetItem ruleB2 = pkgB.addAsset("ruleB2", "", null, AssetFormats.DRL);
        ruleB2.updateContent("rule 'ruleA2' when org.drools.Person() then end");
        ruleB2.checkin("version 1");
        repositoryPackageService.createModuleSnapshot(pkgB.getName(), "snapshotB1", false, "",false,"","","",false,"","",false,"");
View Full Code Here

Examples of org.drools.repository.AssetItem.updateContent()

                "this is package scanForChangeInRepository");
        AssetItem ruleB1 = pkgB.addAsset("ruleB1", "", null, AssetFormats.DRL);
        ruleB1.updateContent("rule 'ruleA1' when org.drools.Person() then end");
        ruleB1.checkin("version 1");
        AssetItem ruleB2 = pkgB.addAsset("ruleB2", "", null, AssetFormats.DRL);
        ruleB2.updateContent("rule 'ruleA2' when org.drools.Person() then end");
        ruleB2.checkin("version 1");
        repositoryPackageService.createModuleSnapshot(pkgB.getName(), "snapshotB1", false, "",false,"","","",false,"","",false,"");

        ModuleItem pkgC = rulesRepository.createModule("downloadPackageWithHttpClientImpl",
                "this is package scanForChangeInRepository");
View Full Code Here

Examples of org.drools.repository.AssetItem.updateContent()

        repositoryPackageService.createModuleSnapshot(pkgB.getName(), "snapshotB1", false, "",false,"","","",false,"","",false,"");

        ModuleItem pkgC = rulesRepository.createModule("downloadPackageWithHttpClientImpl",
                "this is package scanForChangeInRepository");
        AssetItem ruleC1 = pkgC.addAsset("ruleC1", "", null, AssetFormats.DRL);
        ruleC1.updateContent("rule 'ruleA1' when org.drools.Person() then end");
        ruleC1.checkin("version 1");
        repositoryPackageService.createModuleSnapshot(pkgC.getName(), "snapshotC1", false, "",false,"","","",false,"","",false,"");

        repositoryPackageService.rebuildPackages();
        repositoryPackageService.rebuildSnapshots();
View Full Code Here

Examples of org.drools.repository.AssetItem.updateContent()

        DroolsHeader.updateDroolsHeader( "import org.drools.Person",
                                          pkg );
        AssetItem rule1 = pkg.addAsset( "rule_1",
                                        "" );
        rule1.updateFormat( AssetFormats.DRL );
        rule1.updateContent( "rule 'rule1' \n when \np : Person() \n then \np.setAge(42); \n end" );
        rule1.checkin( "" );
        repo.save();
        assertFalse( pkg.isBinaryUpToDate() );

        //Create a history package with no compiled binary stored.
View Full Code Here

Examples of org.drools.repository.AssetItem.updateContent()

                                                       "" );

        AssetItem func = pkg.addAsset( "func",
                                       "" );
        func.updateFormat( AssetFormats.FUNCTION );
        func.updateContent( "function void foo() { System.out.println(version 1); }" );
        func.checkin( "func version 1" );
        func.updateContent( "function void foo() { System.out.println(version 2); }" );
        func.checkin( "func version 2" );

        //Package version 2    
View Full Code Here

Examples of org.drools.repository.AssetItem.updateContent()

        AssetItem func = pkg.addAsset( "func",
                                       "" );
        func.updateFormat( AssetFormats.FUNCTION );
        func.updateContent( "function void foo() { System.out.println(version 1); }" );
        func.checkin( "func version 1" );
        func.updateContent( "function void foo() { System.out.println(version 2); }" );
        func.checkin( "func version 2" );

        //Package version 2    
        pkg.checkout();
        pkg.checkin( "package version 2" );
View Full Code Here

Examples of org.drools.repository.AssetItem.updateContent()

        //calling updateDependency creates package version 3
        pkg.updateDependency( "func?version=1" );
        pkg.checkin( "package version 3" );

        func.updateContent( "function void foo() { System.out.println(version 2); }" );
        func.checkin( "func version 3" );

        //Package version 4    
        pkg.checkout();
        pkg.checkin( "package version 4" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.