Logo Search packages:      
Sourcecode: jets3t version File versions  Download package

org::jets3t::service::S3Service Class Reference

Inheritance diagram for org::jets3t::service::S3Service:

org::jets3t::service::impl::rest::httpclient::RestS3Service org::jets3t::service::impl::soap::axis::SoapS3Service

List of all members.


Detailed Description

A service that handles communication with S3, offering all the operations that can be performed on S3 accounts.

This class must be extended by implementation classes that perform the communication with S3 via a particular interface, such as REST or SOAP. Implementations provided with the JetS3t suite include org.jets3t.service.impl.rest.httpclient.RestS3Service and org.jets3t.service.impl.soap.axis.SoapS3Service.

Implementations of S3Service must be thread-safe as they will probably be used by the multi-threaded service class org.jets3t.service.multithread.S3ServiceMulti.

This class uses properties obtained through Jets3tProperties. For more information on these properties please refer to JetS3t Configuration

Author:
James Murty

Nikolas Coukouma

Definition at line 75 of file S3Service.java.


Public Member Functions

abstract int checkBucketStatus (String bucketName) throws S3ServiceException
Map copyObject (String sourceBucketName, String sourceObjectKey, String destinationBucketName, S3Object destinationObject, boolean replaceMetadata) throws S3ServiceException
Map copyObject (String sourceBucketName, String sourceObjectKey, String destinationBucketName, S3Object destinationObject, boolean replaceMetadata, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags) throws S3ServiceException
Map copyVersionedObject (String versionId, String sourceBucketName, String sourceObjectKey, String destinationBucketName, S3Object destinationObject, boolean replaceMetadata) throws S3ServiceException
Map copyVersionedObject (String versionId, String sourceBucketName, String sourceObjectKey, String destinationBucketName, S3Object destinationObject, boolean replaceMetadata, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags) throws S3ServiceException
S3Bucket createBucket (S3Bucket bucket) throws S3ServiceException
S3Bucket createBucket (String bucketName) throws S3ServiceException
S3Bucket createBucket (String bucketName, String location) throws S3ServiceException
void deleteBucket (String bucketName) throws S3ServiceException
void deleteBucket (S3Bucket bucket) throws S3ServiceException
void deleteObject (String bucketName, String objectKey) throws S3ServiceException
void deleteObject (S3Bucket bucket, String objectKey) throws S3ServiceException
void deleteVersionedObject (String versionId, String bucketName, String objectKey) throws S3ServiceException
void deleteVersionedObjectWithMFA (String versionId, String multiFactorSerialNumber, String multiFactorAuthCode, String bucketName, String objectKey) throws S3ServiceException
void disableMFAForVersionedBucket (String bucketName, String multiFactorSerialNumber, String multiFactorAuthCode) throws S3ServiceException
void enableBucketVersioning (String bucketName) throws S3ServiceException
void enableBucketVersioningWithMFA (String bucketName) throws S3ServiceException
S3Owner getAccountOwner () throws S3ServiceException
AWSCredentials getAWSCredentials ()
S3Bucket getBucket (String bucketName) throws S3ServiceException
AccessControlList getBucketAcl (String bucketName) throws S3ServiceException
AccessControlList getBucketAcl (S3Bucket bucket) throws S3ServiceException
String getBucketLocation (String bucketName) throws S3ServiceException
S3BucketLoggingStatus getBucketLoggingStatus (String bucketName) throws S3ServiceException
S3BucketVersioningStatus getBucketVersioningStatus (String bucketName) throws S3ServiceException
Date getCurrentTimeWithOffset ()
String getDevPayProductToken ()
String getDevPayUserToken ()
int getInternalErrorRetryMax ()
String getInvokingApplicationDescription ()
Jets3tProperties getJetS3tProperties ()
S3Object getObject (String bucketName, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, Long byteRangeStart, Long byteRangeEnd) throws S3ServiceException
S3Object getObject (S3Bucket bucket, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, Long byteRangeStart, Long byteRangeEnd) throws S3ServiceException
S3Object getObject (String bucketName, String objectKey) throws S3ServiceException
S3Object getObject (S3Bucket bucket, String objectKey) throws S3ServiceException
AccessControlList getObjectAcl (String bucketName, String objectKey) throws S3ServiceException
AccessControlList getObjectAcl (S3Bucket bucket, String objectKey) throws S3ServiceException
S3Object getObjectDetails (String bucketName, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags) throws S3ServiceException
S3Object getObjectDetails (S3Bucket bucket, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags) throws S3ServiceException
S3Object getObjectDetails (String bucketName, String objectKey) throws S3ServiceException
S3Object getObjectDetails (S3Bucket bucket, String objectKey) throws S3ServiceException
BaseVersionOrDeleteMarker[] getObjectVersions (String bucketName, String objectKey) throws S3ServiceException
S3Bucket getOrCreateBucket (String bucketName) throws S3ServiceException
S3Bucket getOrCreateBucket (String bucketName, String location) throws S3ServiceException
S3Object getVersionedObject (String versionId, String bucketName, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, Long byteRangeStart, Long byteRangeEnd) throws S3ServiceException
S3Object getVersionedObject (String versionId, S3Bucket bucket, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, Long byteRangeStart, Long byteRangeEnd) throws S3ServiceException
S3Object getVersionedObject (String versionId, String bucketName, String objectKey) throws S3ServiceException
AccessControlList getVersionedObjectAcl (String versionId, String bucketName, String objectKey) throws S3ServiceException
AccessControlList getVersionedObjectAcl (String versionId, S3Bucket bucket, String objectKey) throws S3ServiceException
S3Object getVersionedObjectDetails (String versionId, String bucketName, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags) throws S3ServiceException
S3Object getVersionedObjectDetails (String versionId, S3Bucket bucket, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags) throws S3ServiceException
S3Object getVersionedObjectDetails (String versionId, String bucketName, String objectKey) throws S3ServiceException
boolean isAuthenticatedConnection ()
abstract boolean isBucketAccessible (String bucketName) throws S3ServiceException
boolean isHttpsOnly ()
boolean isObjectInBucket (String bucketName, String objectKey) throws S3ServiceException
boolean isRequesterPaysBucket (String bucketName) throws S3ServiceException
boolean isRequesterPaysEnabled ()
boolean isShutdown ()
S3Bucket[] listAllBuckets () throws S3ServiceException
S3Object[] listObjects (String bucketName, String prefix, String delimiter, long maxListingLength) throws S3ServiceException
S3Object[] listObjects (S3Bucket bucket, String prefix, String delimiter, long maxListingLength) throws S3ServiceException
S3Object[] listObjects (S3Bucket bucket, String prefix, String delimiter) throws S3ServiceException
S3Object[] listObjects (S3Bucket bucket) throws S3ServiceException
S3ObjectsChunk listObjectsChunked (String bucketName, String prefix, String delimiter, long maxListingLength, String priorLastKey, boolean completeListing) throws S3ServiceException
S3ObjectsChunk listObjectsChunked (String bucketName, String prefix, String delimiter, long maxListingLength, String priorLastKey) throws S3ServiceException
BaseVersionOrDeleteMarker[] listVersionedObjects (String bucketName, String prefix, String delimiter) throws S3ServiceException
VersionOrDeleteMarkersChunk listVersionedObjectsChunked (String bucketName, String prefix, String delimiter, long maxListingLength, String priorLastKey, String priorLastVersionId, boolean completeListing) throws S3ServiceException
Map moveObject (String sourceBucketName, String sourceObjectKey, String destinationBucketName, S3Object destinationObject, boolean replaceMetadata) throws S3ServiceException
void putBucketAcl (String bucketName, AccessControlList acl) throws S3ServiceException
void putBucketAcl (S3Bucket bucket) throws S3ServiceException
S3Object putObject (S3Bucket bucket, S3Object object) throws S3ServiceException
S3Object putObject (String bucketName, S3Object object) throws S3ServiceException
void putObjectAcl (String bucketName, String objectKey, AccessControlList acl) throws S3ServiceException
void putObjectAcl (S3Bucket bucket, S3Object object) throws S3ServiceException
void putVersionedObjectAcl (String versionId, S3Bucket bucket, S3Object object) throws S3ServiceException
void putVersionedObjectAcl (String versionId, String bucketName, String objectKey, AccessControlList acl) throws S3ServiceException
Map renameObject (String bucketName, String sourceObjectKey, S3Object destinationObject) throws S3ServiceException
void setBucketLoggingStatus (String bucketName, S3BucketLoggingStatus status, boolean updateTargetACLifRequired) throws S3ServiceException
void setDevPayProductToken (String productToken)
void setDevPayUserToken (String userToken)
void setRequesterPaysBucket (String bucketName, boolean requesterPays) throws S3ServiceException
void setRequesterPaysEnabled (boolean isRequesterPays)
void shutdown () throws S3ServiceException
void suspendBucketVersioning (String bucketName) throws S3ServiceException
void suspendBucketVersioningWithMFA (String bucketName, String multiFactorSerialNumber, String multiFactorAuthCode) throws S3ServiceException
Map updateObjectMetadata (String bucketName, S3Object object) throws S3ServiceException

Static Public Member Functions

static String buildPostForm (String bucketName, String key, AWSCredentials awsCredentials, Date expiration, String[] conditions, String[] inputFields, String textInput, boolean isSecureHttp, boolean usePathStyleUrl, String submitButtonName) throws S3ServiceException, UnsupportedEncodingException
static String buildPostForm (String bucketName, String key, AWSCredentials awsCredentials, Date expiration, String[] conditions, String[] inputFields, String textInput, boolean isSecureHttp) throws S3ServiceException, UnsupportedEncodingException
static String buildPostForm (String bucketName, String key) throws S3ServiceException, UnsupportedEncodingException
static String createSignedDeleteUrl (String bucketName, String objectKey, AWSCredentials awsCredentials, Date expiryTime) throws S3ServiceException
static String createSignedDeleteUrl (String bucketName, String objectKey, AWSCredentials awsCredentials, Date expiryTime, boolean isVirtualHost) throws S3ServiceException
static String createSignedGetUrl (String bucketName, String objectKey, AWSCredentials awsCredentials, Date expiryTime) throws S3ServiceException
static String createSignedGetUrl (String bucketName, String objectKey, AWSCredentials awsCredentials, Date expiryTime, boolean isVirtualHost) throws S3ServiceException
static String createSignedHeadUrl (String bucketName, String objectKey, AWSCredentials awsCredentials, Date expiryTime) throws S3ServiceException
static String createSignedHeadUrl (String bucketName, String objectKey, AWSCredentials awsCredentials, Date expiryTime, boolean isVirtualHost) throws S3ServiceException
static String createSignedPutUrl (String bucketName, String objectKey, Map headersMap, AWSCredentials awsCredentials, Date expiryTime) throws S3ServiceException
static String createSignedPutUrl (String bucketName, String objectKey, Map headersMap, AWSCredentials awsCredentials, Date expiryTime, boolean isVirtualHost) throws S3ServiceException
static String createSignedUrl (String method, String bucketName, String objectKey, String specialParamName, Map headersMap, AWSCredentials awsCredentials, long secondsSinceEpoch) throws S3ServiceException
static String createSignedUrl (String method, String bucketName, String objectKey, String specialParamName, Map headersMap, AWSCredentials awsCredentials, long secondsSinceEpoch, boolean isVirtualHost) throws S3ServiceException
static String createSignedUrl (String method, String bucketName, String objectKey, String specialParamName, Map headersMap, AWSCredentials awsCredentials, long secondsSinceEpoch, boolean isVirtualHost, boolean isHttps, boolean isDnsBucketNamingDisabled) throws S3ServiceException
static String createTorrentUrl (String bucketName, String objectKey)
static String generatePostPolicyCondition (String operation, String name, String value)
static String generatePostPolicyCondition_AllowAnyValue (String name)
static String generatePostPolicyCondition_Equality (String name, List values)
static String generatePostPolicyCondition_Equality (String name, String[] values)
static String generatePostPolicyCondition_Equality (String name, String value)
static String generatePostPolicyCondition_Range (int min, int max)
static String generateS3HostnameForBucket (String bucketName, boolean isDnsBucketNamingDisabled)
static boolean isBucketNameValidDNSName (String bucketName)

