|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.soyatec.windows.azure.blob.BlobContainer
org.soyatec.windows.azure.blob.BlobContainerRest
public class BlobContainerRest
| Constructor Summary | |
|---|---|
BlobContainerRest(java.net.URI baseUri,
boolean usePathStyleUris,
java.lang.String accountName,
java.lang.String containerName,
java.lang.String base64Key,
java.sql.Timestamp lastModified,
TimeSpan timeOut,
RetryPolicy retryPolicy)
|
|
| Method Summary | |
|---|---|
boolean |
copyBlob(java.lang.String destContainer,
java.lang.String destBlobName,
java.lang.String sourceBlobName)
Copies a blob to a destination within the storage account. |
boolean |
copyBlob(java.lang.String destContainer,
java.lang.String destBlobName,
java.lang.String sourceBlobName,
NameValueCollection metadata,
BlobConstraints constraints)
Copies a blob to a destination within the storage account. |
boolean |
createBlob(BlobProperties blobProperties,
BlobContents blobContents,
boolean overwrite)
Create a new blob or overwrite an existing blob. |
boolean |
createContainer()
Create the container if it does not exist. |
boolean |
createContainer(NameValueCollection metadata,
ContainerAccessControl accessControl)
Create the container with the specified access control if it does not exist |
boolean |
deleteBlob(java.lang.String name)
Delete a blob with the given name. |
boolean |
deleteBlobIfNotModified(BlobProperties blob)
Delete a blob with the given name if the blob has not been modified since it was last obtained. |
boolean |
deleteContainer()
Deletes the current container. |
boolean |
doesBlobExist(java.lang.String blobName)
Check if the blob container exists |
boolean |
doesContainerExist()
Check if the blob container exists |
BlobProperties |
getBlob(java.lang.String name,
BlobContents blobContents,
boolean transferAsChunks)
Get the blob contents and properties if the blob exists. |
boolean |
getBlobIfModified(BlobProperties blobProperties,
BlobContents blobContents,
boolean transferAsChunks)
Gets the blob contents and properties if the blob has not been modified since the time specified. |
BlobProperties |
getBlobProperties(java.lang.String name)
Get the properties of the blob if it exists. |
ContainerAccessControl |
getContainerAccessControl()
Get the access control permissions associated with the container. |
ContainerProperties |
getContainerProperties()
Get the properties for the container if it exists. |
java.util.Collection<BlobProperties> |
listBlobs(java.lang.String prefix,
boolean combineCommonPrefixes)
Enumerates all blobs with a given prefix. |
java.util.Collection<BlobProperties> |
listBlobs(java.lang.String prefix,
boolean combineCommonPrefixes,
int maxResults)
Enumerates all blobs with a given prefix. |
void |
setContainerAccessControl(ContainerAccessControl acl)
Set the access control permissions associated with the container. |
boolean |
updateBlobIfNotModified(BlobProperties blobProperties,
BlobContents contents)
Updates an existing blob if it has not been modified since the specified time which is typically the last modified time of the blob when you retrieved it. |
void |
updateBlobMetadata(BlobProperties blobProperties)
Set the metadata of an existing blob. |
boolean |
updateBlobMetadataIfNotModified(BlobProperties blobProperties)
Set the metadata of an existing blob if it has not been modified since it was last retrieved. |
| Methods inherited from class org.soyatec.windows.azure.blob.BlobContainer |
|---|
getAccountName, getBaseUri, getBlockSize, getContainerName, getContainerUri, getLastModifiedTime, getRetryPolicy, getTimeout, isStopped, isUsePathStyleUris, setBlockSize, setContainerUri, setRetryPolicy, setTimeout, stopFetchProgress |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BlobContainerRest(java.net.URI baseUri,
boolean usePathStyleUris,
java.lang.String accountName,
java.lang.String containerName,
java.lang.String base64Key,
java.sql.Timestamp lastModified,
TimeSpan timeOut,
RetryPolicy retryPolicy)
| Method Detail |
|---|
public boolean createBlob(BlobProperties blobProperties,
BlobContents blobContents,
boolean overwrite)
throws StorageException
createBlob in class BlobContainerblobProperties - The properties of the blobblobContents - The contents of the bloboverwrite - Should this request overwrite an existing blob
StorageException
public boolean updateBlobIfNotModified(BlobProperties blobProperties,
BlobContents contents)
throws StorageException
updateBlobIfNotModified in class BlobContainerblobProperties - The properties of the blob. This object should be one
previously obtained from a call to GetBlob or
GetBlobProperties and have its LastModifiedTime property set.contents - The contents of the blob. The contents of the blob should be
readable
StorageException
public boolean createContainer()
throws StorageException
BlobContainer
createContainer in class BlobContainerStorageException
public boolean createContainer(NameValueCollection metadata,
ContainerAccessControl accessControl)
throws StorageException
createContainer in class BlobContainermetadata - The metadata for the container. Can be null to indicate no
metadataaccessControl - The access control (public or private) with which to create
the container
StorageException
public boolean doesContainerExist()
throws StorageException
BlobContainer
doesContainerExist in class BlobContainerStorageException
public boolean doesBlobExist(java.lang.String blobName)
throws StorageException
BlobContainer
doesBlobExist in class BlobContainerStorageException
public ContainerProperties getContainerProperties()
throws StorageException
BlobContainer
getContainerProperties in class BlobContainerStorageException
public void setContainerAccessControl(ContainerAccessControl acl)
throws StorageException
BlobContainer
setContainerAccessControl in class BlobContaineracl - The permission to set
StorageException
public ContainerAccessControl getContainerAccessControl()
throws StorageException
BlobContainer
getContainerAccessControl in class BlobContainerStorageException
public boolean deleteContainer()
throws StorageException
BlobContainer
deleteContainer in class BlobContainerStorageException
public boolean deleteBlob(java.lang.String name)
throws StorageException
BlobContainer
deleteBlob in class BlobContainername - The name of the blob
StorageException
public boolean deleteBlobIfNotModified(BlobProperties blob)
throws StorageException
BlobContainer
deleteBlobIfNotModified in class BlobContainerblob - A blob object (typically previously obtained from a GetBlob
call)
StorageException
public BlobProperties getBlob(java.lang.String name,
BlobContents blobContents,
boolean transferAsChunks)
throws StorageException
BlobContainer
getBlob in class BlobContainername - The name of the blobblobContents - Object in which the contents are returned. This object should
contain a writable stream or should be a default constructed
object.transferAsChunks - Should the blob be gotten in pieces. This requires more
round-trips, but will retry smaller pieces in case of failure.
StorageException
public java.util.Collection<BlobProperties> listBlobs(java.lang.String prefix,
boolean combineCommonPrefixes,
int maxResults)
throws StorageException
listBlobs in class BlobContainerprefix - combineCommonPrefixes - If true common prefixes with "/" as separatormaxResults - Specifies the maximum number of blobs to return per call to Azure storage. This does NOT affect list size returned by this function.
StorageException
public java.util.Collection<BlobProperties> listBlobs(java.lang.String prefix,
boolean combineCommonPrefixes)
throws StorageException
listBlobs in class BlobContainerprefix - combineCommonPrefixes - If true common prefixes with "/" as separator
StorageException
public boolean getBlobIfModified(BlobProperties blobProperties,
BlobContents blobContents,
boolean transferAsChunks)
throws StorageException
BlobContainer
getBlobIfModified in class BlobContainerblobProperties - The properties of the blob obtained from an earlier call to
GetBlob. This parameter is updated by the call if the blob has
been modifiedblobContents - Contains the stream to which the contents of the blob are
written if it has been modifiedtransferAsChunks - Should the blob be gotten in pieces. This requires more
round-trips, but will retry smaller pieces in case of failure.
StorageException
public BlobProperties getBlobProperties(java.lang.String name)
throws StorageException
BlobContainer
getBlobProperties in class BlobContainername - The name of the blob
StorageException
public void updateBlobMetadata(BlobProperties blobProperties)
throws StorageException
BlobContainer
updateBlobMetadata in class BlobContainerblobProperties - The blob properties object whose metadata is to be updated
StorageException
public boolean copyBlob(java.lang.String destContainer,
java.lang.String destBlobName,
java.lang.String sourceBlobName)
throws StorageException
BlobContainer
copyBlob in class BlobContainerdestContainer - the destination blob container;destBlobName - the destination blob's name;sourceBlobName - the source blob's name;
StorageException
public boolean copyBlob(java.lang.String destContainer,
java.lang.String destBlobName,
java.lang.String sourceBlobName,
NameValueCollection metadata,
BlobConstraints constraints)
throws StorageException
BlobContainer
copyBlob in class BlobContainerdestContainer - the destination blob container;destBlobName - the destination blob's name;sourceBlobName - the source blob's name;metadata - The metadata for the Blob. Can be null to indicate no
metadata;constraints - The blob constraints for the blob copy operation.
StorageException
public boolean updateBlobMetadataIfNotModified(BlobProperties blobProperties)
throws StorageException
BlobContainer
updateBlobMetadataIfNotModified in class BlobContainerblobProperties - The blob properties object whose metadata is to be updated.
Typically obtained by a previous call to GetBlob or
GetBlobProperties
StorageException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||