public class AggregatingContentStore extends AbstractContentStore
A content store implementation that aggregates a set of stores. Content is not
persisted by this store, but rather it relies on any number of
child stores
to provide access
to content readers and writers.
The order in which the stores appear in the list of stores participating is important. The first store in the list is known as the primary store.
Content is written to the primary store only. The other stores are only used to retrieve content and the primary store is not updated with the content.
CachingContentStore
contentLimitProvider
Constructor and Description |
---|
AggregatingContentStore()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
delete(String contentUrl)
Performs a delete on the local store and if outbound replication is on, propogates
the delete to the other stores too.
|
org.alfresco.service.cmr.repository.ContentReader |
getReader(String contentUrl)
Forwards the call directly to the first store in the list of stores.
|
String |
getRootLocation() |
org.alfresco.service.cmr.repository.ContentWriter |
getWriter(org.alfresco.repo.content.ContentContext ctx)
An implementation that does some sanity checking before requesting a writer from the
store.
|
boolean |
isContentUrlSupported(String contentUrl)
Override this method to supply a efficient and direct check of the URL supplied.
|
boolean |
isWriteSupported() |
void |
setPrimaryStore(org.alfresco.repo.content.ContentStore primaryStore)
Set the primary store that content will be replicated to or from
|
void |
setSecondaryStores(List<org.alfresco.repo.content.ContentStore> secondaryStores)
Set the secondary stores that this component will replicate to or from
|
exists, getContentUrlParts, getSpaceFree, getSpaceTotal, getWriterInternal, isValidContentUrl, setContentLimitProvider
public void setPrimaryStore(org.alfresco.repo.content.ContentStore primaryStore)
primaryStore
- the primary content storepublic void setSecondaryStores(List<org.alfresco.repo.content.ContentStore> secondaryStores)
secondaryStores
- a list of stores to replicate to or frompublic boolean isWriteSupported()
public boolean isContentUrlSupported(String contentUrl)
AbstractContentStore
ContentStore.getReader(String)
throws the UnsupportedContentUrlException
exception.isContentUrlSupported
in interface org.alfresco.repo.content.ContentStore
isContentUrlSupported
in class AbstractContentStore
public String getRootLocation()
getRootLocation
in interface org.alfresco.repo.content.ContentStore
getRootLocation
in class AbstractContentStore
public org.alfresco.service.cmr.repository.ContentReader getReader(String contentUrl) throws org.alfresco.service.cmr.repository.ContentIOException
org.alfresco.service.cmr.repository.ContentIOException
public org.alfresco.service.cmr.repository.ContentWriter getWriter(org.alfresco.repo.content.ContentContext ctx)
AbstractContentStore
AbstractContentStore.getWriterInternal(ContentReader, String)
must be supplied.getWriter
in interface org.alfresco.repo.content.ContentStore
getWriter
in class AbstractContentStore
AbstractContentStore.getWriterInternal(ContentReader, String)
public boolean delete(String contentUrl) throws org.alfresco.service.cmr.repository.ContentIOException
delete
in interface org.alfresco.repo.content.ContentStore
delete
in class AbstractContentStore
org.alfresco.service.cmr.repository.ContentIOException
Copyright © 2005–2017 Alfresco Software. All rights reserved.