org.sakaiproject.component.legacy.content
Interface BaseContentService.Storage

All Known Implementing Classes:
DbContentService.DbStorage
Enclosing interface:
BaseContentService

protected static interface BaseContentService.Storage

Storage implementation


Method Summary
 void cancelCollection(ContentCollectionEdit edit)
          Cancel a collection edit.
 void cancelResource(ContentResourceEdit edit)
          Cancel a resource edit.
 boolean checkCollection(String id)
          Return true if the identified collection exists.
 boolean checkResource(String id)
          Return true if the identified resource exists.
 void close()
          Close.
 void commitCollection(ContentCollectionEdit edit)
          Commit a collection edit.
 void commitDeleteResource(ContentResourceEdit edit, String uuid)
           
 void commitResource(ContentResourceEdit edit)
          Commit a resource edit.
 ContentCollectionEdit editCollection(String collectionId)
          Get a collection locked for update
 ContentResourceEdit editResource(String resourceId)
          Get a resource locked for update
 ContentCollection getCollection(String id)
          Return the identified collection, or null if not found.
 List getCollections(ContentCollection collection)
          Get a list of all getCollections within a collection.
 List getFlatResources(String collectionId)
           
 ContentResource getResource(String id)
          Return the identified resource, or null if not found.
 byte[] getResourceBody(ContentResource resource)
          Read the resource's body.
 List getResources(ContentCollection collection)
          Get a list of all resources within a collection.
 void open()
          Open and be ready to read / write.
 ContentCollectionEdit putCollection(String collectionId)
          Keep a new collection.
 ContentResourceEdit putDeleteResource(String resourceId, String uuid, String userId)
           
 ContentResourceEdit putResource(String resourceId)
          Keep a new resource.
 void removeCollection(ContentCollectionEdit collection)
          Forget about a collection.
 void removeResource(ContentResourceEdit resource)
          Forget about a resource.
 InputStream streamResourceBody(ContentResource resource)
          Stream the resource's body.
 

Method Detail

open

public void open()
Open and be ready to read / write.


close

public void close()
Close.


getCollection

public ContentCollection getCollection(String id)
Return the identified collection, or null if not found.


checkCollection

public boolean checkCollection(String id)
Return true if the identified collection exists.


getCollections

public List getCollections(ContentCollection collection)
Get a list of all getCollections within a collection.


putCollection

public ContentCollectionEdit putCollection(String collectionId)
Keep a new collection.


editCollection

public ContentCollectionEdit editCollection(String collectionId)
Get a collection locked for update


commitCollection

public void commitCollection(ContentCollectionEdit edit)
Commit a collection edit.


cancelCollection

public void cancelCollection(ContentCollectionEdit edit)
Cancel a collection edit.


removeCollection

public void removeCollection(ContentCollectionEdit collection)
Forget about a collection.


getResource

public ContentResource getResource(String id)
Return the identified resource, or null if not found.


checkResource

public boolean checkResource(String id)
Return true if the identified resource exists.


getResources

public List getResources(ContentCollection collection)
Get a list of all resources within a collection.


getFlatResources

public List getFlatResources(String collectionId)

putResource

public ContentResourceEdit putResource(String resourceId)
Keep a new resource.


editResource

public ContentResourceEdit editResource(String resourceId)
Get a resource locked for update


commitResource

public void commitResource(ContentResourceEdit edit)
                    throws ServerOverloadException
Commit a resource edit.

Throws:
ServerOverloadException

cancelResource

public void cancelResource(ContentResourceEdit edit)
Cancel a resource edit.


removeResource

public void removeResource(ContentResourceEdit resource)
Forget about a resource.


getResourceBody

public byte[] getResourceBody(ContentResource resource)
                       throws ServerOverloadException
Read the resource's body.

Throws:
ServerOverloadException - if server is configured to save resource body in filesystem and an error occurs while trying to access the filesystem.

streamResourceBody

public InputStream streamResourceBody(ContentResource resource)
                               throws ServerOverloadException
Stream the resource's body.

Throws:
ServerOverloadException - if server is configured to save resource body in filesystem and an error occurs while trying to access the filesystem.

commitDeleteResource

public void commitDeleteResource(ContentResourceEdit edit,
                                 String uuid)

putDeleteResource

public ContentResourceEdit putDeleteResource(String resourceId,
                                             String uuid,
                                             String userId)