public class

ErrorElement

extends Object
implements ErrorContent
java.lang.Object
   ↳ com.google.gdata.util.ErrorElement

Class Overview

A mutable ErrorContent to hold structured error information.

Summary

Constants
String GOOGLE_URI_PATTERN
Fields
private String errorCodeName
private String errorDebugInfo
private String errorDomainName
private String errorExtendedHelp
private String errorInternalReason
private String errorLocation
private ErrorContent.LocationType errorLocationType
private String errorSendReport
Public Methods
String getCodeName()
Gets the name of this ErrorInfo, which must be unique within its domain.
String getDebugInfo()
Returns debugging information.
String getDomainName()
Return the error domain.
String getExtendedHelp()
Gets the extended help URI.
String getInternalReason()
Gets the internal reason (unlocalized explanation) associated with this ErrorInfo.
String getLocation()
Return the location of the error.
ErrorContent.LocationType getLocationType()
Return the type of error location.
String getSendReport()
Gets the URI to which a report should be sent when this error is received.
ErrorElement setCode(String codeName)
Set the codename.
ErrorElement setDebugInfo(String debugInfo)
Set debugging information.
ErrorElement setDomain(String domainName)
Set the domain name.
ErrorElement setExtendedHelp(String extendedHelp)
Set URI for extended help.
ErrorElement setHeaderLocation(String location)
Set header name for an error in a header.
ErrorElement setInternalReason(String internalReason)
Set the error's internal reason.
ErrorElement setLocation(String location)
Set a generic error location, using OTHER as the location type.
ErrorElement setLocation(String location, ErrorContent.LocationType locationType)
Set the location and location type.
ErrorElement setSendReport(String sendReport)
Set URI to send report to.
ErrorElement setXpathLocation(String location)
Set XPath-based error location.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gdata.util.ErrorContent

Constants

private static final String GOOGLE_URI_PATTERN

Constant Value: "http://.*google\.com/.*"

Fields

private String errorCodeName

private String errorDebugInfo

private String errorDomainName

private String errorExtendedHelp

private String errorInternalReason

private String errorLocation

private ErrorContent.LocationType errorLocationType

private String errorSendReport

Public Methods

public String getCodeName ()

Gets the name of this ErrorInfo, which must be unique within its domain. The value will appear as the content of the code element in the XML error format.

public String getDebugInfo ()

Returns debugging information.

public String getDomainName ()

Return the error domain.

public String getExtendedHelp ()

Gets the extended help URI. This can be used to retrieve a detailed explanation of the error code. The value will appear as the content of the extendedHelp element in the XML error format.

public String getInternalReason ()

Gets the internal reason (unlocalized explanation) associated with this ErrorInfo. The value will appear as the content of the internalReason element in the XML error format.

public String getLocation ()

Return the location of the error.

public ErrorContent.LocationType getLocationType ()

Return the type of error location. See ErrorContent.LocationType for the available values.

public String getSendReport ()

Gets the URI to which a report should be sent when this error is received. The value will appear as the content of the sendReport element in the XML error format.

public ErrorElement setCode (String codeName)

Set the codename.

Parameters
codeName
Throws
NullPointerException if codeName is null.

public ErrorElement setDebugInfo (String debugInfo)

Set debugging information.

Parameters
debugInfo
Throws
NullPointerException if debugInfo is null.

public ErrorElement setDomain (String domainName)

Set the domain name.

Parameters
domainName
Throws
NullPointerException if domainName is null.

public ErrorElement setExtendedHelp (String extendedHelp)

Set URI for extended help.

Parameters
extendedHelp
Throws
NullPointerException if extendedHelp is null.
IllegalArgumentException if extendedHelp isn't a valid google URI.

public ErrorElement setHeaderLocation (String location)

Set header name for an error in a header.

Parameters
location
Throws
NullPointerException if location is null.

public ErrorElement setInternalReason (String internalReason)

Set the error's internal reason.

Parameters
internalReason
Throws
NullPointerException if internalReason is null.

public ErrorElement setLocation (String location)

Set a generic error location, using OTHER as the location type.

Parameters
location
Throws
NullPointerException if location is null.

public ErrorElement setLocation (String location, ErrorContent.LocationType locationType)

Set the location and location type.

Parameters
location
locationType
Throws
NullPointerException if location or locationType are null.

public ErrorElement setSendReport (String sendReport)

Set URI to send report to.

Parameters
sendReport
Throws
NullPointerException if extendedHelp is null.
IllegalArgumentException if extendedHelp isn't a valid google URI.

public ErrorElement setXpathLocation (String location)

Set XPath-based error location.

This must be a valid XPath expression sibling to the atom:entry element (or the atom:feed element if we are not in an entry).

Parameters
location
Throws
NullPointerException if location is null.