public abstract class AbstractRoutingContentStore extends Object implements ContentStore
ContentContextNEW_CONTENT_CONTEXT, PROTOCOL_DELIMITER| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRoutingContentStore() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(String contentUrl)
This operation has to be performed on all the stores in order to maintain the
ContentStore.exists(String) contract. |
boolean |
exists(String contentUrl) |
protected abstract List<ContentStore> |
getAllStores() |
ContentReader |
getReader(String contentUrl) |
String |
getRootLocation() |
long |
getSpaceFree() |
long |
getSpaceTotal() |
ContentWriter |
getWriter(ContentContext context)
Selects a store for the given context and caches store that was used.
|
ContentWriter |
getWriter(ContentReader existingContentReader,
String newContentUrl) |
boolean |
isContentUrlSupported(String contentUrl) |
boolean |
isWriteSupported() |
protected abstract ContentStore |
selectWriteStore(ContentContext ctx)
Get a content store based on the context provided.
|
void |
setStoresCache(SimpleCache<Pair<String,String>,ContentStore> storesCache) |
public void setStoresCache(SimpleCache<Pair<String,String>,ContentStore> storesCache)
storesCache - cache of stores used to access URLsprotected abstract List<ContentStore> getAllStores()
protected abstract ContentStore selectWriteStore(ContentContext ctx)
ctx - the context to use to make the choicepublic boolean isContentUrlSupported(String contentUrl)
isContentUrlSupported in interface ContentStorepublic boolean isWriteSupported()
isWriteSupported in interface ContentStorepublic String getRootLocation()
getRootLocation in interface ContentStorepublic long getSpaceFree()
getSpaceFree in interface ContentStorepublic long getSpaceTotal()
getSpaceTotal in interface ContentStorepublic boolean exists(String contentUrl) throws ContentIOException
exists in interface ContentStoreContentIOExceptionselectReadStore(String)public ContentReader getReader(String contentUrl) throws ContentIOException
getReader in interface ContentStoreEmptyContentReader is returned.ContentIOExceptionpublic ContentWriter getWriter(ContentContext context) throws ContentIOException
getWriter in interface ContentStoreContentIOExceptionselectWriteStore(ContentContext)public ContentWriter getWriter(ContentReader existingContentReader, String newContentUrl) throws ContentIOException
ContentIOExceptionpublic boolean delete(String contentUrl) throws ContentIOException
ContentStore.exists(String) contract.delete in interface ContentStoreContentIOExceptionCopyright © 2005–2020 Alfresco Software. All rights reserved.