|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.content.AbstractRoutingContentStore
public abstract class AbstractRoutingContentStore
A store providing support for content store implementations that provide routing of content read and write requests based on context.
ContentContext| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.alfresco.repo.content.ContentStore |
|---|
ContentStore.ContentUrlHandler |
| Field Summary |
|---|
| Fields inherited from interface org.alfresco.repo.content.ContentStore |
|---|
NEW_CONTENT_CONTEXT, PROTOCOL_DELIMITER |
| Constructor Summary | |
|---|---|
protected |
AbstractRoutingContentStore()
|
| Method Summary | |
|---|---|
boolean |
delete(java.lang.String contentUrl)
This operation has to be performed on all the stores in order to maintain the ContentStore.exists(String) contract. |
boolean |
exists(java.lang.String contentUrl)
Check for the existence of content in the store. |
protected abstract java.util.List |
getAllStores()
|
org.alfresco.service.cmr.repository.ContentReader |
getReader(java.lang.String contentUrl)
Get the accessor with which to read from the content at the given URL. |
java.lang.String |
getRootLocation()
Get the location where the store is rooted. |
long |
getSpaceFree()
Calcualates the remaing free space in the underlying store. |
long |
getSpaceTotal()
Calculates the total storage space of the underlying store. |
long |
getSpaceUsed()
Calculates the total size of stored content, excluding any other data in the underlying storage. |
long |
getTotalSize()
Uses AbstractRoutingContentStore.getSpaceUsed(), which is the equivalent method. |
void |
getUrls(ContentStore.ContentUrlHandler handler)
Get all URLs for the store, regardless of creation time. |
void |
getUrls(java.util.Date createdAfter,
java.util.Date createdBefore,
ContentStore.ContentUrlHandler handler)
Passes the call to each of the stores wrapped by this store |
org.alfresco.service.cmr.repository.ContentWriter |
getWriter(ContentContext context)
Selects a store for the given context and caches store that was used. |
org.alfresco.service.cmr.repository.ContentWriter |
getWriter(org.alfresco.service.cmr.repository.ContentReader existingContentReader,
java.lang.String newContentUrl)
Shortcut method to ContentStore.getWriter(ContentContext). |
boolean |
isContentUrlSupported(java.lang.String contentUrl)
Check if the content URL format is supported by the store. |
boolean |
isWriteSupported()
Check if the store supports write requests. |
protected abstract ContentStore |
selectWriteStore(ContentContext ctx)
Get a content store based on the context provided. |
void |
setStoresCache(org.alfresco.repo.cache.SimpleCache storesCache)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractRoutingContentStore()
| Method Detail |
|---|
public void setStoresCache(org.alfresco.repo.cache.SimpleCache storesCache)
storesCache - cache of stores used to access URLsprotected abstract java.util.List getAllStores()
protected abstract ContentStore selectWriteStore(ContentContext ctx)
ctx - the context to use to make the choice
public boolean isContentUrlSupported(java.lang.String contentUrl)
ContentStore
isContentUrlSupported in interface ContentStorecontentUrl - the content URL to check
public boolean isWriteSupported()
ContentStore
isWriteSupported in interface ContentStorepublic java.lang.String getRootLocation()
ContentStore
getRootLocation in interface ContentStorepublic final long getTotalSize()
AbstractRoutingContentStore.getSpaceUsed(), which is the equivalent method. This method is now
final in order to catch any implementations that should switch over to AbstractRoutingContentStore.getSpaceUsed().
getTotalSize in interface ContentStoreContentStore.getSpaceFree(),
ContentStore.getSpaceTotal()public long getSpaceUsed()
ContentStore
getSpaceUsed in interface ContentStorepublic long getSpaceFree()
ContentStoreNOTE: For efficiency, some implementations may provide a guess.
Implementations should focus on calculating a size value quickly, rather than accurately.
getSpaceFree in interface ContentStorepublic long getSpaceTotal()
ContentStoreNOTE: For efficiency, some implementations may provide a guess.
Implementations should focus on calculating a size value quickly, rather than accurately.
getSpaceTotal in interface ContentStore
public boolean exists(java.lang.String contentUrl)
throws org.alfresco.service.cmr.repository.ContentIOException
ContentStore
The implementation of this may be more efficient than first getting a
reader to check for existence, although
that check should also be performed.
exists in interface ContentStorecontentUrl - the path to the content
org.alfresco.service.cmr.repository.ContentIOException - if an IO error occursAbstractRoutingContentStore.selectReadStore(String)
public org.alfresco.service.cmr.repository.ContentReader getReader(java.lang.String contentUrl)
throws org.alfresco.service.cmr.repository.ContentIOException
ContentStore
getReader in interface ContentStorecontentUrl - the path to where the content is located
EmptyContentReader is returned.
org.alfresco.service.cmr.repository.ContentIOException - if an IO error occursContentStore.exists(String),
ContentReader.exists(),
EmptyContentReader
public org.alfresco.service.cmr.repository.ContentWriter getWriter(ContentContext context)
throws org.alfresco.service.cmr.repository.ContentIOException
getWriter in interface ContentStorecontext - the context of content.
org.alfresco.service.cmr.repository.ContentIOException - if an IO error occursAbstractRoutingContentStore.selectWriteStore(ContentContext)
public org.alfresco.service.cmr.repository.ContentWriter getWriter(org.alfresco.service.cmr.repository.ContentReader existingContentReader,
java.lang.String newContentUrl)
throws org.alfresco.service.cmr.repository.ContentIOException
ContentStoreContentStore.getWriter(ContentContext).
getWriter in interface ContentStoreorg.alfresco.service.cmr.repository.ContentIOExceptionContentStore.getWriter(ContentContext)
public void getUrls(ContentStore.ContentUrlHandler handler)
throws org.alfresco.service.cmr.repository.ContentIOException
ContentStore
getUrls in interface ContentStoreorg.alfresco.service.cmr.repository.ContentIOException - if an IO error occursContentStore.getUrls(Date, Date, ContentUrlHandler)
public void getUrls(java.util.Date createdAfter,
java.util.Date createdBefore,
ContentStore.ContentUrlHandler handler)
throws org.alfresco.service.cmr.repository.ContentIOException
getUrls in interface ContentStorecreatedAfter - all URLs returned must have been created after this date. May be null.createdBefore - all URLs returned must have been created before this date. May be null.handler - the callback that will passed each URL
org.alfresco.service.cmr.repository.ContentIOException - if an error occursContentStore.getUrls(Date, Date, ContentUrlHandler)
public boolean delete(java.lang.String contentUrl)
throws org.alfresco.service.cmr.repository.ContentIOException
ContentStore.exists(String) contract.
delete in interface ContentStorecontentUrl - the URL of the content to delete
org.alfresco.service.cmr.repository.ContentIOException - if an error occurs
if an IO error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||