Interface SignedUrlHandler
- All Known Implementing Classes:
RestS3Service
,S3Service
Implementation classes need no knowledge of S3 as such, but merely have to be able to perform standard HTTP requests for PUT, GET, HEAD and DELETE operation using signed URLs.
The RestS3Service
implements this interface
using the HttpClient library.
- Author:
- James Murty
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteObjectWithSignedUrl
(String signedDeleteUrl) Deletes an object using a pre-signed DELETE URL generated for that object.getObjectAclWithSignedUrl
(String signedAclUrl) Gets an object's ACL details using a pre-signed GET URL generated for that object.getObjectDetailsWithSignedUrl
(String signedHeadUrl) Gets an object's details using a pre-signed HEAD URL generated for that object.getObjectWithSignedUrl
(String signedGetUrl) Gets an object using a pre-signed GET URL generated for that object.void
putObjectAclWithSignedUrl
(String signedAclUrl, AccessControlList acl) Sets an object's ACL details using a pre-signed PUT URL generated for that object.putObjectWithSignedUrl
(String signedPutUrl, S3Object object) Puts an object using a pre-signed PUT URL generated for that object.
-
Method Details
-
putObjectWithSignedUrl
Puts an object using a pre-signed PUT URL generated for that object. This method is an implementation of the interfaceSignedUrlHandler
.This operation does not required any S3 functionality as it merely uploads the object by performing a standard HTTP PUT using the signed URL.
- Parameters:
signedPutUrl
- a signed PUT URL generated.object
- the object to upload, which must correspond to the object for which the URL was signed. The object must have the correct content length set, and to apply a non-standard ACL policy only the REST canned ACLs can be used (egAccessControlList.REST_CANNED_PUBLIC_READ_WRITE
).- Returns:
- the S3Object put to S3. The S3Object returned will be identical to the object provided, except that the data input stream (if any) will have been consumed.
- Throws:
ServiceException
-
deleteObjectWithSignedUrl
Deletes an object using a pre-signed DELETE URL generated for that object. This method is an implementation of the interfaceSignedUrlHandler
.This operation does not required any S3 functionality as it merely deletes the object by performing a standard HTTP DELETE using the signed URL.
- Parameters:
signedDeleteUrl
- a signed DELETE URL.- Throws:
ServiceException
-
getObjectWithSignedUrl
Gets an object using a pre-signed GET URL generated for that object. This method is an implementation of the interfaceSignedUrlHandler
.This operation does not required any S3 functionality as it merely uploads the object by performing a standard HTTP GET using the signed URL.
- Parameters:
signedGetUrl
- a signed GET URL.- Returns:
- the S3Object in S3 including all metadata and the object's data input stream.
- Throws:
ServiceException
-
getObjectDetailsWithSignedUrl
Gets an object's details using a pre-signed HEAD URL generated for that object. This method is an implementation of the interfaceSignedUrlHandler
.This operation does not required any S3 functionality as it merely uploads the object by performing a standard HTTP HEAD using the signed URL.
- Parameters:
signedHeadUrl
- a signed HEAD URL.- Returns:
- the S3Object in S3 including all metadata, but without the object's data input stream.
- Throws:
ServiceException
-
getObjectAclWithSignedUrl
Gets an object's ACL details using a pre-signed GET URL generated for that object. This method is an implementation of the interfaceSignedUrlHandler
.- Parameters:
signedAclUrl
- a signed URL.- Returns:
- the AccessControlList settings of the object in S3.
- Throws:
ServiceException
-
putObjectAclWithSignedUrl
Sets an object's ACL details using a pre-signed PUT URL generated for that object. This method is an implementation of the interfaceSignedUrlHandler
.- Parameters:
signedAclUrl
- a signed URL.acl
- the ACL settings to apply to the object represented by the signed URL.- Throws:
ServiceException
-