public abstract class RepositoryConnectorDelegateBase extends Object implements RepositoryConnectorDelegate
Spring Service base class for
com.communote.server.service.crc.RepositoryConnectorDelegate, provides access to all
services and entities referenced by this service.
RepositoryConnectorDelegate| Constructor and Description |
|---|
RepositoryConnectorDelegateBase() |
| 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.
|
protected ClientStatisticDao |
getClientStatisticDao()
Gets the reference to
clientStatistic's DAO. |
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() |
protected abstract String |
handleAddRepositoryConnector(RepositoryConnector connector) |
protected abstract void |
handleAssertRepositorySizeLimitNotReached(RepositoryConnector connector,
long sizeOfNewDataToStore) |
protected abstract void |
handleDeleteContent(ContentId contentId)
Performs the core logic for
deleteContent(com.communote.server.core.crc.vo.ContentId) |
protected abstract AttachmentTO |
handleGetContent(ContentId contentId)
Performs the core logic for
getContent(ContentId) |
protected abstract AttachmentTO |
handleGetContent(ExtendedContentId contentId)
Performs the core logic for
getContent(ExtendedContentId) |
protected abstract RepositoryConnector |
handleGetDefaultRepositoryConnector()
Performs the core logic for
#getDefaultRepository() |
protected abstract ContentMetadata |
handleGetMetadata(ContentId contentId)
Performs the core logic for
getMetadata(com.communote.server.core.crc.vo.ContentId) |
protected abstract RepositoryConnector |
handleGetRepositoryConnector(String connectorId)
Performs the core logic for
getRepositoryConnector(String) |
protected abstract Collection<RepositoryConnector> |
handleGetRepositoryConnectors() |
protected abstract void |
handleRemoveRepositoryConnector(RepositoryConnector connector) |
protected abstract void |
handleRemoveRepositoryConnector(String connectorId) |
protected abstract ContentId |
handleStoreContent(AttachmentTO contentTo)
Performs the core logic for
storeContent(com.communote.server.core.vo.content.AttachmentTO) |
void |
removeRepositoryConnector(RepositoryConnector connector) |
void |
removeRepositoryConnector(String connectorId) |
void |
setClientStatisticDao(ClientStatisticDao clientStatisticDao)
Sets the reference to
clientStatistic's DAO. |
ContentId |
storeContent(AttachmentTO contentTo)
Stores the given ContentTO and returns a ContentId for it.
|
public String addRepositoryConnector(RepositoryConnector connector)
RepositoryConnectorDelegateaddRepositoryConnector in interface RepositoryConnectorDelegateconnector - the connectorpublic void assertRepositorySizeLimitNotReached(RepositoryConnector connector, long sizeOfNewDataToStore) throws ResourceSizeLimitReachedException
RepositoryConnectorDelegateResourceSizeLimitReachedException is thrownassertRepositorySizeLimitNotReached in interface RepositoryConnectorDelegatesizeOfNewDataToStore - size of new data fileResourceSizeLimitReachedExceptionpublic void deleteContent(ContentId contentId) throws ContentRepositoryException
RepositoryConnectorDelegateDeletes the content with the given ContentId.
deleteContent in interface RepositoryConnectorDelegateContentRepositoryExceptionRepositoryConnectorDelegate.deleteContent(com.communote.server.core.crc.vo.ContentId)protected ClientStatisticDao getClientStatisticDao()
clientStatistic's DAO.public AttachmentTO getContent(ContentId contentId) throws ContentRepositoryException
RepositoryConnectorDelegateReturns a ContentTO that is associated to the given ContentId.
getContent in interface RepositoryConnectorDelegateContentRepositoryExceptionRepositoryConnectorDelegate.getContent(com.communote.server.core.crc.vo.ContentId)public AttachmentTO getContent(ExtendedContentId contentId) throws ContentRepositoryException
RepositoryConnectorDelegateReturns a ContentTO that is associated to the given ContentId.
getContent in interface RepositoryConnectorDelegateContentRepositoryExceptionRepositoryConnectorDelegate.getContent(ExtendedContentId)public RepositoryConnector getDefaultRepositoryConnector() throws RepositoryConnectorNotFoundException
RepositoryConnectorDelegateReturns the default repository
getDefaultRepositoryConnector in interface RepositoryConnectorDelegateRepositoryConnectorNotFoundExceptionpublic ContentMetadata getMetadata(ContentId contentId) throws RepositoryConnectorNotFoundException
RepositoryConnectorDelegateReturns the ContentMetadata that is associated to the given ContentId.
getMetadata in interface RepositoryConnectorDelegateRepositoryConnectorNotFoundExceptionRepositoryConnectorDelegate.getMetadata(com.communote.server.core.crc.vo.ContentId)public RepositoryConnector getRepositoryConnector(String connectorId) throws RepositoryConnectorNotFoundException
RepositoryConnectorDelegateReturns the RepositoryConnector that belongs to the given connectorId.
getRepositoryConnector in interface RepositoryConnectorDelegateRepositoryConnectorNotFoundExceptionRepositoryConnectorDelegate.getRepositoryConnector(String)public Collection<RepositoryConnector> getRepositoryConnectors() throws RepositoryConnectorNotFoundException
getRepositoryConnectors in interface RepositoryConnectorDelegateRepositoryConnectorNotFoundExceptionRepositoryConnectorDelegate.getRepositoryConnectors()protected abstract String handleAddRepositoryConnector(RepositoryConnector connector)
protected abstract void handleAssertRepositorySizeLimitNotReached(RepositoryConnector connector, long sizeOfNewDataToStore) throws ResourceSizeLimitReachedException
protected abstract void handleDeleteContent(ContentId contentId) throws ContentRepositoryException
deleteContent(com.communote.server.core.crc.vo.ContentId)ContentRepositoryExceptionprotected abstract AttachmentTO handleGetContent(ContentId contentId) throws ContentRepositoryException
getContent(ContentId)ContentRepositoryExceptionprotected abstract AttachmentTO handleGetContent(ExtendedContentId contentId) throws ContentRepositoryException
getContent(ExtendedContentId)ContentRepositoryExceptionprotected abstract RepositoryConnector handleGetDefaultRepositoryConnector() throws RepositoryConnectorNotFoundException
#getDefaultRepository()protected abstract ContentMetadata handleGetMetadata(ContentId contentId) throws RepositoryConnectorNotFoundException
getMetadata(com.communote.server.core.crc.vo.ContentId)protected abstract RepositoryConnector handleGetRepositoryConnector(String connectorId) throws RepositoryConnectorNotFoundException
getRepositoryConnector(String)protected abstract Collection<RepositoryConnector> handleGetRepositoryConnectors()
protected abstract void handleRemoveRepositoryConnector(RepositoryConnector connector)
protected abstract void handleRemoveRepositoryConnector(String connectorId)
protected abstract ContentId handleStoreContent(AttachmentTO contentTo) throws ContentRepositoryException, ResourceSizeLimitReachedException
storeContent(com.communote.server.core.vo.content.AttachmentTO)public void removeRepositoryConnector(RepositoryConnector connector)
removeRepositoryConnector in interface RepositoryConnectorDelegatepublic void removeRepositoryConnector(String connectorId)
removeRepositoryConnector in interface RepositoryConnectorDelegatepublic void setClientStatisticDao(ClientStatisticDao clientStatisticDao)
clientStatistic's DAO.public ContentId storeContent(AttachmentTO contentTo) throws ContentRepositoryException, ResourceSizeLimitReachedException
RepositoryConnectorDelegateStores the given ContentTO and returns a ContentId for it.
storeContent in interface RepositoryConnectorDelegateContentRepositoryExceptionResourceSizeLimitReachedExceptionRepositoryConnectorDelegate.storeContent(com.communote.server.core.vo.content.AttachmentTO)Copyright © 2019 Communote team. All rights reserved.