|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.model.Element
com.google.gdata.model.batch.BatchStatus
public class BatchStatus
Describes server status information about how an entry was processed in a batch operation.
Field Summary | |
---|---|
static AttributeKey<java.lang.Integer> |
CODE
The HTTP response code. |
static AttributeKey<ContentType> |
CONTENT_TYPE
The MIME type for the content of the error message contained in this element. |
static ElementKey<java.lang.String,BatchStatus> |
KEY
The key for this element. |
static AttributeKey<java.lang.String> |
REASON
The short message describing this status. |
Constructor Summary | |
---|---|
BatchStatus()
Default mutable constructor. |
|
BatchStatus(ServiceException e)
Creates a BatchStatus and initializes it based on an exception. |
Method Summary | |
---|---|
static BatchStatus |
createCreatedStatus()
Creates a Success status object. |
static BatchStatus |
createSuccessStatus()
Creates a 200 Success status object. |
boolean |
equals(java.lang.Object obj)
|
int |
getCode()
Returns the HTTP response code. |
java.lang.String |
getContent()
Returns the error message explaining what went wrong while processing the request. |
ContentType |
getContentType()
Returns the MIME type for the content of the error message contained in this element. |
java.lang.String |
getReason()
Returns the short message describing this status. |
boolean |
hasCode()
Returns whether it has the HTTP response code. |
boolean |
hasContent()
Returns whether it has the error message explaining what went wrong while processing the request. |
boolean |
hasContentType()
Returns whether it has the MIME type for the content of the error message contained in this element. |
int |
hashCode()
|
boolean |
hasReason()
Returns whether it has the short message describing this status. |
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element. |
BatchStatus |
setCode(java.lang.Integer code)
Sets the HTTP response code. |
BatchStatus |
setContent(java.lang.String content)
Sets the error message explaining what went wrong while processing the request. |
BatchStatus |
setContentType(ContentType contentType)
Sets the MIME type for the content of the error message contained in this element. |
BatchStatus |
setReason(java.lang.String reason)
Sets the short message describing this status. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ElementKey<java.lang.String,BatchStatus> KEY
public static final AttributeKey<java.lang.Integer> CODE
public static final AttributeKey<ContentType> CONTENT_TYPE
public static final AttributeKey<java.lang.String> REASON
Constructor Detail |
---|
public BatchStatus()
public BatchStatus(ServiceException e)
e
- exception to initialize the status fromMethod Detail |
---|
public static void registerMetadata(MetadataRegistry registry)
public static BatchStatus createSuccessStatus()
public static BatchStatus createCreatedStatus()
public int getCode()
getCode
in interface IBatchStatus
public BatchStatus setCode(java.lang.Integer code)
code
- HTTP response code or null
to resetpublic boolean hasCode()
public java.lang.String getContent()
getContent
in interface IBatchStatus
public BatchStatus setContent(java.lang.String content)
content
- error message explaining what went wrong while processing
the request or null
to resetpublic boolean hasContent()
public ContentType getContentType()
getContentType
in interface IBatchStatus
public BatchStatus setContentType(ContentType contentType)
contentType
- MIME type for the content of the error message contained
in this element or null
to resetpublic boolean hasContentType()
public java.lang.String getReason()
getReason
in interface IBatchStatus
public BatchStatus setReason(java.lang.String reason)
reason
- short message describing this status or null
to
resetpublic boolean hasReason()
public boolean equals(java.lang.Object obj)
equals
in class Element
public int hashCode()
hashCode
in class Element
public java.lang.String toString()
toString
in class Element
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |