Package org.jclouds.s3.options
Class PutObjectOptions
- java.lang.Object
-
- org.jclouds.http.options.BaseHttpRequestOptions
-
- org.jclouds.s3.options.PutObjectOptions
-
- All Implemented Interfaces:
HttpRequestOptions
- Direct Known Subclasses:
AWSS3PutObjectOptions
public class PutObjectOptions extends BaseHttpRequestOptions
Contains options supported in the REST API for the PUT object operation.Usage
The recommended way to instantiate a PutObjectOptions object is to statically import PutObjectOptions.Builder.* and invoke a static creation method followed by an instance mutator (if needed):import static org.jclouds.s3.commands.options.PutObjectOptions.Builder.* import org.jclouds.s3.S3Client; S3Client connection = // get connection boolean publiclyReadable = connection.putObject("bucketName",new S3Object("key","value"), withAcl(CannedAccessPolicy.PUBLIC_READ));
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PutObjectOptions.Builder
-
Field Summary
Fields Modifier and Type Field Description static PutObjectOptions
NONE
-
Fields inherited from class org.jclouds.http.options.BaseHttpRequestOptions
formParameters, headers, pathSuffix, payload, queryParameters
-
-
Constructor Summary
Constructors Constructor Description PutObjectOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.Multimap<String,String>
buildRequestHeaders()
Builds headers representing options.CannedAccessPolicy
getAcl()
void
setHeaderTag(String headerTag)
PutObjectOptions
withAcl(CannedAccessPolicy acl)
Override the default ACL (private) with the specified one.-
Methods inherited from class org.jclouds.http.options.BaseHttpRequestOptions
buildFormParameters, buildPathSuffix, buildQueryParameters, buildStringPayload, equals, getFirstFormOrNull, getFirstHeaderOrNull, getFirstQueryOrNull, hashCode, replaceHeader, toString
-
-
-
-
Field Detail
-
NONE
public static final PutObjectOptions NONE
-
-
Method Detail
-
setHeaderTag
@Inject public void setHeaderTag(@Named("jclouds.aws.header.tag") String headerTag)
-
buildRequestHeaders
public com.google.common.collect.Multimap<String,String> buildRequestHeaders()
Description copied from class:BaseHttpRequestOptions
Builds headers representing options.- Specified by:
buildRequestHeaders
in interfaceHttpRequestOptions
- Overrides:
buildRequestHeaders
in classBaseHttpRequestOptions
- Returns:
- multimap that may contain headers.
-
withAcl
public PutObjectOptions withAcl(CannedAccessPolicy acl)
Override the default ACL (private) with the specified one.- See Also:
CannedAccessPolicy
-
getAcl
public CannedAccessPolicy getAcl()
- See Also:
withAcl(CannedAccessPolicy)
-
-