public class ErrorElement extends java.lang.Object implements ErrorContent
ErrorContent to hold structured error information.ErrorContent.LocationType| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCodeName()
Gets the name of this ErrorInfo, which must be unique within
its domain.
|
java.lang.String |
getDebugInfo()
Returns debugging information.
|
java.lang.String |
getDomainName()
Return the error domain.
|
java.lang.String |
getExtendedHelp()
Gets the extended help URI.
|
java.lang.String |
getInternalReason()
Gets the internal reason (unlocalized explanation) associated with this
ErrorInfo.
|
java.lang.String |
getLocation()
Return the location of the error.
|
ErrorContent.LocationType |
getLocationType()
Return the type of error location.
|
java.lang.String |
getSendReport()
Gets the URI to which a report should be sent when this error
is received.
|
ErrorElement |
setCode(java.lang.String codeName)
Set the codename.
|
ErrorElement |
setDebugInfo(java.lang.String debugInfo)
Set debugging information.
|
ErrorElement |
setDomain(java.lang.String domainName)
Set the domain name.
|
ErrorElement |
setExtendedHelp(java.lang.String extendedHelp)
Set URI for extended help.
|
ErrorElement |
setHeaderLocation(java.lang.String location)
Set header name for an error in a header.
|
ErrorElement |
setInternalReason(java.lang.String internalReason)
Set the error's internal reason.
|
ErrorElement |
setLocation(java.lang.String location)
Set a generic error location, using
ErrorContent.LocationType.OTHER
as the location type. |
ErrorElement |
setLocation(java.lang.String location,
ErrorContent.LocationType locationType)
Set the location and location type.
|
ErrorElement |
setSendReport(java.lang.String sendReport)
Set URI to send report to.
|
ErrorElement |
setXpathLocation(java.lang.String location)
Set XPath-based error location.
|
public java.lang.String getDomainName()
getDomainName in interface ErrorContentpublic ErrorElement setDomain(java.lang.String domainName)
java.lang.NullPointerException - if domainName is null.public java.lang.String getCodeName()
code
element in the XML error format.getCodeName in interface ErrorContentpublic ErrorElement setCode(java.lang.String codeName)
java.lang.NullPointerException - if codeName is null.public java.lang.String getLocation()
getLocation in interface ErrorContentpublic ErrorContent.LocationType getLocationType()
ErrorContent.LocationType
for the available values.getLocationType in interface ErrorContentpublic ErrorElement setXpathLocation(java.lang.String 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).
java.lang.NullPointerException - if location is null.public ErrorElement setHeaderLocation(java.lang.String location)
java.lang.NullPointerException - if location is null.public ErrorElement setLocation(java.lang.String location)
ErrorContent.LocationType.OTHER
as the location type.java.lang.NullPointerException - if location is null.public ErrorElement setLocation(java.lang.String location, ErrorContent.LocationType locationType)
java.lang.NullPointerException - if location or locationType
are null.public java.lang.String getInternalReason()
internalReason element in the XML error format.getInternalReason in interface ErrorContentpublic ErrorElement setInternalReason(java.lang.String internalReason)
java.lang.NullPointerException - if internalReason is null.public java.lang.String getExtendedHelp()
extendedHelp element in the XML
error format.getExtendedHelp in interface ErrorContentpublic ErrorElement setExtendedHelp(java.lang.String extendedHelp)
java.lang.NullPointerException - if extendedHelp is null.java.lang.IllegalArgumentException - if extendedHelp isn't a valid
google URI.public java.lang.String getSendReport()
sendReport element in the XML error format.getSendReport in interface ErrorContentpublic ErrorElement setSendReport(java.lang.String sendReport)
java.lang.NullPointerException - if extendedHelp is null.java.lang.IllegalArgumentException - if extendedHelp isn't a valid
google URI.public java.lang.String getDebugInfo()
getDebugInfo in interface ErrorContentpublic ErrorElement setDebugInfo(java.lang.String debugInfo)
java.lang.NullPointerException - if debugInfo is null.