public class BatchStatus extends ExtensionPoint implements Extension, IBatchStatus
<batch:status>, which contains
status information returned by the server about how an entry was processed
in a batch operation.ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandlerAbstractExtension.AttributesHandlerxmlBloblocalName, namespace| Constructor and Description |
|---|
BatchStatus()
Creates an empty BatchStatus.
|
BatchStatus(ServiceException e)
Creates a BatchStatus and initializes it
based on an exception.
|
| Modifier and Type | Method and Description |
|---|---|
static BatchStatus |
createCreatedStatus()
Creates a Success status object.
|
static BatchStatus |
createSuccessStatus()
Creates a 200 Success status object.
|
void |
generate(XmlWriter w,
ExtensionProfile extProfile)
Generate an Atom XML representation of the current object.
|
int |
getCode()
Returns the HTTP response code for this status.
|
java.lang.String |
getContent()
Gets error message.
|
ContentType |
getContentType()
Gets mime type for the content of this error.
|
static ExtensionDescription |
getDefaultDescription()
Returns the suggested extension description.
|
XmlParser.ElementHandler |
getHandler(ExtensionProfile extProfile,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
Parses XML in the Atom format and uses it to set field values.
|
java.lang.String |
getReason()
Returns a short message describing this status.
|
void |
setCode(int code)
Sets HTTP response code.
|
void |
setContent(java.lang.String content)
Sets error message.
|
void |
setContentType(ContentType contentType)
Sets mime type for the content of this error.
|
void |
setReason(java.lang.String reason)
Sets a short message describing this status.
|
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, declareExtensions, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild, visitChildrenconsumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validatepublic BatchStatus()
public BatchStatus(ServiceException e)
e - public static BatchStatus createSuccessStatus()
public static BatchStatus createCreatedStatus()
public static ExtensionDescription getDefaultDescription()
public int getCode()
getCode in interface IBatchStatuspublic void setCode(int code)
public java.lang.String getReason()
getReason in interface IBatchStatuspublic void setReason(java.lang.String reason)
public ContentType getContentType()
getContentType in interface IBatchStatuspublic void setContentType(ContentType contentType)
public java.lang.String getContent()
getContent in interface IBatchStatuspublic void setContent(java.lang.String content)
public void generate(XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
generate in interface Extensiongenerate in class AbstractExtensionw - XML writerextProfile - extension profilejava.io.IOExceptionpublic XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs) throws ParseException
getHandler in interface ExtensiongetHandler in class ExtensionPointextProfile - namespace - localName - attrs - XML attributesParseException - if the current element is not a valid
batch:atom element