|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.duracloud.storage.provider.StorageProviderBase
org.duracloud.azurestorage.AzureStorageProvider
public class AzureStorageProvider
Provides content storage backed by Azure's Cloud Files service.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.duracloud.storage.provider.StorageProviderBase |
|---|
StorageProviderBase.SpaceDeleteWorker |
| Field Summary | |
|---|---|
static String |
BLOB_NAMESPACE
|
| Constructor Summary | |
|---|---|
AzureStorageProvider(org.soyatec.windowsazure.blob.BlobStorageClient blobStorage)
|
|
AzureStorageProvider(String username,
String apiAccessKey)
|
|
| Method Summary | |
|---|---|
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. |
protected void |
doSetSpaceProperties(String spaceId,
Map<String,String> spaceProperties)
|
Map<String,String> |
getAllSpaceProperties(String spaceId)
|
protected String |
getContainerName(String spaceId)
Converts a provided space ID into a valid Azure container name. |
InputStream |
getContent(String spaceId,
String contentId)
Gets content from a space. |
protected String |
getContentId(String contentName)
Converts a provided valid Azure content name into a content ID. |
protected String |
getContentName(String contentId)
Converts a provided content ID into a valid Azure content name. |
Map<String,String> |
getContentProperties(String spaceId,
String contentId)
Retrieves the properties associated with content. |
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. |
Iterator<String> |
getSpaces()
Provides a listing of all spaces owned by a customer. |
void |
removeSpace(String spaceId)
|
void |
setContentProperties(String spaceId,
String contentId,
Map<String,String> contentProperties)
Sets the properties associated with content. |
protected boolean |
spaceExists(String spaceId)
|
protected void |
throwIfSpaceNotExist(String spaceId)
|
| Methods inherited from class org.duracloud.storage.provider.StorageProviderBase |
|---|
deleteSpace, getSpaceACLs, getSpaceDeleteWorker, getSpaceProperties, setNewSpaceProperties, setSpaceACLs, setSpaceProperties, throwIfSpaceExists, throwIfSpaceNotExist |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BLOB_NAMESPACE
| Constructor Detail |
|---|
public AzureStorageProvider(String username,
String apiAccessKey)
public AzureStorageProvider(org.soyatec.windowsazure.blob.BlobStorageClient blobStorage)
| Method Detail |
|---|
public Iterator<String> getSpaces()
public Iterator<String> getSpaceContents(String spaceId,
String prefix)
spaceId - - ID of the spaceprefix - - The prefix of the content id (null for no constraints)
public List<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)
protected void throwIfSpaceNotExist(String spaceId)
throwIfSpaceNotExist in class StorageProviderBaseprotected boolean spaceExists(String spaceId)
spaceExists in class StorageProviderBasepublic void createSpace(String spaceId)
spaceId - - ID of the spacepublic void removeSpace(String spaceId)
removeSpace in class StorageProviderBasepublic Map<String,String> getAllSpaceProperties(String spaceId)
getAllSpaceProperties in class StorageProviderBase
protected void doSetSpaceProperties(String spaceId,
Map<String,String> spaceProperties)
doSetSpaceProperties in class StorageProviderBase
public String 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 add
public String copyContent(String sourceSpaceId,
String sourceContentId,
String destSpaceId,
String destContentId)
throws StorageException
StorageProvider
sourceSpaceId - of content to copysourceContentId - of content to copydestSpaceId - where copied content will end updestContentId - given to copied content
StorageException
public InputStream getContent(String spaceId,
String contentId)
spaceId - - ID of the spacecontentId - - ID of the content in the space
public void deleteContent(String spaceId,
String contentId)
spaceId - - ID of the spacecontentId - - ID of the content in the space
public void setContentProperties(String spaceId,
String contentId,
Map<String,String> contentProperties)
spaceId - - ID of the spacecontentId - - ID of the content in the spacecontentProperties - - new content properties
public Map<String,String> getContentProperties(String spaceId,
String contentId)
spaceId - - ID of the spacecontentId - - ID of the content in the space
protected String getContainerName(String spaceId)
spaceId - user preferred ID of the space
protected String getContentName(String contentId)
contentId - user preferred ID of the content
protected String getContentId(String contentName)
contentName - valid Azure content name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||