|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StorageProvider
A Storage Provider provides services which allow content to be stored in and retrieved from spaces.
Nested Class Summary | |
---|---|
static class |
StorageProvider.AccessType
|
Field Summary | |
---|---|
static long |
DEFAULT_MAX_RESULTS
|
static java.lang.String |
DEFAULT_MIMETYPE
|
static java.lang.String |
PROPERTIES_CONTENT_CHECKSUM
|
static java.lang.String |
PROPERTIES_CONTENT_MD5
|
static java.lang.String |
PROPERTIES_CONTENT_MIMETYPE
|
static java.lang.String |
PROPERTIES_CONTENT_MODIFIED
|
static java.lang.String |
PROPERTIES_CONTENT_SIZE
|
static java.lang.String |
PROPERTIES_COPY_SOURCE
|
static java.lang.String |
PROPERTIES_SPACE_ACCESS
|
static java.lang.String |
PROPERTIES_SPACE_COUNT
|
static java.lang.String |
PROPERTIES_SPACE_CREATED
|
static java.lang.String |
PROPERTIES_SPACE_SIZE
|
static java.text.DateFormat |
RFC822_DATE_FORMAT
|
static java.lang.String |
SPACE_PROPERTIES_SUFFIX
|
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. |
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. |
Field Detail |
---|
static final java.lang.String PROPERTIES_SPACE_CREATED
static final java.lang.String PROPERTIES_SPACE_COUNT
static final java.lang.String PROPERTIES_SPACE_SIZE
static final java.lang.String PROPERTIES_SPACE_ACCESS
static final java.lang.String PROPERTIES_CONTENT_MIMETYPE
static final java.lang.String PROPERTIES_CONTENT_SIZE
static final java.lang.String PROPERTIES_CONTENT_CHECKSUM
static final java.lang.String PROPERTIES_CONTENT_MODIFIED
static final java.lang.String PROPERTIES_COPY_SOURCE
static final java.lang.String PROPERTIES_CONTENT_MD5
static final java.lang.String SPACE_PROPERTIES_SUFFIX
static final java.lang.String DEFAULT_MIMETYPE
static final java.text.DateFormat RFC822_DATE_FORMAT
static final long DEFAULT_MAX_RESULTS
Method Detail |
---|
java.util.Iterator<java.lang.String> getSpaces()
java.util.Iterator<java.lang.String> getSpaceContents(java.lang.String spaceId, java.lang.String prefix)
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 occurjava.util.List<java.lang.String> getSpaceContentsChunked(java.lang.String spaceId, java.lang.String prefix, long maxResults, java.lang.String marker)
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 occurvoid createSpace(java.lang.String spaceId)
spaceId
- - ID of the space
StorageException
- if space with ID spaceId already existsvoid deleteSpace(java.lang.String spaceId)
spaceId
- - ID of the space
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurjava.util.Map<java.lang.String,java.lang.String> getSpaceProperties(java.lang.String spaceId)
spaceId
- - ID of the space
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurvoid setSpaceProperties(java.lang.String spaceId, java.util.Map<java.lang.String,java.lang.String> spaceProperties)
spaceId
- - ID of the spacespaceProperties
- - Updated space properties
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurStorageProvider.AccessType getSpaceAccess(java.lang.String spaceId)
spaceId
- - ID of the space
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurvoid setSpaceAccess(java.lang.String spaceId, StorageProvider.AccessType access)
spaceId
- - ID of the spaceaccess
- - New space access value
NotFoundException
- if space with ID spaceId does not exist
StorageException
- if errors occurjava.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)
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 occurjava.lang.String copyContent(java.lang.String sourceSpaceId, java.lang.String sourceContentId, java.lang.String destSpaceId, java.lang.String destContentId)
sourceSpaceId
- of content to copysourceContentId
- of content to copydestSpaceId
- where copied content will end updestContentId
- given to copied content
java.io.InputStream getContent(java.lang.String spaceId, java.lang.String contentId)
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 occurvoid deleteContent(java.lang.String spaceId, java.lang.String contentId)
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 occurvoid setContentProperties(java.lang.String spaceId, java.lang.String contentId, java.util.Map<java.lang.String,java.lang.String> contentProperties)
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 occurjava.util.Map<java.lang.String,java.lang.String> getContentProperties(java.lang.String spaceId, java.lang.String contentId)
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 occur
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |