Package org.drools.repository

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


        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

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

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

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

                 * p.updateState(stateExtension.getSimpleExtension
                 * (Translator.STATE)); }
                 */
            }

            p.checkin("Updated from ATOM.");
            rulesRepository.save();
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

            ModuleItem item = rulesRepository.loadModule(packageName);
            item.checkout();
            item.updateDescription(p.getDescription());
            item.updateTitle(p.getTitle());
            /* TODO: add more updates to package item from JSON */
            item.checkin(p.getCheckInComment());
            rulesRepository.save();
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
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.