Package org.drools.repository

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


        moduleItem.updateBinaryUpToDate( false );
        if(!data.getFormat().equals("")) {
            moduleItem.updateFormat(data.getFormat());
        }
        RuleBaseCache.getInstance().remove( data.getUuid() );
        moduleItem.checkin( data.getDescription() );

        // If module is archived, archive all the assets under it
        if ( data.isArchived() ) {
            handleArchivedForSaveModule( data,
                    moduleItem );
View Full Code Here


    @LoggedIn
    public void updateDependency(String uuid,
                                 String dependencyPath) {
        ModuleItem item = rulesRepository.loadModuleByUUID( uuid );
        item.updateDependency( dependencyPath );
        item.checkin( "Update dependency" );
    }

    public String[] getDependencies(String uuid) {
        ModuleItem item = rulesRepository.loadModuleByUUID( uuid );
        return item.getDependencies();
View Full Code Here

        moduleItem.updateBinaryUpToDate( false );
        if(!data.getFormat().equals("")) {
            moduleItem.updateFormat(data.getFormat());
        }
        RuleBaseCache.getInstance().remove( data.getUuid() );
        moduleItem.checkin( data.getDescription() );

        // If module is archived, archive all the assets under it
        if ( data.isArchived() ) {
            handleArchivedForSaveModule( data,
                    moduleItem );
View Full Code Here

                //updating package header
                if (lastModified != null && pkg.getLastModified().after(lastModified)) {
                    throw new RulesRepositoryException("The package was modified by: " + pkg.getLastContributor() + ", unable to write changes.");
                }
                pkg.updateStringProperty(readContent(in), ModuleItem.HEADER_PROPERTY_NAME);
                pkg.checkin(comment);
                rulesRepository.save();
            } else {
                AssetItem as = pkg.loadAsset(a[0]);
                if (lastModified != null && as.getLastModified().after(lastModified)) {
                    throw new RulesRepositoryException("The asset was modified by: " + as.getLastContributor() + ", unable to write changes.");
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

        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

        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

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.