|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.duracloud.storage.provider.BrokeredStorageProvider
public class BrokeredStorageProvider
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.duracloud.storage.provider.StorageProvider |
---|
StorageProvider.AccessType |
Field Summary |
---|
Fields inherited from interface org.duracloud.storage.provider.StorageProvider |
---|
DEFAULT_MAX_RESULTS, DEFAULT_MIMETYPE, PROPERTIES_CONTENT_CHECKSUM, PROPERTIES_CONTENT_MD5, PROPERTIES_CONTENT_MIMETYPE, PROPERTIES_CONTENT_MODIFIED, PROPERTIES_CONTENT_SIZE, PROPERTIES_COPY_SOURCE, PROPERTIES_SPACE_ACCESS, PROPERTIES_SPACE_COUNT, PROPERTIES_SPACE_CREATED, PROPERTIES_SPACE_SIZE, RFC822_DATE_FORMAT, SPACE_PROPERTIES_SUFFIX |
Constructor Summary | |
---|---|
BrokeredStorageProvider(StatelessStorageProvider dispatchProvider,
StorageProvider targetProvider,
StorageProviderType targetType,
java.lang.String storeId)
|
Method Summary | |
---|---|
java.lang.String |
addContent(java.lang.String spaceId,
java.lang.String contentId,
java.lang.String contentMimeType,
long contentSize,
java.lang.String contentChecksum,
java.io.InputStream content)
Adds content to a space. |
java.lang.String |
copyContent(java.lang.String sourceSpaceId,
java.lang.String sourceContentId,
java.lang.String destSpaceId,
java.lang.String destContentId)
This method copies the content item found in source-space with the id of source-content-id into the dest-space, naming it to dest-content-id. |
void |
createSpace(java.lang.String spaceId)
Creates a new space. |
void |
deleteContent(java.lang.String spaceId,
java.lang.String contentId)
Removes content from a space. |
void |
deleteSpace(java.lang.String spaceId)
Deletes a space. |
java.io.InputStream |
getContent(java.lang.String spaceId,
java.lang.String contentId)
Gets content from a space. |
java.util.Map<java.lang.String,java.lang.String> |
getContentProperties(java.lang.String spaceId,
java.lang.String contentId)
Retrieves the properties associated with content. |
StorageProvider.AccessType |
getSpaceAccess(java.lang.String spaceId)
Gets the access setting of the space, either OPEN or CLOSED. |
java.util.Iterator<java.lang.String> |
getSpaceContents(java.lang.String spaceId,
java.lang.String prefix)
Provides access to the content files within a space. |
java.util.List<java.lang.String> |
getSpaceContentsChunked(java.lang.String spaceId,
java.lang.String prefix,
long maxResults,
java.lang.String marker)
Provides a listing of the content files within a space. |
java.util.Map<java.lang.String,java.lang.String> |
getSpaceProperties(java.lang.String spaceId)
Retrieves the properties associated with a space. |
java.util.Iterator<java.lang.String> |
getSpaces()
Provides a listing of all spaces owned by a customer. |
StorageProviderType |
getTargetType()
|
void |
setContentProperties(java.lang.String spaceId,
java.lang.String contentId,
java.util.Map<java.lang.String,java.lang.String> contentProperties)
Sets the properties associated with content. |
void |
setSpaceAccess(java.lang.String spaceId,
StorageProvider.AccessType access)
Sets the accessibility of a space to either OPEN or CLOSED. |
void |
setSpaceProperties(java.lang.String spaceId,
java.util.Map<java.lang.String,java.lang.String> spaceProperties)
Sets the properties associated with a space. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BrokeredStorageProvider(StatelessStorageProvider dispatchProvider, StorageProvider targetProvider, StorageProviderType targetType, java.lang.String storeId)
Method Detail |
---|
public StorageProviderType getTargetType()
public java.lang.String addContent(java.lang.String spaceId, java.lang.String contentId, java.lang.String contentMimeType, long contentSize, java.lang.String contentChecksum, java.io.InputStream content) throws StorageException
StorageProvider
addContent
in interface StorageProvider
spaceId
- - ID of the spacecontentId
- - ID of the content in the spacecontentMimeType
- - the MIME type of the content being addedcontentSize
- - the file size (in bytes) of the content being addedcontentChecksum
- - the MD5 checksum of the content being added (null if no checksum is known)content
- - content to add
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurpublic java.lang.String copyContent(java.lang.String sourceSpaceId, java.lang.String sourceContentId, java.lang.String destSpaceId, java.lang.String destContentId)
StorageProvider
copyContent
in interface StorageProvider
sourceSpaceId
- of content to copysourceContentId
- of content to copydestSpaceId
- where copied content will end updestContentId
- given to copied content
public void createSpace(java.lang.String spaceId) throws StorageException
StorageProvider
createSpace
in interface StorageProvider
spaceId
- - ID of the space
StorageException
- if space with ID spaceId already existspublic void deleteContent(java.lang.String spaceId, java.lang.String contentId) throws StorageException
StorageProvider
deleteContent
in interface StorageProvider
spaceId
- - ID of the spacecontentId
- - ID of the content in the space
NotFoundException
- if space with ID spaceId does not exist or the
content item with ID contentId does not exist
StorageException
- if errors occurpublic void deleteSpace(java.lang.String spaceId) throws StorageException
StorageProvider
deleteSpace
in interface StorageProvider
spaceId
- - ID of the space
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurpublic java.io.InputStream getContent(java.lang.String spaceId, java.lang.String contentId) throws StorageException
StorageProvider
getContent
in interface StorageProvider
spaceId
- - ID of the spacecontentId
- - ID of the content in the space
NotFoundException
- if space with ID spaceId does not exist or the
content item with ID contentId does not exist
StorageException
- if errors occurpublic java.util.Map<java.lang.String,java.lang.String> getContentProperties(java.lang.String spaceId, java.lang.String contentId) throws StorageException
StorageProvider
getContentProperties
in interface StorageProvider
spaceId
- - ID of the spacecontentId
- - ID of the content in the space
NotFoundException
- if space with ID spaceId does not exist or the
content item with ID contentId does not exist
StorageException
- if errors occurpublic StorageProvider.AccessType getSpaceAccess(java.lang.String spaceId) throws StorageException
StorageProvider
getSpaceAccess
in interface StorageProvider
spaceId
- - ID of the space
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurpublic java.util.Iterator<java.lang.String> getSpaceContents(java.lang.String spaceId, java.lang.String prefix) throws StorageException
StorageProvider
getSpaceContents
in interface StorageProvider
spaceId
- - ID of the spaceprefix
- - The prefix of the content id (null for no constraints)
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurpublic java.util.List<java.lang.String> getSpaceContentsChunked(java.lang.String spaceId, java.lang.String prefix, long maxResults, java.lang.String marker) throws StorageException
StorageProvider
getSpaceContentsChunked
in interface StorageProvider
spaceId
- - ID of the spaceprefix
- - Only retrieve content IDs with this prefix (null for all content ids)maxResults
- - The maximum number of content IDs to return in the list (0 indicates default (1000))marker
- - The content ID marking the last item in the previous set (null indicates the first set of ids)
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurpublic java.util.Map<java.lang.String,java.lang.String> getSpaceProperties(java.lang.String spaceId) throws StorageException
StorageProvider
getSpaceProperties
in interface StorageProvider
spaceId
- - ID of the space
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurpublic java.util.Iterator<java.lang.String> getSpaces() throws StorageException
StorageProvider
getSpaces
in interface StorageProvider
StorageException
public void setContentProperties(java.lang.String spaceId, java.lang.String contentId, java.util.Map<java.lang.String,java.lang.String> contentProperties) throws StorageException
StorageProvider
setContentProperties
in interface StorageProvider
spaceId
- - ID of the spacecontentId
- - ID of the content in the spacecontentProperties
- - new content properties
NotFoundException
- if space with ID spaceId does not exist or the
content item with ID contentId does not exist
StorageException
- if errors occurpublic void setSpaceAccess(java.lang.String spaceId, StorageProvider.AccessType access) throws StorageException
StorageProvider
setSpaceAccess
in interface StorageProvider
spaceId
- - ID of the spaceaccess
- - New space access value
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurpublic void setSpaceProperties(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.String> spaceProperties) throws StorageException
StorageProvider
setSpaceProperties
in interface StorageProvider
spaceId
- - ID of the spacespaceProperties
- - Updated space properties
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occur
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |