public class ErrorElement extends Object implements ErrorContent
ErrorContent to hold structured error information.ErrorContent.LocationType| Modifier and Type | Method and Description |
|---|---|
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
ErrorContent.LocationType.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.
|
public String getDomainName()
getDomainName in interface ErrorContentpublic ErrorElement setDomain(String domainName)
NullPointerException - if domainName is null.public String getCodeName()
code
element in the XML error format.getCodeName in interface ErrorContentpublic ErrorElement setCode(String codeName)
NullPointerException - if codeName is null.public String getLocation()
getLocation in interface ErrorContentpublic ErrorContent.LocationType getLocationType()
ErrorContent.LocationType
for the available values.getLocationType in interface ErrorContentpublic ErrorElement setXpathLocation(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).
NullPointerException - if location is null.public ErrorElement setHeaderLocation(String location)
NullPointerException - if location is null.public ErrorElement setLocation(String location)
ErrorContent.LocationType.OTHER
as the location type.NullPointerException - if location is null.public ErrorElement setLocation(String location, ErrorContent.LocationType locationType)
NullPointerException - if location or locationType
are null.public String getInternalReason()
internalReason element in the XML error format.getInternalReason in interface ErrorContentpublic ErrorElement setInternalReason(String internalReason)
NullPointerException - if internalReason is null.public String getExtendedHelp()
extendedHelp element in the XML
error format.getExtendedHelp in interface ErrorContentpublic ErrorElement setExtendedHelp(String extendedHelp)
NullPointerException - if extendedHelp is null.IllegalArgumentException - if extendedHelp isn't a valid
google URI.public String getSendReport()
sendReport element in the XML error format.getSendReport in interface ErrorContentpublic ErrorElement setSendReport(String sendReport)
NullPointerException - if extendedHelp is null.IllegalArgumentException - if extendedHelp isn't a valid
google URI.public String getDebugInfo()
getDebugInfo in interface ErrorContentpublic ErrorElement setDebugInfo(String debugInfo)
NullPointerException - if debugInfo is null.Copyright © 2012. All Rights Reserved.