public interface StorageProvider
ContentItem.CONTENT_SCHEME
This code is experimental. While this interface is functional and tested, it may change or be removed in a future version of the library.
| Modifier and Type | Method and Description |
|---|---|
void |
commit(StorageRequest id)
Commit will be called by the
CatalogFramework to finalize create, update,
and delete requests. |
CreateStorageResponse |
create(CreateStorageRequest createStorageRequest)
Creates an item in the content repository.
|
DeleteStorageResponse |
delete(DeleteStorageRequest deleteRequest)
Deletes a
ContentItem from the content repository. |
ReadStorageResponse |
read(ReadStorageRequest readRequest)
Retrieves a
ContentItem from the content repository. |
void |
rollback(StorageRequest id)
Rollback will be called by the
CatalogFramework to discard changes related
to create, update, and delete requests |
UpdateStorageResponse |
update(UpdateStorageRequest updateStorageRequest)
Updates a
ContentItem in the content repository. |
CreateStorageResponse create(CreateStorageRequest createStorageRequest) throws StorageException
createStorageRequest - the CreateStorageRequest that contains the ContentItem to be stored/created in the content repository. The
ID of the ContentItem will be auto-generated by the
StorageProvider.CreateStorageResponse that contains the ContentItem created by the StorageProvider in the content
repository. This ContentItem will contain the GUID
assigned by the StorageProvider. This GUID will be used in subsequent UpdateStorageRequest, ReadStorageRequest, and DeleteStorageRequest to
access the stored ContentItem.StorageException - if any problems encountered while creating/storing the ContentItemReadStorageResponse read(ReadStorageRequest readRequest) throws StorageException
ContentItem from the content repository.readRequest - the ReadStorageRequest that contains the GUID of the ContentItem to be retrievedReadStorageResponse that contains the ContentItem retrieved by the StorageProvider from the content
repository.StorageException - if any problems encountered while retrieving the ContentItemUpdateStorageResponse update(UpdateStorageRequest updateStorageRequest) throws StorageException
ContentItem in the content repository. The ContentItem must already exist in the content repository in order to
be updated. The StorageProvider will not automatically create the ContentItem if it does not exist.updateStorageRequest - the UpdateStorageRequest that contains the GUID of the
ContentItem to be updated and the InputStream with the new data to overwrite the existing ContentItem in the content repository.UpdateStorageResponse that contains the ContentItem updated by the StorageProvider in the content
repository.StorageException - if any problems encountered while updating the ContentItemDeleteStorageResponse delete(DeleteStorageRequest deleteRequest) throws StorageException
ContentItem from the content repository.deleteRequest - the DeleteStorageRequest that contains the GUID of the ContentItem to be deleted.DeleteStorageResponse that contains the status of the deletion of the
ContentItem from the content repository.StorageException - if any problems encountered while deleting the ContentItemvoid commit(StorageRequest id) throws StorageException
CatalogFramework to finalize create, update,
and delete requests.id - the id associated with the requestStorageExceptionvoid rollback(StorageRequest id) throws StorageException
CatalogFramework to discard changes related
to create, update, and delete requestsid - the id associated with the requestStorageExceptionThis work is licensed under a Creative Commons Attribution 4.0 International License.