T - Represents the implementation type. Allows a consistent builder interface throughout the request
hierarchy. Parameterize concrete subclasses with their own type and implement ObjectRequest.me() to return
"this". In abstract subclasses, return me() in builder methods.public abstract class PutObjectRequest<T extends PutObjectRequest<T>> extends ObjectRequest<T> implements ContentRequest
| Modifier and Type | Field and Description |
|---|---|
protected Acl |
acl |
protected java.lang.Object |
content |
protected long |
contentLength |
protected java.lang.String |
contentType |
protected java.lang.Long |
retentionPeriod |
protected java.lang.String |
retentionPolicy |
protected java.util.Map<java.lang.String,Metadata> |
userMetadata |
protected ChecksumValue |
wsChecksum |
identifier| Constructor and Description |
|---|
PutObjectRequest() |
| Modifier and Type | Method and Description |
|---|---|
T |
acl(Acl acl)
Builder method for
setAcl(com.emc.atmos.api.Acl) |
T |
content(java.lang.Object content)
Builder method for
setContent(Object) |
T |
contentLength(long contentLength)
Builder method for
setContentLength(long) |
T |
contentType(java.lang.String contentType)
Builder method for
setContentType(String) |
java.util.Map<java.lang.String,java.util.List<java.lang.Object>> |
generateHeaders(boolean encodeUtf8)
Returns the HTTP headers to send in this request, to be generated from other request properties immediately
before sending.
|
Acl |
getAcl()
Returns the ACL to assign to the object.
|
java.lang.Object |
getContent()
Returns the object content for this request.
|
long |
getContentLength()
Returns the content-length (byte size) for this request.
|
java.lang.String |
getContentType()
Returns the content-type for this request.
|
java.lang.Long |
getRetentionPeriod()
Note: this feature is only available on ECS 2.2+
|
java.lang.String |
getRetentionPolicy()
Note: this feature is only available on ECS 2.2+
|
ChecksumAlgorithm |
getServerGeneratedChecksumAlgorithm()
Gets the algorithm the Atmos server should use to generate a checksum for the content in this request.
|
java.util.Set<Metadata> |
getUserMetadata()
Returns the user metadata to assign to the object.
|
ChecksumValue |
getWsChecksum()
Returns the ws-checksum value to use in this request.
|
T |
retentionPeriod(java.lang.Long retentionPeriod)
Note: this feature is only available on ECS 2.2+
|
T |
retentionPolicy(java.lang.String retentionPolicy)
Note: this feature is only available on ECS 2.2+
|
T |
serverGeneratedChecksumAlgorithm(ChecksumAlgorithm serverGeneratedChecksumAlgorithm)
Builder method for
setServerGeneratedChecksumAlgorithm(com.emc.atmos.api.ChecksumAlgorithm) |
void |
setAcl(Acl acl)
Sets the ACL to assign to the object.
|
void |
setContent(java.lang.Object content)
Sets the object content for this request.
|
void |
setContentLength(long contentLength)
Sets the content-length (byte size) of the object content.
|
void |
setContentType(java.lang.String contentType)
Sets the content-type for this request.
|
void |
setRetentionPeriod(java.lang.Long retentionPeriod)
Note: this feature is only available on ECS 2.2+
|
void |
setRetentionPolicy(java.lang.String retentionPolicy)
Note: this feature is only available on ECS 2.2+
|
void |
setServerGeneratedChecksumAlgorithm(ChecksumAlgorithm serverGeneratedChecksumAlgorithm)
Sets the algorithm the Atmos server should use to generate a checksum for the content in this request.
|
void |
setUserMetadata(java.util.Collection<Metadata> userMetadata)
Sets the user metadata to assign to the object.
|
void |
setWsChecksum(ChecksumValue wsChecksum)
Sets the ws-checksum value to use for this request.
|
boolean |
supports100Continue()
Non-directory object writes support the Expect: 100-continue feature.
|
T |
userMetadata(Metadata... userMetadata)
Builder method for
setUserMetadata(java.util.Collection) |
T |
wsChecksum(ChecksumValue wsChecksum)
Builder method for
setWsChecksum(com.emc.atmos.api.ChecksumValue) |
getIdentifier, identifier, me, setIdentifiergetMethod, getQuery, getServiceRelativePathprotected java.lang.Object content
protected long contentLength
protected java.lang.String contentType
protected Acl acl
protected java.util.Map<java.lang.String,Metadata> userMetadata
protected java.lang.Long retentionPeriod
protected java.lang.String retentionPolicy
protected ChecksumValue wsChecksum
public java.util.Map<java.lang.String,java.util.List<java.lang.Object>> generateHeaders(boolean encodeUtf8)
RequestgenerateHeaders in class ObjectRequest<T extends PutObjectRequest<T>>public boolean supports100Continue()
supports100Continue in class Requestpublic T content(java.lang.Object content)
setContent(Object)public T contentLength(long contentLength)
setContentLength(long)public T contentType(java.lang.String contentType)
setContentType(String)public T acl(Acl acl)
setAcl(com.emc.atmos.api.Acl)public T userMetadata(Metadata... userMetadata)
setUserMetadata(java.util.Collection)public T retentionPeriod(java.lang.Long retentionPeriod)
public T retentionPolicy(java.lang.String retentionPolicy)
public T wsChecksum(ChecksumValue wsChecksum)
setWsChecksum(com.emc.atmos.api.ChecksumValue)public T serverGeneratedChecksumAlgorithm(ChecksumAlgorithm serverGeneratedChecksumAlgorithm)
setServerGeneratedChecksumAlgorithm(com.emc.atmos.api.ChecksumAlgorithm)public java.lang.Object getContent()
getContent in interface ContentRequestpublic long getContentLength()
getContentLength in interface ContentRequestpublic java.lang.String getContentType()
getContentType in interface ContentRequestpublic Acl getAcl()
public java.util.Set<Metadata> getUserMetadata()
public java.lang.Long getRetentionPeriod()
public java.lang.String getRetentionPolicy()
public ChecksumValue getWsChecksum()
public ChecksumAlgorithm getServerGeneratedChecksumAlgorithm()
public void setContent(java.lang.Object content)
public void setContentLength(long contentLength)
public void setContentType(java.lang.String contentType)
public void setAcl(Acl acl)
public void setUserMetadata(java.util.Collection<Metadata> userMetadata)
AtmosApi.deleteUserMetadata(com.emc.atmos.api.ObjectIdentifier,
String...) to remove metadata from an object.public void setRetentionPeriod(java.lang.Long retentionPeriod)
public void setRetentionPolicy(java.lang.String retentionPolicy)
public void setWsChecksum(ChecksumValue wsChecksum)
ChecksumValue,
RunningChecksumpublic void setServerGeneratedChecksumAlgorithm(ChecksumAlgorithm serverGeneratedChecksumAlgorithm)