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

org::jets3t::service::impl::rest::httpclient::RestS3Service Class Reference

Inheritance diagram for org::jets3t::service::impl::rest::httpclient::RestS3Service:

org::jets3t::service::S3Service org::jets3t::service::utils::signedurl::SignedUrlHandler

List of all members.


Detailed Description

REST/HTTP implementation of an S3Service based on the HttpClient library.

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

Author:
James Murty

Definition at line 94 of file RestS3Service.java.


Public Member Functions

void authorizeHttpRequest (HttpMethod httpMethod) throws Exception
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 deleteObjectWithSignedUrl (String signedDeleteUrl) 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
CredentialsProvider getCredentialsProvider ()
Date getCurrentTimeWithOffset ()
String getDevPayProductToken ()
String getDevPayUserToken ()
HttpClient getHttpClient ()
HttpConnectionManager getHttpConnectionManager ()
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
AccessControlList getObjectAclWithSignedUrl (String signedAclUrl) 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
S3Object getObjectDetailsWithSignedUrl (String signedHeadUrl) throws S3ServiceException
BaseVersionOrDeleteMarker[] getObjectVersions (String bucketName, String objectKey) throws S3ServiceException
S3Object getObjectWithSignedUrl (String signedGetUrl) 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 ()
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 putObjectAclWithSignedUrl (String signedAclUrl, AccessControlList acl) throws S3ServiceException
S3Object putObjectWithSignedUrl (String signedPutUrl, 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
 RestS3Service (AWSCredentials awsCredentials, String invokingApplicationDescription, CredentialsProvider credentialsProvider, Jets3tProperties jets3tProperties, HostConfiguration hostConfig) throws S3ServiceException
 RestS3Service (AWSCredentials awsCredentials, String invokingApplicationDescription, CredentialsProvider credentialsProvider, Jets3tProperties jets3tProperties) throws S3ServiceException
 RestS3Service (AWSCredentials awsCredentials, String invokingApplicationDescription, CredentialsProvider credentialsProvider) throws S3ServiceException
 RestS3Service (AWSCredentials awsCredentials) throws S3ServiceException
void setBucketLoggingStatus (String bucketName, S3BucketLoggingStatus status, boolean updateTargetACLifRequired) throws S3ServiceException
void setCredentialsProvider (CredentialsProvider credentialsProvider)
void setDevPayProductToken (String productToken)
void setDevPayUserToken (String userToken)
void setHttpClient (HttpClient httpClient)
void setHttpConnectionManager (HttpConnectionManager httpConnectionManager)
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 = "2006-03-01"
static final String VERSION_NO__JETS3T_TOOLKIT = "0.7.3"
static final String XML_NAMESPACE = "http://s3.amazonaws.com/doc/" + VERSION + "/"

Protected Member Functions

void addMetadataToHeaders (HttpMethodBase httpMethod, Map metadata) throws S3ServiceException
void addRequestHeadersToConnection (HttpMethodBase httpMethod, Map requestHeaders)
String addRequestParametersToUrlPath (String urlPath, Map requestParameters) throws S3ServiceException
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
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
S3Bucket createBucketImpl (String bucketName, String location, AccessControlList acl) throws S3ServiceException
Map createObjectImpl (String bucketName, String objectKey, String contentType, RequestEntity requestEntity, Map metadata, AccessControlList acl) throws S3ServiceException
void deleteBucketImpl (String bucketName) throws S3ServiceException
void deleteObjectImpl (String bucketName, String objectKey, String versionId, String multiFactorSerialNumber, String multiFactorAuthCode) throws S3ServiceException
S3Owner getAccountOwnerImpl () throws S3ServiceException
AccessControlList getBucketAclImpl (String bucketName) throws S3ServiceException
String getBucketLocationImpl (String bucketName) throws S3ServiceException
S3BucketLoggingStatus getBucketLoggingStatusImpl (String bucketName) throws S3ServiceException
S3BucketVersioningStatus getBucketVersioningStatusImpl (String bucketName) throws S3ServiceException
AccessControlList getObjectAclImpl (String bucketName, String objectKey, String versionId) throws S3ServiceException
AccessControlList getObjectAclImpl (String bucketName, String objectKey) throws S3ServiceException
S3Object getObjectDetailsImpl (String bucketName, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, String versionId) throws S3ServiceException
S3Object getObjectImpl (String bucketName, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, Long byteRangeStart, Long byteRangeEnd, String versionId) throws S3ServiceException
HttpClientAndConnectionManager initHttpConnection (HostConfiguration hostConfig)
boolean isRequesterPaysBucketImpl (String bucketName) throws S3ServiceException
boolean isXmlContentType (String contentType)
S3Bucket[] listAllBucketsImpl () throws S3ServiceException
S3ObjectsChunk listObjectsChunkedImpl (String bucketName, String prefix, String delimiter, long maxListingLength, String priorLastKey, boolean completeListing) throws S3ServiceException
S3Object[] listObjectsImpl (String bucketName, String prefix, String delimiter, long maxListingLength) throws S3ServiceException
S3ObjectsChunk listObjectsInternal (String bucketName, String prefix, String delimiter, long maxListingLength, boolean automaticallyMergeChunks, String priorLastKey, String priorLastVersion) throws S3ServiceException
VersionOrDeleteMarkersChunk listVersionedObjectsChunkedImpl (String bucketName, String prefix, String delimiter, long maxListingLength, String priorLastKey, String priorLastVersion, boolean completeListing) throws S3ServiceException
BaseVersionOrDeleteMarker[] listVersionedObjectsImpl (String bucketName, String prefix, String delimiter, String keyMarker, String versionMarker, long maxListingLength) throws S3ServiceException
VersionOrDeleteMarkersChunk listVersionedObjectsInternal (String bucketName, String prefix, String delimiter, long maxListingLength, boolean automaticallyMergeChunks, String nextKeyMarker, String nextVersionIdMarker) throws S3ServiceException
void performRequest (HttpMethodBase httpMethod, int[] expectedResponseCodes) throws S3ServiceException
HttpMethodBase performRestDelete (String bucketName, String objectKey, Map requestParameters, String multiFactorSerialNumber, String multiFactorAuthCode) throws S3ServiceException
HttpMethodBase performRestGet (String bucketName, String objectKey, Map requestParameters, Map requestHeaders) throws S3ServiceException
HttpMethodBase performRestHead (String bucketName, String objectKey, Map requestParameters, Map requestHeaders) throws S3ServiceException
HttpMethodAndByteCount performRestPut (String bucketName, String objectKey, Map metadata, Map requestParameters, RequestEntity requestEntity, boolean autoRelease) throws S3ServiceException
HttpMethodAndByteCount performRestPutWithXmlBuilder (String bucketName, String objectKey, Map metadata, Map requestParameters, XMLBuilder builder) throws S3ServiceException
void putAclImpl (String bucketName, String objectKey, AccessControlList acl, String versionId) throws S3ServiceException
void putBucketAclImpl (String bucketName, AccessControlList acl) throws S3ServiceException
void putObjectAclImpl (String bucketName, String objectKey, AccessControlList acl, String versionId) throws S3ServiceException
S3Object putObjectImpl (String bucketName, S3Object object) throws S3ServiceException
void setBucketLoggingStatusImpl (String bucketName, S3BucketLoggingStatus status) throws S3ServiceException
void setRequesterPaysBucketImpl (String bucketName, boolean requesterPays) throws S3ServiceException
HttpMethodBase setupConnection (String method, String bucketName, String objectKey, Map requestParameters) throws S3ServiceException
void shutdownImpl () throws S3ServiceException
void sleepOnInternalError (int internalErrorCount) throws S3ServiceException, InterruptedException
void updateBucketVersioningStatusImpl (String bucketName, boolean enabled, boolean multiFactorAuthDeleteEnabled, String multiFactorSerialNumber, String multiFactorAuthCode) throws S3ServiceException
void verifyExpectedAndActualETagValues (String expectedETag, S3Object uploadedObject) throws S3ServiceException

Protected Attributes

HttpConnectionManager connectionManager = null
CredentialsProvider credentialsProvider = null
HttpClient httpClient = null
Jets3tProperties jets3tProperties = null
long timeOffset = 0

Private Member Functions

Map convertHeadersToMap (Header[] headers)
S3Object getObjectImpl (boolean headOnly, String bucketName, String objectKey, Calendar ifModifiedSince, Calendar ifUnmodifiedSince, String[] ifMatchTags, String[] ifNoneMatchTags, Long byteRangeStart, Long byteRangeEnd, String versionId) throws S3ServiceException
S3Object getObjectWithSignedUrlImpl (String signedGetOrHeadUrl, boolean headOnly) throws S3ServiceException

Static Private Attributes

static final Log log = LogFactory.getLog(RestS3Service.class)
static final long serialVersionUID = -2374187385305273212L

Classes

class  HttpMethodAndByteCount

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

Generated by  Doxygen 1.6.0   Back to index