# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.batch
Class BatchStatus

    java.lang.Object
      com.google.gdata.data.AbstractExtension
          com.google.gdata.data.ExtensionPoint
              com.google.gdata.data.batch.BatchStatus

All Implemented Interfaces:
  IBatchStatus, Extension

    public class BatchStatus

extends ExtensionPoint
implements Extension, IBatchStatus

Entry extension for the element `<batch:status>`, which contains status information returned by the server about how an entry was processed in a batch operation.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
`ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler`

Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
`AbstractExtension.AttributesHandler`

Field Summary

Fields inherited from class com.google.gdata.data.ExtensionPoint
`xmlBlob`

Fields inherited from class com.google.gdata.data.AbstractExtension
`localName, namespace`

Constructor Summary
`BatchStatus()` Creates an empty BatchStatus.
`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.
`void` `generate(com.google.gdata.util.common.xml.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.

Methods inherited from class com.google.gdata.data.ExtensionPoint

`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, visitChildren`

Methods inherited from class com.google.gdata.data.AbstractExtension
`consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BatchStatus

    public BatchStatus()

  Creates an empty BatchStatus.

### BatchStatus

    public BatchStatus(ServiceException e)

  Creates a BatchStatus and initializes it based on an exception.

  Parameters:
    `e` -

Method Detail

### createSuccessStatus

    public static BatchStatus createSuccessStatus()

  Creates a 200 Success status object.

### createCreatedStatus

    public static BatchStatus createCreatedStatus()

  Creates a Success status object.

### getDefaultDescription

    public static ExtensionDescription getDefaultDescription()

  Returns the suggested extension description.

### getCode

    public int getCode()

  Returns the HTTP response code for this status.

  Specified by:
    `getCode` in interface `IBatchStatus`
  Returns:
    the status code.

### setCode

    public void setCode(int code)

  Sets HTTP response code.

### getReason

    public java.lang.String getReason()

  Returns a short message describing this status.

  Specified by:
    `getReason` in interface `IBatchStatus`
  Returns:
    the reason for the status.

### setReason

    public void setReason(java.lang.String reason)

  Sets a short message describing this status.

### getContentType

    public ContentType getContentType()

  Gets mime type for the content of this error.

  Specified by:
    `getContentType` in interface `IBatchStatus`
  Returns:
    the content type of the element.

### setContentType

    public void setContentType(ContentType contentType)

  Sets mime type for the content of this error.

### getContent

    public java.lang.String getContent()

  Gets error message.

  Specified by:
    `getContent` in interface `IBatchStatus`
  Returns:
    the content of the element.

### setContent

    public void setContent(java.lang.String content)

  Sets error message. Its type must correspond to the content type.

### generate

    public void generate(com.google.gdata.util.common.xml.XmlWriter w,
                         ExtensionProfile extProfile)
                  throws java.io.IOException

  Generate an Atom XML representation of the current object.

  Specified by:
    `generate` in interface `Extension`
  Overrides:
    `generate` in class `AbstractExtension`
  Parameters:
    `w` - XML writer
    `extProfile` - extension profile
  Throws:
    `java.io.IOException`

### getHandler

    public XmlParser.ElementHandler getHandler(ExtensionProfile extProfile,
                                               java.lang.String namespace,
                                               java.lang.String localName,
                                               org.xml.sax.Attributes attrs)
                                        throws ParseException

  Parses XML in the Atom format and uses it to set field values.

  Specified by:
    `getHandler` in interface `Extension`
  Overrides:
    `getHandler` in class `ExtensionPoint`
  Parameters:
    `extProfile` -
    `namespace` -
    `localName` -
    `attrs` - XML attributes
  Returns:
    a child handler for batch:atom
  Throws:
    `ParseException` - if the current element is not a valid batch:atom element