Examples of loadPackageSnapshot()


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

        } else if ( path[0].equals( "snapshots" ) && checkPackagePermission( path[1],
                                                                             RoleTypes.PACKAGE_READONLY ) ) {
            String pkg = path[1];
            String snap = path[2];
            String asset = AssetItem.getAssetNameFromFileName( path[3] )[0];
            AssetItem assetItem = repository.loadPackageSnapshot( pkg,
                                                                  snap ).loadAsset( asset );
            return getAssetData( assetItem );

        } else {
            throw new UnsupportedOperationException();
View Full Code Here

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

                PackageItem pkg = repo.loadPackage( path[1] );
                AssetItem asset = pkg.loadAsset( AssetItem.getAssetNameFromFileName( path[2] )[0] );
                return asset.getContentLength();
            } else if ( path.length == 4 && path[0].equals( "snapshots" ) && checkPackagePermission( path[1],
                                                                                                     RoleTypes.PACKAGE_READONLY ) ) {
                PackageItem pkg = repo.loadPackageSnapshot( path[1],
                                                            path[2] );
                AssetItem asset = pkg.loadAsset( AssetItem.getAssetNameFromFileName( path[3] )[0] );
                return asset.getContentLength();
            } else {
                return 0;
View Full Code Here

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

                    return osxDoubleData.containsKey( uri );
                }
                return pkg.containsAsset( AssetItem.getAssetNameFromFileName( path[2] )[0] );
            } else {
                if ( path.length == 4 ) {
                    PackageItem pkg = repository.loadPackageSnapshot( path[1],
                                                                      path[2] );
                    return pkg.containsAsset( AssetItem.getAssetNameFromFileName( path[3] )[0] );
                } else {
                    return false;
                }
View Full Code Here

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

                    return repository.containsPackage( path[1] );
                } else if ( path.length == 3 ) {
                    return repository.containsSnapshot( path[1],
                                                        path[2] );
                } else if ( path.length == 4 ) {
                    PackageItem pkg = repository.loadPackageSnapshot( path[1],
                                                                      path[2] );
                    return pkg.containsAsset( AssetItem.getAssetNameFromFileName( path[3] )[0] );
                } else {
                    return false;
                }
View Full Code Here

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

        repositoryPackageService.createPackageSnapshot( "testSnapshotRebuild",
                                                        "SNAP",
                                                        false,
                                                        "" );

        PackageItem snap = repo.loadPackageSnapshot( "testSnapshotRebuild",
                                                     "SNAP" );
        long snapTime = snap.getLastModified().getTimeInMillis();

        Thread.sleep( 100 );
View Full Code Here

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

        Thread.sleep( 100 );

        repositoryPackageService.rebuildSnapshots();

        PackageItem snap_ = repo.loadPackageSnapshot( "testSnapshotRebuild",
                                                      "SNAP" );
        long newTime = snap_.getLastModified().getTimeInMillis();

        assertTrue( newTime > snapTime );
View Full Code Here

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

                      result.getLines().get( 0 ).getAssetFormat() );
        assertNotNull( result.getLines().get( 0 ).getMessage() );
        assertEquals( rule1.getUUID(),
                      result.getLines().get( 0 ).getUuid() );

        pkg = repo.loadPackageSnapshot( "testBinaryPackageCompile",
                                        "SNAP1" );
        result = repositoryPackageService.buildPackage( pkg.getUUID(),
                                                        true );
        assertFalse( result.hasLines() );
View Full Code Here

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

                      result.getLines().get( 0 ).getAssetFormat() );
        assertNotNull( result.getLines().get( 0 ).getMessage() );
        assertEquals( rule2.getUUID(),
                      result.getLines().get( 0 ).getUuid() );

        pkg = repo.loadPackageSnapshot( "testBinaryPackageCompileBRL",
                                        "SNAP1" );
        result = repositoryPackageService.buildPackage( pkg.getUUID(),
                                                        true );
        assertFalse( result.hasLines() );
View Full Code Here

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

    assertTrue(pkg.containsAsset("drools"));
    AssetItem as = pkg.loadAsset("drools");
    assertEquals("some header", as.getContent());


    pkg = repo.loadPackageSnapshot("testMigratePackage", "SNAP1");
    assertTrue(pkg.containsAsset("drools"));
    as = pkg.loadAsset("drools");
    assertEquals("some header", as.getContent());

    pkg = repo.loadPackageSnapshot("testMigratePackage", "SNAP2");
View Full Code Here

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

    pkg = repo.loadPackageSnapshot("testMigratePackage", "SNAP1");
    assertTrue(pkg.containsAsset("drools"));
    as = pkg.loadAsset("drools");
    assertEquals("some header", as.getContent());

    pkg = repo.loadPackageSnapshot("testMigratePackage", "SNAP2");
    assertTrue(pkg.containsAsset("drools"));
    as = pkg.loadAsset("drools");
    assertEquals("some header", as.getContent());
  }
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.