org.dasein.cloud.aws.storage
Class S3
java.lang.Object
org.dasein.cloud.aws.storage.S3
- All Implemented Interfaces:
- org.dasein.cloud.AccessControlledService, org.dasein.cloud.storage.BlobStoreSupport
public class S3
- extends Object
- implements org.dasein.cloud.storage.BlobStoreSupport
| Fields inherited from interface org.dasein.cloud.storage.BlobStoreSupport |
ANY, CREATE_BUCKET, DOWNLOAD, GET_BUCKET, LIST_BUCKET, LIST_BUCKET_CONTENTS, MAKE_PUBLIC, REMOVE_BUCKET, UPLOAD |
|
Method Summary |
boolean |
belongsToAnother(String bucket)
|
void |
clear(String bucket)
|
org.dasein.cloud.storage.CloudStoreObject |
copy(org.dasein.cloud.storage.CloudStoreObject file,
org.dasein.cloud.storage.CloudStoreObject toDirectory,
String copyName)
|
String |
createDirectory(String bucket,
boolean findFreeName)
|
org.dasein.cloud.storage.FileTransfer |
download(org.dasein.cloud.storage.CloudStoreObject cloudFile,
File diskFile)
|
org.dasein.cloud.storage.FileTransfer |
download(String directory,
String fileName,
File toFile,
org.dasein.cloud.encryption.Encryption encryption)
|
boolean |
exists(String bucket)
|
long |
exists(String bucket,
String object,
boolean multiPart)
|
Document |
getAcl(String bucket,
String object)
|
long |
getMaxFileSizeInBytes()
|
String |
getProviderTermForDirectory(Locale locale)
|
String |
getProviderTermForFile(Locale locale)
|
boolean |
isPublic(String bucket,
String object)
|
boolean |
isSubscribed()
|
Collection<org.dasein.cloud.storage.CloudStoreObject> |
listFiles(String bucket)
|
void |
makePublic(String bucket)
|
void |
makePublic(String bucket,
String object)
|
String[] |
mapServiceAction(org.dasein.cloud.identity.ServiceAction action)
|
void |
moveFile(String sourceBucket,
String object,
String targetBucket)
|
void |
removeDirectory(String bucket)
|
void |
removeFile(String directory,
String name,
boolean multipartFile)
|
String |
renameDirectory(String oldName,
String newName,
boolean findFreeName)
|
void |
renameFile(String bucket,
String object,
String newName)
|
void |
upload(File source,
String directory,
String fileName,
boolean multipart,
org.dasein.cloud.encryption.Encryption encryption)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
S3
public S3(AWSCloud provider)
clear
public void clear(String bucket)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
clear in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
copy
public org.dasein.cloud.storage.CloudStoreObject copy(org.dasein.cloud.storage.CloudStoreObject file,
org.dasein.cloud.storage.CloudStoreObject toDirectory,
String copyName)
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
- Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
createDirectory
public String createDirectory(String bucket,
boolean findFreeName)
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
- Specified by:
createDirectory in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
download
public org.dasein.cloud.storage.FileTransfer download(org.dasein.cloud.storage.CloudStoreObject cloudFile,
File diskFile)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
download in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
download
public org.dasein.cloud.storage.FileTransfer download(String directory,
String fileName,
File toFile,
org.dasein.cloud.encryption.Encryption encryption)
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
- Specified by:
download in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
exists
public boolean exists(String bucket)
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
- Specified by:
exists in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
belongsToAnother
public boolean belongsToAnother(String bucket)
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
- Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
exists
public long exists(String bucket,
String object,
boolean multiPart)
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
- Specified by:
exists in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
getAcl
public Document getAcl(String bucket,
String object)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
getMaxFileSizeInBytes
public long getMaxFileSizeInBytes()
- Specified by:
getMaxFileSizeInBytes in interface org.dasein.cloud.storage.BlobStoreSupport
getProviderTermForDirectory
public String getProviderTermForDirectory(Locale locale)
- Specified by:
getProviderTermForDirectory in interface org.dasein.cloud.storage.BlobStoreSupport
getProviderTermForFile
public String getProviderTermForFile(Locale locale)
- Specified by:
getProviderTermForFile in interface org.dasein.cloud.storage.BlobStoreSupport
isPublic
public boolean isPublic(String bucket,
String object)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
isPublic in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
isSubscribed
public boolean isSubscribed()
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
isSubscribed in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
listFiles
public Collection<org.dasein.cloud.storage.CloudStoreObject> listFiles(String bucket)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
listFiles in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
makePublic
public void makePublic(String bucket)
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
- Specified by:
makePublic in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
makePublic
public void makePublic(String bucket,
String object)
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
- Specified by:
makePublic in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
mapServiceAction
@Nonnull
public String[] mapServiceAction(@Nonnull
org.dasein.cloud.identity.ServiceAction action)
- Specified by:
mapServiceAction in interface org.dasein.cloud.AccessControlledService
moveFile
public void moveFile(String sourceBucket,
String object,
String targetBucket)
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
- Specified by:
moveFile in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
removeDirectory
public void removeDirectory(String bucket)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeDirectory in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
removeFile
public void removeFile(String directory,
String name,
boolean multipartFile)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
removeFile in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
renameDirectory
public String renameDirectory(String oldName,
String newName,
boolean findFreeName)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
renameDirectory in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
renameFile
public void renameFile(String bucket,
String object,
String newName)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
renameFile in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
upload
public void upload(File source,
String directory,
String fileName,
boolean multipart,
org.dasein.cloud.encryption.Encryption encryption)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
- Specified by:
upload in interface org.dasein.cloud.storage.BlobStoreSupport
- Throws:
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
Copyright © 2012 enStratus Networks LLC. All Rights Reserved.