|
Implementations of this interface should be soley responsible for
providing persistence and retrieval of the content against a
content URL
.
Content URLs must consist of a prefix or protocol followed by an
implementation-specific identifier. For example, the content URL format
for file stores is store://year/month/day/hour/minute/GUID.bin
Where the store cannot handle a particular content URL request, the UnsupportedContentUrlException must be generated. This will allow various implementations to provide fallback code to other stores where possible.
Where a store cannot serve a particular request because the functionality
is just not available, the UnsupportedOperationException
should
be thrown. Once again, there may be fallback handling provided for these
situations.
Field Summary | ||
org.alfresco.repo.content.ContentContext |
NEW_CONTENT_CONTEXT An empty content context used to retrieve completely new content. |
|
PROTOCOL_DELIMITER The delimiter that must be found in all URLS, i.e :// |
Method Summary | ||
boolean |
delete(String contentUrl) Deletes the content at the given URL. |
|
boolean |
exists(String contentUrl) Check for the existence of content in the store. |
|
getReader(String contentUrl) Get the accessor with which to read from the content at the given URL. |
||
getRootLocation() Get the location where the store is rooted. |
||
long |
getSpaceFree() Calculates the remaning free space in the underlying store. |
|
long |
getSpaceTotal() Calculates the total storage space of the underlying store. |
|
void |
getUrls(org.alfresco.repo.content.ContentStore.ContentUrlHandler handler) Deprecated. in 5.0. The API is no longer used by Alfresco; efficient APIs can be provided by the implementations, if required |
|
void |
getUrls(Date createdAfter, Date createdBefore, org.alfresco.repo.content.ContentStore.ContentUrlHandler handler) Deprecated. in 5.0. The API is no longer used by Alfresco; efficient APIs can be provided by the implementations, if required |
|
getWriter(org.alfresco.repo.content.ContentContext context) Get an accessor with which to write content to a location within the store. |
||
boolean |
isContentUrlSupported(String contentUrl) Check if the content URL format is supported by the store. |
|
boolean |
isWriteSupported() Check if the store supports write requests. |
NOTE: For efficiency, some implementations may provide a guess.
Implementations should focus on calculating a size value quickly, rather than accurately.
NOTE: For efficiency, some implementations may provide a guess.
Implementations should focus on calculating a size value quickly, rather than accurately.
The implementation of this may be more efficient than first getting a reader to check for existence, although that check should also be performed.
The store will ensure that the new content URL will be valid for all subsequent read attempts.
By supplying a reader to existing content, the store implementation may enable random access. The store implementation can enable this by copying the existing content into the new location before supplying a writer onto the new content.
A delete cannot be forced since it is much better to have the file remain longer than desired rather than deleted prematurely.
|