org.outerj.daisy.repository.commonimpl
Interface CollectionStrategy


public interface CollectionStrategy


Method Summary
 void deleteCollection(long collectionId, AuthenticatedUser user)
          Removes the collection, identified by the specified identifier, from the Repository.
 DocumentCollectionImpl loadCollection(long collectionId, AuthenticatedUser user)
          Loads a DocumentCollection for a specified documentcollectionid.
 DocumentCollectionImpl loadCollectionByName(java.lang.String name, AuthenticatedUser user)
           
 java.util.Collection loadCollections(AuthenticatedUser user)
          Loads all the available collections in the repository.
 void store(DocumentCollectionImpl collection)
          Stores a collection.
 

Method Detail

store

public void store(DocumentCollectionImpl collection)
           throws org.outerj.daisy.repository.RepositoryException
Stores a collection.

Parameters:
collection - the collection to store
Throws:
org.outerj.daisy.repository.RepositoryException

loadCollection

public DocumentCollectionImpl loadCollection(long collectionId,
                                             AuthenticatedUser user)
                                      throws org.outerj.daisy.repository.RepositoryException
Loads a DocumentCollection for a specified documentcollectionid. A RepositoryException is thrown if no DocumentCollection could be found for the specified id.

Parameters:
collectionId -
user -
Returns:
the DocumentCollection for the specified id, if found
Throws:
org.outerj.daisy.repository.RepositoryException

loadCollectionByName

public DocumentCollectionImpl loadCollectionByName(java.lang.String name,
                                                   AuthenticatedUser user)
                                            throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

loadCollections

public java.util.Collection loadCollections(AuthenticatedUser user)
                                     throws org.outerj.daisy.repository.RepositoryException
Loads all the available collections in the repository.

Parameters:
user - the user requesting the DocumentCollections
Returns:
the available collections in the repository, null if no collections can be found.
Throws:
org.outerj.daisy.repository.RepositoryException

deleteCollection

public void deleteCollection(long collectionId,
                             AuthenticatedUser user)
                      throws org.outerj.daisy.repository.RepositoryException
Removes the collection, identified by the specified identifier, from the Repository.

Parameters:
collectionId - the collection id of the collection to remove
user - the user who wants to delete the collection
Throws:
org.outerj.daisy.repository.RepositoryException


Copyright © -2005 . All Rights Reserved.