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.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()
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.
|
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 |
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 |
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, setIdentifier
getMethod, getQuery, getServiceRelativePath
protected 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 ChecksumValue wsChecksum
public java.util.Map<java.lang.String,java.util.List<java.lang.Object>> generateHeaders()
Request
generateHeaders
in class ObjectRequest<T extends PutObjectRequest<T>>
public boolean supports100Continue()
supports100Continue
in class Request
public 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 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 ContentRequest
public long getContentLength()
getContentLength
in interface ContentRequest
public java.lang.String getContentType()
getContentType
in interface ContentRequest
public Acl getAcl()
public java.util.Set<Metadata> getUserMetadata()
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 setWsChecksum(ChecksumValue wsChecksum)
ChecksumValue
,
RunningChecksum
public void setServerGeneratedChecksumAlgorithm(ChecksumAlgorithm serverGeneratedChecksumAlgorithm)