public interface RepositoryConnectorDelegate
This is the main class of the Content Repository Connector. It provides all necessary functions needed for the storing and managing of contents and managing the RepositoryConnectors.
| Modifier and Type | Method and Description |
|---|---|
String |
addRepositoryConnector(RepositoryConnector connector)
Adds the connector, if a connector with the same connector id already exists it will be
replaced
|
void |
assertRepositorySizeLimitNotReached(RepositoryConnector connector,
long sizeOfNewDataToStore)
Check the size of the content repository if the new data can be added, e.g.
|
void |
deleteContent(ContentId contentId)
Deletes the content with the given ContentId.
|
AttachmentTO |
getContent(ContentId contentId)
Returns a ContentTO that is associated to the given ContentId.
|
AttachmentTO |
getContent(ExtendedContentId contentId)
Returns a ContentTO that is associated to the given ContentId.
|
RepositoryConnector |
getDefaultRepositoryConnector()
Returns the default repository
|
ContentMetadata |
getMetadata(ContentId contentId)
Returns the ContentMetadata that is associated to the given ContentId.
|
RepositoryConnector |
getRepositoryConnector(String connectorId)
Returns the RepositoryConnector that belongs to the given connectorId.
|
Collection<RepositoryConnector> |
getRepositoryConnectors() |
void |
removeRepositoryConnector(RepositoryConnector connector) |
void |
removeRepositoryConnector(String connectorId) |
ContentId |
storeContent(AttachmentTO contentTo)
Stores the given ContentTO and returns a ContentId for it.
|
String addRepositoryConnector(RepositoryConnector connector)
connector - the connectorvoid assertRepositorySizeLimitNotReached(RepositoryConnector connector, long sizeOfNewDataToStore) throws ResourceSizeLimitReachedException
ResourceSizeLimitReachedException is thrownconnector - sizeOfNewDataToStore - size of new data fileResourceSizeLimitReachedExceptionvoid deleteContent(ContentId contentId) throws ContentRepositoryException
Deletes the content with the given ContentId.
ContentRepositoryExceptionAttachmentTO getContent(ContentId contentId) throws ContentRepositoryException
Returns a ContentTO that is associated to the given ContentId.
ContentRepositoryExceptionAttachmentTO getContent(ExtendedContentId contentId) throws ContentRepositoryException
Returns a ContentTO that is associated to the given ContentId.
ContentRepositoryExceptionRepositoryConnector getDefaultRepositoryConnector() throws RepositoryConnectorNotFoundException
Returns the default repository
RepositoryConnectorNotFoundExceptionContentMetadata getMetadata(ContentId contentId) throws RepositoryConnectorNotFoundException
Returns the ContentMetadata that is associated to the given ContentId.
RepositoryConnector getRepositoryConnector(String connectorId) throws RepositoryConnectorNotFoundException
Returns the RepositoryConnector that belongs to the given connectorId.
Collection<RepositoryConnector> getRepositoryConnectors() throws RepositoryConnectorNotFoundException
void removeRepositoryConnector(RepositoryConnector connector)
void removeRepositoryConnector(String connectorId)
ContentId storeContent(AttachmentTO contentTo) throws ContentRepositoryException, ResourceSizeLimitReachedException
Stores the given ContentTO and returns a ContentId for it.
Copyright © 2019 Communote team. All rights reserved.