| 
 | ||||||||||
| 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 | 
| Nested classes/interfaces inherited from interface org.duracloud.storage.provider.StorageProvider | 
|---|
| StorageProvider.AccessType | 
| Field Summary | |
|---|---|
| static java.lang.String | BLOB_NAMESPACE | 
| Fields inherited from interface org.duracloud.storage.provider.StorageProvider | 
|---|
| DEFAULT_MAX_RESULTS, DEFAULT_MIMETYPE, PROPERTIES_CONTENT_CHECKSUM, PROPERTIES_CONTENT_MD5, PROPERTIES_CONTENT_MIMETYPE, PROPERTIES_CONTENT_MODIFIED, PROPERTIES_CONTENT_SIZE, PROPERTIES_COPY_SOURCE, PROPERTIES_SPACE_ACCESS, PROPERTIES_SPACE_COUNT, PROPERTIES_SPACE_CREATED, PROPERTIES_SPACE_SIZE, RFC822_DATE_FORMAT, SPACE_PROPERTIES_SUFFIX | 
| Constructor Summary | |
|---|---|
| AzureStorageProvider(org.soyatec.windowsazure.blob.BlobStorageClient blobStorage) | |
| AzureStorageProvider(java.lang.String username,
                     java.lang.String apiAccessKey) | |
| 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. | 
| protected  java.lang.String | getContainerName(java.lang.String spaceId)Converts a provided space ID into a valid Azure container name. | 
|  java.io.InputStream | getContent(java.lang.String spaceId,
           java.lang.String contentId)Gets content from a space. | 
| protected  java.lang.String | getContentId(java.lang.String contentName)Converts a provided valid Azure content name into a content ID. | 
| protected  java.lang.String | getContentName(java.lang.String contentId)Converts a provided content ID into a valid Azure content name. | 
|  java.util.Map<java.lang.String,java.lang.String> | getContentProperties(java.lang.String spaceId,
                     java.lang.String contentId)Retrieves the properties associated with content. | 
|  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 | removeSpace(java.lang.String spaceId) | 
|  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 | setSpaceProperties(java.lang.String spaceId,
                   java.util.Map<java.lang.String,java.lang.String> spaceProperties)Sets the properties associated with a space. | 
| protected  void | throwIfSpaceNotExist(java.lang.String spaceId) | 
| Methods inherited from class org.duracloud.storage.provider.StorageProviderBase | 
|---|
| deleteSpace, getSpaceAccess, getSpaceDeleteWorker, setSpaceAccess | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String BLOB_NAMESPACE
| Constructor Detail | 
|---|
public AzureStorageProvider(java.lang.String username,
                            java.lang.String apiAccessKey)
public AzureStorageProvider(org.soyatec.windowsazure.blob.BlobStorageClient blobStorage)
| Method Detail | 
|---|
public java.util.Iterator<java.lang.String> getSpaces()
public 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)
public java.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)
protected void throwIfSpaceNotExist(java.lang.String spaceId)
throwIfSpaceNotExist in class StorageProviderBasepublic void createSpace(java.lang.String spaceId)
spaceId - - ID of the spacepublic void removeSpace(java.lang.String spaceId)
removeSpace in class StorageProviderBasepublic java.util.Map<java.lang.String,java.lang.String> getSpaceProperties(java.lang.String spaceId)
spaceId - - ID of the space
public void setSpaceProperties(java.lang.String spaceId,
                               java.util.Map<java.lang.String,java.lang.String> spaceProperties)
spaceId - - ID of the spacespaceProperties - - Updated space properties
public 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)
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
public java.lang.String copyContent(java.lang.String sourceSpaceId,
                                    java.lang.String sourceContentId,
                                    java.lang.String destSpaceId,
                                    java.lang.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 java.io.InputStream getContent(java.lang.String spaceId,
                                      java.lang.String contentId)
spaceId - - ID of the spacecontentId - - ID of the content in the space
public void deleteContent(java.lang.String spaceId,
                          java.lang.String contentId)
spaceId - - ID of the spacecontentId - - ID of the content in the space
public void 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
public java.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
protected java.lang.String getContainerName(java.lang.String spaceId)
spaceId - user preferred ID of the space
protected java.lang.String getContentName(java.lang.String contentId)
contentId - user preferred ID of the content
protected java.lang.String getContentId(java.lang.String contentName)
contentName - valid Azure content name
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||