Package org.drools.repository

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


        rule1.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",
View Full Code Here


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

        //calling updateDependency creates package version 3
        pkg.updateDependency( "func?version=1" );
        pkg.checkin( "package version 3" );
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",
View Full Code Here

    @Path("{packageName}")
    @Consumes(MediaType.APPLICATION_ATOM_XML)
    public void updatePackageFromAtom(@PathParam("packageName") String packageName, Entry entry) {
        try {
            ModuleItem p = rulesRepository.loadModule(packageName);
            p.checkout();
            // TODO: support rename package.
            // p.updateTitle(entry.getTitle());

            if (entry.getSummary() != null) {
                p.updateDescription(entry.getSummary());
View Full Code Here

    @Path("{packageName}")
    @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public void updatePackageFromJAXB(@PathParam("packageName") String packageName, Package p) {
        try {
            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();
View Full Code Here

        rule1.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",
View Full Code Here

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

        //calling updateDependency creates package version 3
        pkg.updateDependency( "func?version=1" );
        pkg.checkin( "package version 3" );
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",
View Full Code Here

        //impl.buildPackage(pkg.getUUID(), true);
        pkg.checkin( "version3" );
       
        ModuleItem pkg2 = rulesRepository.createModule( "restPackage2",
                "this is package restPackage2" );  
        pkg2.checkout();
        repositoryPackageService.buildPackage(pkg2.getUUID(), true);       
        pkg2.checkin("version2");
        pkg2.checkout();
        repositoryPackageService.buildPackage(pkg2.getUUID(), true);      
        pkg2.checkin("version3");
View Full Code Here

        ModuleItem pkg2 = rulesRepository.createModule( "restPackage2",
                "this is package restPackage2" );  
        pkg2.checkout();
        repositoryPackageService.buildPackage(pkg2.getUUID(), true);       
        pkg2.checkin("version2");
        pkg2.checkout();
        repositoryPackageService.buildPackage(pkg2.getUUID(), true);      
        pkg2.checkin("version3");

        ModuleItem pkg3 = rulesRepository.createModule( "restPackageCompilationFailure",
                "this is package restPackageCompilationFailure" );
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.