Examples of loadPackage()


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

        imp.createResource( new TransactionMock(),
                            "fpp/bar/webdav/packages/testCreateResourceDAVFolder/._asset.drl" );
        imp.createResource( new TransactionMock(),
                            "fpp/bar/webdav/packages/.DS_Store" );

        PackageItem pkg = repo.loadPackage( "testCreateResourceDAVFolder" );
        assertFalse( pkg.containsAsset( "._asset" ) );
        assertTrue( pkg.containsAsset( "asset" ) );

        Iterator<AssetItem> it = pkg.getAssets();
        AssetItem ass = it.next();
View Full Code Here

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

        BuilderResult result = impl.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.lines[i].message );
            }
        }
        assertNull( result );

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

        // Here is where we write it out if needed... UNCOMMENT if needed for
        // the binary test
        // FileOutputStream out = new
View Full Code Here

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

        BuilderResult results = impl.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

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

        BuilderResult results = impl.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()

        fm.attachFileToAsset( asset.getUUID(),
                              this.getClass().getResourceAsStream( "/billasurf.jar" ),
                              "billasurf.jar" );

        pkg = repo.loadPackage( "testAttachModelImports" );

        assertFalse( pkg.isBinaryUpToDate() );
        assertNotNull( ServiceImplementation.getDroolsHeader( pkg ) );
        assertTrue( ServiceImplementation.getDroolsHeader( pkg ).indexOf( "import com.billasurf.Board" ) > -1 );
        assertTrue( ServiceImplementation.getDroolsHeader( pkg ).indexOf( "import com.billasurf.Person" ) > -1 );
View Full Code Here

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

        pkg.checkin( "" );

        fm.attachFileToAsset( asset.getUUID(),
                              this.getClass().getResourceAsStream( "/billasurf.jar" ),
                              "billasurf.jar" );
        pkg = repo.loadPackage( "testAttachModelImports" );
        assertEquals( "goo wee\nimport com.billasurf.Board\nimport com.billasurf.Person\n",
                      ServiceImplementation.getDroolsHeader( pkg ) );

    }
View Full Code Here

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

    }

    private void updatePackage(String nm) throws Exception {
        System.err.println( "---> Updating the package " );
        RulesRepository repo = new RulesRepository( session );
        PackageItem pkg = repo.loadPackage( nm );
        pkg.updateDescription( System.currentTimeMillis() + "" );
        pkg.checkin( "a change" );
        repo.logout();

    }
View Full Code Here

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

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

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

        assertNotNull( binPackage );

        assertTrue( pkg.getNode().getProperty( "drools:binaryUpToDate" ).getBoolean() );
View Full Code Here

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

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

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

        assertNotNull( binPackage );

        Package binPkg = (Package) DroolsStreamUtils.streamIn( binPackage );
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.