Static Public Attributes

static final int BUCKET_STATUS__ALREADY_CLAIMED = 2
static final int BUCKET_STATUS__DOES_NOT_EXIST = 1
static final int BUCKET_STATUS__MY_BUCKET = 0
static final String VERSION_NO__JETS3T_TOOLKIT = "0.7.3"

Protected Member Functions

void assertAuthenticatedConnection (String action) throws S3ServiceException
void assertValidBucket (S3Bucket bucket, String action) throws S3ServiceException
void assertValidObject (String key, String action) throws S3ServiceException
void assertValidObject (S3Object object, String action) throws S3ServiceException
abstract Map copyObjectImpl (String sourceBucketName, String sourceObjectKey, String destinationBucketName, String destinationObjectKey, AccessControlList acl, Map destinationMetadata, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, String versionId) throws S3ServiceException
abstract S3Bucket createBucketImpl (String bucketName, String location, AccessControlList acl) throws S3ServiceException
abstract void deleteBucketImpl (String bucketName) throws S3ServiceException
abstract void deleteObjectImpl (String bucketName, String objectKey, String versionId, String multiFactorSerialNumber, String multiFactorAuthCode) throws S3ServiceException
abstract S3Owner getAccountOwnerImpl () throws S3ServiceException
abstract AccessControlList getBucketAclImpl (String bucketName) throws S3ServiceException
abstract String getBucketLocationImpl (String bucketName) throws S3ServiceException
abstract S3BucketLoggingStatus getBucketLoggingStatusImpl (String bucketName) throws S3ServiceException
abstract S3BucketVersioningStatus getBucketVersioningStatusImpl (String bucketName) throws S3ServiceException
abstract AccessControlList getObjectAclImpl (String bucketName, String objectKey, String versionId) throws S3ServiceException
abstract S3Object getObjectDetailsImpl (String bucketName, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, String versionId) throws S3ServiceException
abstract S3Object getObjectImpl (String bucketName, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, Long byteRangeStart, Long byteRangeEnd, String versionId) throws S3ServiceException
abstract boolean isRequesterPaysBucketImpl (String bucketName) throws S3ServiceException
abstract S3Bucket[] listAllBucketsImpl () throws S3ServiceException
abstract S3ObjectsChunk listObjectsChunkedImpl (String bucketName, String prefix, String delimiter, long maxListingLength, String priorLastKey, boolean completeListing) throws S3ServiceException
abstract S3Object[] listObjectsImpl (String bucketName, String prefix, String delimiter, long maxListingLength) throws S3ServiceException
abstract
VersionOrDeleteMarkersChunk 
listVersionedObjectsChunkedImpl (String bucketName, String prefix, String delimiter, long maxListingLength, String priorLastKey, String priorLastVersion, boolean completeListing) throws S3ServiceException
abstract
BaseVersionOrDeleteMarker[] 
listVersionedObjectsImpl (String bucketName, String prefix, String delimiter, String keyMarker, String versionMarker, long maxListingLength) throws S3ServiceException
abstract void putBucketAclImpl (String bucketName, AccessControlList acl) throws S3ServiceException
abstract void putObjectAclImpl (String bucketName, String objectKey, AccessControlList acl, String versionId) throws S3ServiceException
abstract S3Object putObjectImpl (String bucketName, S3Object object) throws S3ServiceException
 S3Service (AWSCredentials awsCredentials) throws S3ServiceException
 S3Service (AWSCredentials awsCredentials, String invokingApplicationDescription) throws S3ServiceException
 S3Service (AWSCredentials awsCredentials, String invokingApplicationDescription, Jets3tProperties jets3tProperties) throws S3ServiceException
abstract void setBucketLoggingStatusImpl (String bucketName, S3BucketLoggingStatus status) throws S3ServiceException
abstract void setRequesterPaysBucketImpl (String bucketName, boolean requesterPays) throws S3ServiceException
abstract void shutdownImpl () throws S3ServiceException
void sleepOnInternalError (int internalErrorCount) throws S3ServiceException, InterruptedException
abstract void updateBucketVersioningStatusImpl (String bucketName, boolean enabled, boolean multiFactorAuthDeleteEnabled, String multiFactorSerialNumber, String multiFactorAuthCode) throws S3ServiceException

Protected Attributes

Jets3tProperties jets3tProperties = null
long timeOffset = 0

Private Attributes

AWSCredentials awsCredentials = null
String awsDevPayProductToken = null
String awsDevPayUserToken = null
int internalErrorRetryMax = 5
String invokingApplicationDescription = null
boolean isHttpsOnly = true
boolean isRequesterPaysEnabled = false
boolean isShutdown = false

Static Private Attributes

static final Log log = LogFactory.getLog(S3Service.class)
static final long serialVersionUID = -5488173253180265796L

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index