Package org.drools.repository

Examples of org.drools.repository.ModuleItem.checkin()


        assertEquals( pkg.getName(),
                      bin.getName() );
        assertTrue( bin.isValid() );

        pkg.updateDependency( "model?version=2" );
        pkg.checkin( "Update dependency" );

        PackageAssembler asm2 = new PackageAssembler();
        asm2.init(pkg, null);
        asm2.compile();
        assertFalse( asm2.getErrors().toString(),
View Full Code Here


                      "billasurf.jar" );

        ModuleItem pkg = rulesRepository.loadModule( "com.billasurf.manufacturing.plant" );
        DroolsHeader.updateDroolsHeader( "import com.billasurf.Board\nimport com.billasurf.Person" + "\n\nglobal com.billasurf.Person prs",
                                         pkg );
        pkg.checkin( "added imports" );

        SuggestionCompletionEngine eng = suggestionCompletionEngineService.loadSuggestionCompletionEngine( "com.billasurf.manufacturing.plant" );
        assertNotNull( eng );

        //The loader could define extra imports
View Full Code Here

        assertTrue(DroolsHeader.getDroolsHeader(pkg).indexOf("import com.billasurf.Board") > -1);
        assertTrue(DroolsHeader.getDroolsHeader(pkg).indexOf("import com.billasurf.Person") > -1);

        DroolsHeader.updateDroolsHeader("goo wee",
                pkg);
        pkg.checkin("");

        fileManagerService.attachFileToAsset(asset.getUUID(),
                this.getClass().getResourceAsStream("/billasurf.jar"),
                "billasurf.jar");
        pkg = rulesRepository.loadModule( "testAttachModelImports" );
View Full Code Here

        ModuleItem pkg = rulesRepository.createModule( "testGetBinaryPackageServlet",
                                              "" );
        DroolsHeader.updateDroolsHeader( "import java.util.List",
                                                  pkg );
        pkg.updateCompiledBinary( new ByteArrayInputStream( "foo".getBytes() ) );
        pkg.checkin( "" );

        assertTrue( before < fileManagerService.getLastModified( pkg.getName(),
                                                           "LATEST" ) );

        repositoryPackageService.createModuleSnapshot(pkg.getName(),
View Full Code Here

        ModuleItem pkg = rulesRepository.createModule( "testHeadOOME",
                                              "" );
        DroolsHeader.updateDroolsHeader( "import java.util.List",
                                                  pkg );
        pkg.updateCompiledBinary( new ByteArrayInputStream( "foo".getBytes() ) );
        pkg.checkin( "" );
        //rulesRepository.logout(); // Breaks lifecycle of test

        int iterations = 0;

        int maxIteration = 1; //pick a large number to do a stress test
View Full Code Here

            iterations++;

            if ( iterations % 50 == 0 ) {
                ModuleItem pkg1 = rulesRepository.loadModule("testHeadOOME");
                pkg1.updateDescription(System.currentTimeMillis() + "");
                pkg1.checkin("a change");
                //rulesRepository.logout(); // Breaks lifecycle of test
            }

            //fm.setRepository( new RulesRepository(TestEnvironmentSessionHelper.getSession()));
            fileManagerService.getLastModified("testHeadOOME",
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.