|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentStore
Provides access to a content store
Field Summary | |
---|---|
static String |
CONTENT_CHECKSUM
Basic content properties: MD5 checksum |
static String |
CONTENT_MIMETYPE
Basic content properties: MIME type |
static String |
CONTENT_MODIFIED
Basic content properties: Last modified date |
static String |
CONTENT_SIZE
Basic content properties: Size |
static String |
SPACE_COUNT
Basic space properties: Count of items in a space |
static String |
SPACE_CREATED
Basic space properties: Created date |
static String |
SPACE_SIZE
Basic space properties: Size of space |
Method Summary | |
---|---|
String |
addContent(String spaceId,
String contentId,
InputStream content,
long contentSize,
String contentMimeType,
String contentChecksum,
Map<String,String> contentProperties)
Adds content to a space. |
String |
copyContent(String srcSpaceId,
String srcContentId,
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. |
String |
copyContent(String srcSpaceId,
String srcContentId,
String destStoreId,
String destSpaceId,
String destContentId)
This method provides a way to copy a content item to another content provider. |
void |
createSpace(String spaceId,
Map<String,String> spaceProperties)
Creates a new space. |
void |
deleteContent(String spaceId,
String contentId)
Removes content from a space. |
void |
deleteSpace(String spaceId)
Deletes a space. |
String |
getBaseURL()
Gets the base URL pointing to the DuraCloud DuraStore REST API |
Content |
getContent(String spaceId,
String contentId)
Gets content from a space. |
Map<String,String> |
getContentProperties(String spaceId,
String contentId)
Retrieves the properties associated with content. |
Space |
getSpace(String spaceId,
String prefix,
long maxResults,
String marker)
Provides a space, including the id and properties of the space as well as a limited list of the content items within a space. |
Map<String,org.duracloud.common.model.AclType> |
getSpaceACLs(String spaceId)
Retrieves the ACLs associated with a space. |
Iterator<String> |
getSpaceContents(String spaceId)
Retrieves the complete list of content items within a space. |
Iterator<String> |
getSpaceContents(String spaceId,
String prefix)
Retrieves the complete list of content items within a space. |
Map<String,String> |
getSpaceProperties(String spaceId)
Retrieves the properties associated with a space. |
List<String> |
getSpaces()
Provides a listing of all spaces IDs. |
String |
getStorageProviderType()
Gets the storage provider type StorageProviderType |
String |
getStoreId()
Gets the ID of this content store |
List<String> |
getSupportedTasks()
Gets a listing of the supported tasks. |
String |
moveContent(String srcSpaceId,
String srcContentId,
String destSpaceId,
String destContentId)
This method moves the content item found in source-space with the id of source-content-id into the dest-space, naming it to dest-content-id. |
String |
moveContent(String srcSpaceId,
String srcContentId,
String destStoreId,
String destSpaceId,
String destContentId)
This method moves the content item found in source-space with the id of source-content-id into the dest-space, naming it to dest-content-id. |
String |
performTask(String taskName,
String taskParameters)
Perform a task which is outside of the standard set of storage activites but is available through one or more storage providers. |
void |
setContentProperties(String spaceId,
String contentId,
Map<String,String> contentProperties)
Sets the properties associated with content. |
void |
setSpaceACLs(String spaceId,
Map<String,org.duracloud.common.model.AclType> spaceACLs)
Sets the ACLs associated with a space. |
void |
setSpaceProperties(String spaceId,
Map<String,String> spaceProperties)
Sets the properties associated with a space. |
void |
validateContentId(String contentId)
Checks a content ID to ensure that it conforms to all restrictions |
void |
validateSpaceId(String spaceId)
Checks a space ID to ensure that it conforms to all restrictions |
Field Detail |
---|
static final String SPACE_CREATED
static final String SPACE_COUNT
static final String SPACE_SIZE
static final String CONTENT_MIMETYPE
static final String CONTENT_SIZE
static final String CONTENT_CHECKSUM
static final String CONTENT_MODIFIED
Method Detail |
---|
String getBaseURL()
String getStoreId()
String getStorageProviderType()
StorageProviderType
List<String> getSpaces() throws ContentStoreException
ContentStoreException
- if an error occursIterator<String> getSpaceContents(String spaceId) throws ContentStoreException
spaceId
- the identifier of the DuraCloud Space
NotFoundException
- if the space does not exist
ContentStoreException
- if an error occursIterator<String> getSpaceContents(String spaceId, String prefix) throws ContentStoreException
spaceId
- the identifier of the DuraCloud Spaceprefix
- only retrieve content ids with this prefix (null for all content ids)
NotFoundException
- if the space does not exist
ContentStoreException
- if an error occursSpace getSpace(String spaceId, String prefix, long maxResults, String marker) throws ContentStoreException
spaceId
- the identifier of the DuraCloud 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 - which is 1000)marker
- the content id marking the last item in the previous set (null to specify first set of ids)
NotFoundException
- if the space does not exist
ContentStoreException
- if an error occursvoid createSpace(String spaceId, Map<String,String> spaceProperties) throws ContentStoreException
spaceId
- the identifier of the DuraCloud SpacespaceProperties
- a map of properties entries for the space
InvalidIdException
- if the space ID is not valid
ContentStoreException
- if the space already exists or cannot be createdvoid deleteSpace(String spaceId) throws ContentStoreException
spaceId
- the identifier of the DuraCloud Space
NotFoundException
- if the space does not exist
ContentStoreException
- if an error occursMap<String,String> getSpaceProperties(String spaceId) throws ContentStoreException
spaceId
- the identifier of the DuraCloud Space
NotFoundException
- if the space does not exist
ContentStoreException
- if an error occursvoid setSpaceProperties(String spaceId, Map<String,String> spaceProperties) throws ContentStoreException
spaceId
- the identifier of the DuraCloud SpacespaceProperties
- a map of properties entries for the space
NotFoundException
- if the space does not exist
ContentStoreException
- if an error occursMap<String,org.duracloud.common.model.AclType> getSpaceACLs(String spaceId) throws ContentStoreException
spaceId
- the identifier of the DuraCloud Space
NotFoundException
- if the space does not exist
ContentStoreException
- if an error occursvoid setSpaceACLs(String spaceId, Map<String,org.duracloud.common.model.AclType> spaceACLs) throws ContentStoreException
spaceId
- the identifier of the DuraCloud SpacespaceACLs
- a map of ACL entries for the space (user|group -> right)
NotFoundException
- if the space does not exist
ContentStoreException
- if an error occursString addContent(String spaceId, String contentId, InputStream content, long contentSize, String contentMimeType, String contentChecksum, Map<String,String> contentProperties) throws ContentStoreException
spaceId
- the identifier of the DuraCloud SpacecontentId
- the identifier of the new content itemcontent
- the new content as a streamcontentSize
- the size of the contentcontentMimeType
- the MIME type of the contentcontentChecksum
- the MD5 checksum of the content, or null if the checksum is not knowncontentProperties
- a map of properties values to be linked to this content
InvalidIdException
- if the content ID is not valid
NotFoundException
- if the space does not exist
ContentStoreException
- if an error occursString copyContent(String srcSpaceId, String srcContentId, String destSpaceId, String destContentId) throws ContentStoreException
srcSpaceId
- of content to copysrcContentId
- of content to copydestSpaceId
- where copied content will end updestContentId
- given to copied content
ContentStoreException
- on errorString copyContent(String srcSpaceId, String srcContentId, String destStoreId, String destSpaceId, String destContentId) throws ContentStoreException
srcSpaceId
- of content to copysrcContentId
- of content to copydestStoreId
- where the copied content will end updestSpaceId
- where copied content will end updestContentId
- given to copied content
ContentStoreException
- on errorString moveContent(String srcSpaceId, String srcContentId, String destSpaceId, String destContentId) throws ContentStoreException
srcSpaceId
- of content to movesrcContentId
- of content to movedestSpaceId
- where moved content will end updestContentId
- given to moved content
ContentStoreException
- on errorString moveContent(String srcSpaceId, String srcContentId, String destStoreId, String destSpaceId, String destContentId) throws ContentStoreException
srcSpaceId
- of content to movesrcContentId
- of content to movedestStoreId
- where moved content will end updestSpaceId
- where moved content will end updestContentId
- given to moved content
ContentStoreException
- on errorContent getContent(String spaceId, String contentId) throws ContentStoreException
spaceId
- the identifier of the DuraCloud SpacecontentId
- the identifier of the content item
NotFoundException
- if the space or content does not exist
ContentStoreException
- if an error occursvoid deleteContent(String spaceId, String contentId) throws ContentStoreException
spaceId
- the identifier of the DuraCloud SpacecontentId
- the identifier of the content item
NotFoundException
- if the space or content does not exist
ContentStoreException
- if an error occursvoid setContentProperties(String spaceId, String contentId, Map<String,String> contentProperties) throws ContentStoreException
spaceId
- the identifier of the DuraCloud SpacecontentId
- the identifier of the content itemcontentProperties
- a map of properties values to be linked to this content
NotFoundException
- if the space or content does not exist
ContentStoreException
- if an error occursMap<String,String> getContentProperties(String spaceId, String contentId) throws ContentStoreException
spaceId
- the identifier of the DuraCloud SpacecontentId
- the identifier of the content item
NotFoundException
- if the space or content does not exist
ContentStoreException
- if an error occursvoid validateSpaceId(String spaceId) throws InvalidIdException
spaceId
- ID to validate
InvalidIdException
- if the space ID is invalidvoid validateContentId(String contentId) throws InvalidIdException
contentId
- ID to validate
InvalidIdException
- if the content ID is invalidList<String> getSupportedTasks() throws ContentStoreException
ContentStoreException
String performTask(String taskName, String taskParameters) throws ContentStoreException
taskName
- the name of the task to be performedtaskParameters
- the parameters of the task, what is included here
and how the information is formatted is
task-specific
ContentStoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |