Examples of loadPackageSnapshot()


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()

                                                                    RoleTypes.PACKAGE_READONLY ) ) {
                String[] snaps = repository.listPackageSnapshots( path[1] );
                return snaps;
            } else if ( path.length == 3 && checkPackagePermission( path[1],
                                                                    RoleTypes.PACKAGE_READONLY ) ) {
                Iterator<AssetItem> it = repository.loadPackageSnapshot( path[1],
                                                                         path[2] ).getAssets();
                while ( it.hasNext() ) {
                    AssetItem asset = it.next();
                    if ( !asset.isArchived() ) {
                        result.add( asset.getName() + "." + asset.getFormat() );
View Full Code Here

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

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

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

                return new Date();
            } else if ( path.length == 3 ) {
                return repository.loadPackageSnapshot( path[1],
                                                       path[2] ).getCreatedDate().getTime();
            } else if ( path.length == 4 ) {
                PackageItem pkg = repository.loadPackageSnapshot( path[1],
                                                                  path[2] );
                AssetItem asset = pkg.loadAsset( AssetItem.getAssetNameFromFileName( path[3] )[0] );
                return asset.getCreatedDate().getTime();
            } else {
                throw new UnsupportedOperationException();
View Full Code Here

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

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

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

                return new Date();
            } else if ( path.length == 3 ) {
                return repository.loadPackageSnapshot( path[1],
                                                       path[2] ).getLastModified().getTime();
            } else if ( path.length == 4 ) {
                PackageItem pkg = repository.loadPackageSnapshot( path[1],
                                                                  path[2] );
                AssetItem asset = pkg.loadAsset( AssetItem.getAssetNameFromFileName( path[3] )[0] );
                return asset.getLastModified().getTime();
            } else {
                throw new UnsupportedOperationException();
View Full Code Here

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

                                           asset.getContentLength() );
            }
        } else if ( path[0].equals( "snapshots" ) && checkPackagePermission( path[1],
                                                                             RoleTypes.PACKAGE_READONLY ) ) {
            if ( path.length == 3 ) {
                PackageItem snapshot = repository.loadPackageSnapshot( path[1],
                                                                       path[2] );
                AssetItem asset;
                try {
                    asset = snapshot.loadAsset( AssetItem.getAssetNameFromFileName( path[2] )[0] );
                } catch ( Exception e ) {
View Full Code Here

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

                }
                return createStoredObject( uri,
                                           snapshot,
                                           asset.getContentLength() );
            } else if ( path.length == 4 ) {
                PackageItem pkg = repository.loadPackageSnapshot( path[1],
                                                                  path[2] );
                AssetItem asset;
                try {
                    asset = pkg.loadAsset( AssetItem.getAssetNameFromFileName( path[3] )[0] );
                } catch ( Exception e ) {
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.