public class ContentResourceImpl extends Object implements ContentResource
Constructor and Description |
---|
ContentResourceImpl(StorageProviderFactory storageProviderFactory) |
Modifier and Type | Method and Description |
---|---|
String |
addContent(String spaceID,
String contentID,
InputStream content,
String contentMimeType,
Map<String,String> userProperties,
long contentSize,
String checksum,
String storeID)
Adds content to a space.
|
String |
copyContent(String srcStoreID,
String srcSpaceID,
String srcContentID,
String destStoreID,
String destSpaceID,
String destContentID)
This method copies the content found in space srcSpaceID with id
srcContentID to the space destSpaceID within the same content store
(storeID) to the id of destContentID.
|
void |
deleteContent(String spaceID,
String contentID,
String storeID)
Removes a piece of content.
|
InputStream |
getContent(String spaceID,
String contentID,
String storeID)
Retrieves content from a space.
|
Map<String,String> |
getContentProperties(String spaceID,
String contentID,
String storeID)
Retrieves the properties of a piece of content.
|
void |
updateContentProperties(String spaceID,
String contentID,
String contentMimeType,
Map<String,String> userProperties,
String storeID)
Updates the properties of a piece of content.
|
public ContentResourceImpl(StorageProviderFactory storageProviderFactory)
public InputStream getContent(String spaceID, String contentID, String storeID) throws ResourceException
getContent
in interface ContentResource
spaceID
- contentID
- ResourceException
public Map<String,String> getContentProperties(String spaceID, String contentID, String storeID) throws ResourceException
getContentProperties
in interface ContentResource
spaceID
- contentID
- ResourceException
public void updateContentProperties(String spaceID, String contentID, String contentMimeType, Map<String,String> userProperties, String storeID) throws ResourceException
updateContentProperties
in interface ContentResource
ResourceException
public String addContent(String spaceID, String contentID, InputStream content, String contentMimeType, Map<String,String> userProperties, long contentSize, String checksum, String storeID) throws ResourceException, InvalidIdException
addContent
in interface ContentResource
ResourceException
InvalidIdException
public String copyContent(String srcStoreID, String srcSpaceID, String srcContentID, String destStoreID, String destSpaceID, String destContentID) throws ResourceException
copyContent
in interface ContentResource
srcStoreID
- of content to copysrcSpaceID
- of content to copysrcContentID
- of content to copydestSpaceID
- of copied contentdestContentID
- of copied contentdestStoreID
- of copied contentResourceException
public void deleteContent(String spaceID, String contentID, String storeID) throws ResourceException
deleteContent
in interface ContentResource
spaceID
- contentID
- ResourceException
Copyright © 2009–2014 DuraSpace. All rights reserved.