public Collection<StorageItem> list( ResourceStoreRequest request ) throws IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { if ( !checkConditions( request, Action.read ) ) { throw new ItemNotFoundException( request, this ); } Collection<StorageItem> items = null; if ( isBrowseable() ) { items = list( false, request ); } else { throw new ItemNotFoundException( request, this ); } return items; }
public Collection<StorageItem> list( boolean fromTask, ResourceStoreRequest request ) throws IllegalOperationException, ItemNotFoundException, StorageException { if ( getLogger().isDebugEnabled() ) { getLogger().debug( getId() + ".list() :: " + request.toString() ); } if ( !getLocalStatus().shouldServiceRequest() ) { throw new RepositoryNotAvailableException( this ); } request.addProcessedRepository( this ); StorageItem item = retrieveItem( fromTask, request ); if ( item instanceof StorageCollectionItem ) { return list( fromTask, (StorageCollectionItem) item ); } else { throw new ItemNotFoundException( request, this ); } }