public interface StorageProvider
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_MAX_RESULTS |
static String |
DEFAULT_MIMETYPE |
static DateFormat |
ISO8601_DATE_FORMAT |
static String |
PROPERTIES_CONTENT_CHECKSUM |
static String |
PROPERTIES_CONTENT_CREATOR |
static String |
PROPERTIES_CONTENT_FILE_CREATED |
static String |
PROPERTIES_CONTENT_FILE_LAST_ACCESSED |
static String |
PROPERTIES_CONTENT_FILE_MODIFIED |
static String |
PROPERTIES_CONTENT_FILE_PATH |
static String |
PROPERTIES_CONTENT_MD5 |
static String |
PROPERTIES_CONTENT_MIMETYPE |
static String |
PROPERTIES_CONTENT_MODIFIED |
static String |
PROPERTIES_CONTENT_SIZE |
static String |
PROPERTIES_COPY_SOURCE |
static String |
PROPERTIES_COPY_SOURCE_STORE |
static String |
PROPERTIES_SPACE_ACL |
static String |
PROPERTIES_SPACE_ACL_GROUP |
static String |
PROPERTIES_SPACE_ACL_PUBLIC |
static String |
PROPERTIES_SPACE_COUNT |
static String |
PROPERTIES_SPACE_CREATED |
static String |
PROPERTIES_SPACE_SIZE |
static String |
PROPERTIES_STREAMING_HOST |
Modifier and Type | Method and Description |
---|---|
String |
addContent(String spaceId,
String contentId,
String contentMimeType,
Map<String,String> userProperties,
long contentSize,
String contentChecksum,
InputStream content)
Adds content to a space.
|
String |
copyContent(String sourceSpaceId,
String sourceContentId,
String destSpaceId,
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(String spaceId)
Creates a new space.
|
void |
deleteContent(String spaceId,
String contentId)
Removes content from a space.
|
void |
deleteSpace(String spaceId)
Deletes a space.
|
InputStream |
getContent(String spaceId,
String contentId)
Gets content from a space.
|
Map<String,String> |
getContentProperties(String spaceId,
String contentId)
Retrieves the properties associated with content.
|
Map<String,AclType> |
getSpaceACLs(String spaceId)
Retrieves the ACLs associated with a space.
|
Iterator<String> |
getSpaceContents(String spaceId,
String prefix)
Provides access to the content files within a space.
|
List<String> |
getSpaceContentsChunked(String spaceId,
String prefix,
long maxResults,
String marker)
Provides a listing of the content files within a space.
|
Map<String,String> |
getSpaceProperties(String spaceId)
Retrieves the properties associated with a space.
|
Iterator<String> |
getSpaces()
Provides a listing of all spaces owned by a customer.
|
void |
setContentProperties(String spaceId,
String contentId,
Map<String,String> contentProperties)
Sets the properties associated with content.
|
void |
setSpaceACLs(String spaceId,
Map<String,AclType> spaceACLs)
Sets the ACLs associated with a space.
|
static final String PROPERTIES_SPACE_CREATED
static final String PROPERTIES_SPACE_COUNT
static final String PROPERTIES_SPACE_SIZE
static final String PROPERTIES_SPACE_ACL
static final String PROPERTIES_SPACE_ACL_GROUP
static final String PROPERTIES_SPACE_ACL_PUBLIC
static final String PROPERTIES_CONTENT_MIMETYPE
static final String PROPERTIES_CONTENT_SIZE
static final String PROPERTIES_CONTENT_CHECKSUM
static final String PROPERTIES_CONTENT_MODIFIED
static final String PROPERTIES_CONTENT_FILE_CREATED
static final String PROPERTIES_CONTENT_FILE_MODIFIED
static final String PROPERTIES_CONTENT_FILE_LAST_ACCESSED
static final String PROPERTIES_CONTENT_FILE_PATH
static final String PROPERTIES_COPY_SOURCE
static final String PROPERTIES_COPY_SOURCE_STORE
static final String PROPERTIES_CONTENT_CREATOR
static final String PROPERTIES_CONTENT_MD5
static final String DEFAULT_MIMETYPE
static final DateFormat ISO8601_DATE_FORMAT
static final long DEFAULT_MAX_RESULTS
static final String PROPERTIES_STREAMING_HOST
Iterator<String> getSpaces()
Iterator<String> getSpaceContents(String spaceId, 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 existStorageException
- if errors occurList<String> getSpaceContentsChunked(String spaceId, String prefix, long maxResults, 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 existStorageException
- if errors occurvoid createSpace(String spaceId)
spaceId
- - ID of the spaceStorageException
- if space with ID spaceId already existsvoid deleteSpace(String spaceId)
spaceId
- - ID of the spaceNotFoundException
- if space with ID spaceId does not existStorageException
- if errors occurMap<String,String> getSpaceProperties(String spaceId)
spaceId
- - ID of the spaceNotFoundException
- if space with ID spaceId does not existStorageException
- if errors occurMap<String,AclType> getSpaceACLs(String spaceId)
spaceId
- - ID of the spaceNotFoundException
- if space with ID spaceId does not existStorageException
- if errors occurvoid setSpaceACLs(String spaceId, Map<String,AclType> spaceACLs)
spaceId
- - ID of the spacespaceACLs
- - Updated space ACL. Note, null or empty arg spaceACLs
will 'clear' the space ACLs.NotFoundException
- if space with ID spaceId does not existStorageException
- if errors occurString addContent(String spaceId, String contentId, String contentMimeType, Map<String,String> userProperties, long contentSize, String contentChecksum, InputStream content)
spaceId
- - ID of the spacecontentId
- - ID of the content in the spacecontentMimeType
- - the MIME type of the content being addeduserProperties
- - the metadata associated with the contentcontentSize
- - 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 addNotFoundException
- if space with ID spaceId does not existStorageException
- if errors occurString copyContent(String sourceSpaceId, String sourceContentId, String destSpaceId, String destContentId)
sourceSpaceId
- of content to copysourceContentId
- of content to copydestSpaceId
- where copied content will end updestContentId
- given to copied contentInputStream getContent(String spaceId, String contentId)
spaceId
- - ID of the spacecontentId
- - ID of the content in the spaceNotFoundException
- if space with ID spaceId does not exist or the
content item with ID contentId does not existStorageException
- if errors occurvoid deleteContent(String spaceId, String contentId)
spaceId
- - ID of the spacecontentId
- - ID of the content in the spaceNotFoundException
- if space with ID spaceId does not exist or the
content item with ID contentId does not existStorageException
- if errors occurvoid setContentProperties(String spaceId, String contentId, Map<String,String> contentProperties)
spaceId
- - ID of the spacecontentId
- - ID of the content in the spacecontentProperties
- - new content propertiesNotFoundException
- if space with ID spaceId does not exist or the
content item with ID contentId does not existStorageException
- if errors occurMap<String,String> getContentProperties(String spaceId, String contentId)
spaceId
- - ID of the spacecontentId
- - ID of the content in the spaceNotFoundException
- if space with ID spaceId does not exist or the
content item with ID contentId does not existStorageException
- if errors occurCopyright © 2009–2014 DuraSpace. All rights reserved.