Package org.drools.repository

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


        repo.save();
        assertFalse( pkg.isBinaryUpToDate() );

        //Create a history package with no compiled binary stored.
        pkg.checkout();
        pkg.checkin( "version1" );
        //Verify history package binary.
        ModuleItem p = repo.loadModule( "testGetHistoryPackageBinary",
                                        2 );
        assertEquals( "version1",
                      p.getCheckinComment() );
View Full Code Here


        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" );

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

        pkg.checkout();
        pkg.checkin( "package version 2" );

        //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    
View Full Code Here

        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" );

        //Verify the latest version
        ModuleItem item = rulesRepository.loadModule( "testDependencyHistoryPackage" );
        assertEquals( "package version 4",
                      item.getCheckinComment() );
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 = serviceImplementation.loadSuggestionCompletionEngine( "com.billasurf.manufacturing.plant" );
        assertNotNull( eng );

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

        ModuleItem item = rulesRepository.loadModule( "testCreateArchivedPackage" );
        TableDataResult td = repositoryAssetService.loadArchivedAssets( 0,
                                                                        1000 );

        item.archiveItem( true );
        item.checkin( "" );

        TableDataResult td2 = repositoryAssetService.loadArchivedAssets( 0,
                                                                         1000 );
        assertEquals( td2.data.length,
                      td.data.length );
View Full Code Here

        assertEquals( pkgs.length,
                      repositoryPackageService.listModules().length );

        item.archiveItem( false );
        item.checkin( "" );

        arch2 = repositoryPackageService.listArchivedModules();
        assertEquals( arch2.length,
                      arch.length );
    }
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

        assertNotNull( packageItem.getName() );
        packageItem.updateBinaryUpToDate( true );
        assertTrue( packageItem.isBinaryUpToDate() );

        //Need to commit change to Module for it to be visible to subsequent retrieval
        packageItem.checkin( "" );

        serviceImplementation.deleteUncheckedRule( assetItem.getUUID() );

        //Subsequent retrieval
        ModuleItem reloadedPackage = rulesRepository.loadModule( packageItem.getName() );
View Full Code Here

        repo.save();
        assertFalse( pkg.isBinaryUpToDate() );

        //Create a history package with no compiled binary stored.
        pkg.checkout();
        pkg.checkin( "version1" );
        //Verify history package binary.
        ModuleItem p = repo.loadModule( "testGetHistoryPackageBinary",
                                        2 );
        assertEquals( "version1",
                      p.getCheckinComment() );
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.