Package org.drools.repository

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


    @Restrict("#{identity.loggedIn}")
    public void updateDependency(String uuid,
                                 String dependencyPath) {
        PackageItem item = getRulesRepository().loadPackageByUUID( uuid );
        item.updateDependency( dependencyPath );
        item.checkin( "Update dependency" );
    }

    public String[] getDependencies(String uuid) {
        PackageItem item = getRulesRepository().loadPackageByUUID( uuid );
        return item.getDependencies();
View Full Code Here


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

        // If package is archived, archive all the assets under it
        if ( data.isArchived() ) {
            handleArchivedForSavePackage( data,
                    item );
View Full Code Here

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

            existingPackage.checkin(checkinComment);
            repository.save();
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

            /* TODO: add more updates to package item from JSON */
            String checkInComment = "";
            if (newPackage.getCheckInComment() != null) {
                checkInComment = newPackage.getCheckInComment();
            }
            existingPackage.checkin(checkInComment);
            repository.save();
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
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.
        PackageItem p = repo.loadPackage( "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
        PackageItem item = impl.getRulesRepository().loadPackage( "testDependencyHistoryPackage" );
        assertEquals( "package version 4",
                      item.getCheckinComment() );
View Full Code Here

        assertTrue( drl.indexOf( "genre2" ) == -1 );
        assertTrue( drl.indexOf( "genre3" ) > -1 );

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

        ContentPackageAssembler asm2 = new ContentPackageAssembler( pkg );
        assertFalse( asm2.getErrors().toString(),
                     asm2.hasErrors() );
View Full Code Here

        pkg.updateDependency( "func?version=1" );
        pkg.updateDependency( "myDSL?version=1" );
        pkg.updateDependency( "rule1?version=1" );
        pkg.updateDependency( "rule2?version=1" );
        pkg.updateDependency( "model1?version=1" );
        pkg.checkin( "Update dependency" );

        ContentPackageAssembler asm = new ContentPackageAssembler( pkg,
                                                                   false );
        String drl = asm.getDRL();
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.