public class

BatchStatus

extends Element
implements IBatchStatus
java.lang.Object
   ↳ com.google.gdata.model.Element
     ↳ com.google.gdata.model.batch.BatchStatus

Class Overview

Describes server status information about how an entry was processed in a batch operation.

Summary

Fields
public static final AttributeKey<Integer> CODE The HTTP response code.
public static final AttributeKey<ContentType> CONTENT_TYPE The MIME type for the content of the error message contained in this element.
public static final ElementKey<String, BatchStatus> KEY The key for this element.
public static final AttributeKey<String> REASON The short message describing this status.
[Expand]
Inherited Fields
From class com.google.gdata.model.Element
Public Constructors
BatchStatus()
Default mutable constructor.
BatchStatus(ServiceException e)
Creates a BatchStatus and initializes it based on an exception.
Public Methods
static BatchStatus createCreatedStatus()
Creates a Success status object.
static BatchStatus createSuccessStatus()
Creates a 200 Success status object.
boolean equals(Object obj)
int getCode()
Returns the HTTP response code.
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.
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.
boolean hasReason()
Returns whether it has the short message describing this status.
int hashCode()
static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
BatchStatus setCode(Integer code)
Sets the HTTP response code.
BatchStatus setContent(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(String reason)
Sets the short message describing this status.
String toString()
[Expand]
Inherited Methods
From class com.google.gdata.model.Element
From class java.lang.Object
From interface com.google.gdata.data.batch.IBatchStatus

Fields

public static final AttributeKey<Integer> CODE

The HTTP response code.

public static final AttributeKey<ContentType> CONTENT_TYPE

The MIME type for the content of the error message contained in this element.

public static final ElementKey<String, BatchStatus> KEY

The key for this element.

public static final AttributeKey<String> REASON

The short message describing this status.

Public Constructors

public BatchStatus ()

Default mutable constructor.

public BatchStatus (ServiceException e)

Creates a BatchStatus and initializes it based on an exception.

Parameters
e Exception to initialize the status from

Public Methods

public static BatchStatus createCreatedStatus ()

Creates a Success status object.

public static BatchStatus createSuccessStatus ()

Creates a 200 Success status object.

public boolean equals (Object obj)

Parameters
obj

public int getCode ()

Returns the HTTP response code.

Returns
  • HTTP response code

public String getContent ()

Returns the error message explaining what went wrong while processing the request.

Returns
  • error message explaining what went wrong while processing the request

public ContentType getContentType ()

Returns the MIME type for the content of the error message contained in this element.

Returns
  • MIME type for the content of the error message contained in this element

public String getReason ()

Returns the short message describing this status.

Returns
  • short message describing this status

public boolean hasCode ()

Returns whether it has the HTTP response code.

Returns
  • whether it has the HTTP response code

public boolean hasContent ()

Returns whether it has the error message explaining what went wrong while processing the request.

Returns
  • whether it has the error message explaining what went wrong while processing the request

public boolean hasContentType ()

Returns whether it has the MIME type for the content of the error message contained in this element.

Returns
  • whether it has the MIME type for the content of the error message contained in this element

public boolean hasReason ()

Returns whether it has the short message describing this status.

Returns
  • whether it has the short message describing this status

public int hashCode ()

public static void registerMetadata (MetadataRegistry registry)

Registers the metadata for this element.

Parameters
registry

public BatchStatus setCode (Integer code)

Sets the HTTP response code.

Parameters
code HTTP response code or null to reset

public BatchStatus setContent (String content)

Sets the error message explaining what went wrong while processing the request.

Parameters
content Error message explaining what went wrong while processing the request or null to reset

public BatchStatus setContentType (ContentType contentType)

Sets the MIME type for the content of the error message contained in this element.

Parameters
contentType MIME type for the content of the error message contained in this element or null to reset

public BatchStatus setReason (String reason)

Sets the short message describing this status.

Parameters
reason Short message describing this status or null to reset

public String toString ()