public interface RepositoryConnector extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
clearContent()
Remove all content from the repository of this connector.
|
void |
deleteContent(ContentId contentId)
Delete the content with the given ContentId.
|
RepositoryConnectorConfiguration |
getConfiguration() |
AttachmentTO |
getContent(ExtendedContentId contentId)
Returns a ContentTO that is associated with the given ContentId.
|
long |
getRepositorySize() |
long |
getRepositorySizeLimit() |
float |
getRepositorySizeLimitRatio()
Gets the ratio of the current repository size to the repository size limit.
|
float |
getRepositorySizeLimitRatio(long sizeOfNewDataToStore)
Gets the ratio of the current repository size plus sizeOfNewDataToStore to the repository
size limit.
|
void |
removeConnector()
Callback that is invoked if a connector is removed.
|
ContentId |
storeContent(AttachmentTO contentTo)
Store the given ContentTO and return a ContentId for it.
|
void clearContent() throws ContentRepositoryException
ContentRepositoryException
- in case deleting the content failedvoid deleteContent(ContentId contentId) throws ContentRepositoryException
contentId
- The ContentId for the content to delete.ContentRepositoryException
- in case deleting the content failedRepositoryConnectorConfiguration getConfiguration()
AttachmentTO getContent(ExtendedContentId contentId) throws ContentRepositoryException
contentId
- The ContentId for the ContentTO to be read.ContentRepositoryException
- in case reading the content failedlong getRepositorySize()
long getRepositorySizeLimit()
float getRepositorySizeLimitRatio()
float getRepositorySizeLimitRatio(long sizeOfNewDataToStore)
sizeOfNewDataToStore
- size of data in bytesvoid removeConnector() throws ContentRepositoryException
ContentRepositoryException
ContentId storeContent(AttachmentTO contentTo) throws ContentRepositoryException
content
- The ContentTO to store.ContentRepositoryException
- in case storing the content failedCopyright © 2019 Communote team. All rights reserved.