public class ErrorDomain.ErrorCode extends java.lang.Object implements ErrorContent
An ErrorCode is immutable. The withInternalReason(String),
withExtendedHelp(String), and withSendReport(String)
methods can be used to create new ErrorCodes as modified versions of
existing ones.
ErrorContent.LocationType| Constructor and Description |
|---|
ErrorDomain.ErrorCode(java.lang.String codeName)
Construct a new error code with the given code name.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCodeName()
Gets the name of this ErrorCode, which must be unique within its domain.
|
java.lang.String |
getDebugInfo()
Returns debugging information.
|
java.lang.String |
getDomainName()
Retrieve the name of the domain of this ErrorCode.
|
java.lang.String |
getExtendedHelp()
Gets the extended help URI.
|
java.lang.String |
getInternalReason()
Gets the internal reason (unlocalized explanation) associated with this
ErrorCode.
|
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.
|
ErrorDomain.ErrorCode |
setInternalReason(java.lang.String newInternalReason)
Deprecated.
Use
withInternalReason(String) instead. |
ErrorDomain.ErrorCode |
withExtendedHelp(java.lang.String newExtendedHelp)
Returns a copy of this ErrorCode with the given extended help URI set.
|
ErrorDomain.ErrorCode |
withInternalReason(java.lang.String newInternalReason)
Returns a copy of this ErrorCode with the given internal reason
(un-internationalized explanation) set.
|
ErrorDomain.ErrorCode |
withSendReport(java.lang.String newSendReport)
Returns a copy of this ErrorCode with the given send report URI set.
|
public ErrorDomain.ErrorCode(java.lang.String codeName)
codeName - the codename of this error code, must not be null.public java.lang.String getDomainName()
getDomainName in interface ErrorContentpublic java.lang.String getCodeName()
code element in the
XML error format.getCodeName in interface ErrorContentpublic java.lang.String getInternalReason()
internalReason element in the XML error format.getInternalReason in interface ErrorContent@Deprecated public ErrorDomain.ErrorCode setInternalReason(java.lang.String newInternalReason)
withInternalReason(String) instead.public ErrorDomain.ErrorCode withInternalReason(java.lang.String newInternalReason)
internalReason element in the XML error format.public java.lang.String getExtendedHelp()
extendedHelp element in the XML
error format.getExtendedHelp in interface ErrorContentpublic ErrorDomain.ErrorCode withExtendedHelp(java.lang.String newExtendedHelp)
extendedHelp element
in the XML error format.public java.lang.String getSendReport()
sendReport element in the XML error format.getSendReport in interface ErrorContentpublic ErrorDomain.ErrorCode withSendReport(java.lang.String newSendReport)
sendReport element in the XML error format.public java.lang.String getLocation()
ErrorContentgetLocation in interface ErrorContentpublic ErrorContent.LocationType getLocationType()
ErrorContentErrorContent.LocationType for the
available values.getLocationType in interface ErrorContentpublic java.lang.String getDebugInfo()
ErrorContentgetDebugInfo in interface ErrorContent