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)
RepositoryConnectorDelegate
addRepositoryConnector
in interface RepositoryConnectorDelegate
connector
- the connectorpublic void assertRepositorySizeLimitNotReached(RepositoryConnector connector, long sizeOfNewDataToStore) throws ResourceSizeLimitReachedException
RepositoryConnectorDelegate
ResourceSizeLimitReachedException
is thrownassertRepositorySizeLimitNotReached
in interface RepositoryConnectorDelegate
sizeOfNewDataToStore
- size of new data fileResourceSizeLimitReachedException
public void deleteContent(ContentId contentId) throws ContentRepositoryException
RepositoryConnectorDelegate
Deletes the content with the given ContentId.
deleteContent
in interface RepositoryConnectorDelegate
ContentRepositoryException
RepositoryConnectorDelegate.deleteContent(com.communote.server.core.crc.vo.ContentId)
protected ClientStatisticDao getClientStatisticDao()
clientStatistic
's DAO.public AttachmentTO getContent(ContentId contentId) throws ContentRepositoryException
RepositoryConnectorDelegate
Returns a ContentTO that is associated to the given ContentId.
getContent
in interface RepositoryConnectorDelegate
ContentRepositoryException
RepositoryConnectorDelegate.getContent(com.communote.server.core.crc.vo.ContentId)
public AttachmentTO getContent(ExtendedContentId contentId) throws ContentRepositoryException
RepositoryConnectorDelegate
Returns a ContentTO that is associated to the given ContentId.
getContent
in interface RepositoryConnectorDelegate
ContentRepositoryException
RepositoryConnectorDelegate.getContent(ExtendedContentId)
public RepositoryConnector getDefaultRepositoryConnector() throws RepositoryConnectorNotFoundException
RepositoryConnectorDelegate
Returns the default repository
getDefaultRepositoryConnector
in interface RepositoryConnectorDelegate
RepositoryConnectorNotFoundException
public ContentMetadata getMetadata(ContentId contentId) throws RepositoryConnectorNotFoundException
RepositoryConnectorDelegate
Returns the ContentMetadata that is associated to the given ContentId.
getMetadata
in interface RepositoryConnectorDelegate
RepositoryConnectorNotFoundException
RepositoryConnectorDelegate.getMetadata(com.communote.server.core.crc.vo.ContentId)
public RepositoryConnector getRepositoryConnector(String connectorId) throws RepositoryConnectorNotFoundException
RepositoryConnectorDelegate
Returns the RepositoryConnector that belongs to the given connectorId.
getRepositoryConnector
in interface RepositoryConnectorDelegate
RepositoryConnectorNotFoundException
RepositoryConnectorDelegate.getRepositoryConnector(String)
public Collection<RepositoryConnector> getRepositoryConnectors() throws RepositoryConnectorNotFoundException
getRepositoryConnectors
in interface RepositoryConnectorDelegate
RepositoryConnectorNotFoundException
RepositoryConnectorDelegate.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)
ContentRepositoryException
protected abstract AttachmentTO handleGetContent(ContentId contentId) throws ContentRepositoryException
getContent(ContentId)
ContentRepositoryException
protected abstract AttachmentTO handleGetContent(ExtendedContentId contentId) throws ContentRepositoryException
getContent(ExtendedContentId)
ContentRepositoryException
protected 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 RepositoryConnectorDelegate
public void removeRepositoryConnector(String connectorId)
removeRepositoryConnector
in interface RepositoryConnectorDelegate
public void setClientStatisticDao(ClientStatisticDao clientStatisticDao)
clientStatistic
's DAO.public ContentId storeContent(AttachmentTO contentTo) throws ContentRepositoryException, ResourceSizeLimitReachedException
RepositoryConnectorDelegate
Stores the given ContentTO and returns a ContentId for it.
storeContent
in interface RepositoryConnectorDelegate
ContentRepositoryException
ResourceSizeLimitReachedException
RepositoryConnectorDelegate.storeContent(com.communote.server.core.vo.content.AttachmentTO)
Copyright © 2019 Communote team. All rights reserved.