Examples of loadPackage()


Examples of org.drools.repository.RulesRepository.loadPackage()

        BuilderResult results = repositoryPackageService.buildPackage( pkg.getUUID(),
                                                                       true );
        assertNull( results );

        pkg = repo.loadPackage( "testGuidedDTCompile" );
        byte[] binPackage = pkg.getCompiledPackageBytes();

        assertNotNull( binPackage );

        Package binPkg = (Package) DroolsStreamUtils.streamIn( binPackage );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadPackage()

       
        //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() );
        assertFalse( p.isBinaryUpToDate() );
        byte[] result = p.getCompiledPackageBytes();
        assertNull( result );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadPackage()

        //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() );
        assertFalse( p.isBinaryUpToDate() );
        byte[] result = p.getCompiledPackageBytes();
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadPackage()

        BuilderResult result = repositoryPackageService.buildPackage( pkg.getUUID(),
                                                                      true );
        assertFalse( result.hasLines() );

        pkg = repo.loadPackage( "testBinaryPackageCompile" );
        byte[] binPackage = pkg.getCompiledPackageBytes();

        assertNotNull( binPackage );

        Package binPkg = (Package) DroolsStreamUtils.streamIn( binPackage );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadPackage()

                System.err.println( result.getLines().get( i ).getMessage() );
            }
        }
        assertFalse( result.hasLines() );

        pkg = repo.loadPackage( "testBinaryPackageCompileBRL" );
        byte[] binPackage = pkg.getCompiledPackageBytes();

        // Here is where we write it out is needed... set to true if needed for
        // the binary test below "testLoadAndExecBinary"
        boolean saveBinPackage = false;
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadPackage()

        repo.save();
        pkg.checkin( "Version 2" );
        pkg.checkout();
        pkg.checkin( "Version 3" );

        PackageItem historicalPackage = repo.loadPackage( "testShowSourceForHistoricalPackage",
                                                          2 );

        ContentPackageAssembler asm = new ContentPackageAssembler( historicalPackage,
                                                                   false );
        String drl = asm.getDRL();
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadPackage()

        ruleNODSL.updateFormat( AssetFormats.BUSINESS_RULE );

        ruleNODSL.updateContent( BRXMLPersistence.getInstance().marshal( model ) );
        ruleNODSL.checkin( "" );

        pkg = repo.loadPackage( "testBRLWithDSLMixedIn" );
        ContentPackageAssembler asm = new ContentPackageAssembler( pkg );
        assertFalse( asm.hasErrors() );
        Package bpkg = asm.getBinaryPackage();
        assertEquals( 2,
                      bpkg.getRules().length );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadPackage()

        BuilderResult result = repositoryPackageService.buildPackage( pkg.getUUID(),
                                                                      true );
        assertNull( result );

        pkg = repo.loadPackage( "testBinaryPackageCompile" );
        byte[] binPackage = pkg.getCompiledPackageBytes();

        assertNotNull( binPackage );

        Package binPkg = (Package) DroolsStreamUtils.streamIn( binPackage );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadPackage()

                System.err.println( result.getLines().get( i ).getMessage() );
            }
        }
        assertNull( result );

        pkg = repo.loadPackage( "testBinaryPackageCompileBRL" );
        byte[] binPackage = pkg.getCompiledPackageBytes();

        // Here is where we write it out is needed... set to true if needed for
        // the binary test below "testLoadAndExecBinary"
        boolean saveBinPackage = false;
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadPackage()

        BuilderResult results = repositoryPackageService.buildPackage( pkg.getUUID(),
                                                                       true );
        assertNull( results );

        pkg = repo.loadPackage( "testBinaryPackageUpToDate" );
        byte[] binPackage = pkg.getCompiledPackageBytes();

        assertNotNull( binPackage );

        assertTrue( pkg.getNode().getProperty( "drools:binaryUpToDate" ).getBoolean() );
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.