public class Result
extends java.lang.Object
implements java.io.Serializable
One or moreSee getX method descriptions for a description of the elements of a Result. Note that any DOM Node fields will not be serialized.<result>
elements [...] document the success or failure of command execution. If the command was processed successfully, only one<result>
element MUST be returned. If the command was not processed successfully, multiple<result>
elements MAY be returned to document failure conditions. Each<result>
element contains the following attribute and child elements.
Modifier and Type | Method and Description |
---|---|
int |
getResultCode()
The code attribute of a result.
|
java.lang.String |
getResultExtReason(int nodeIndex)
Return the text content of the resultValue element at the specified index.
|
java.lang.String[] |
getResultExtValueReason()
The reason child elements of the extValue element of a result.
|
org.w3c.dom.Node[] |
getResultExtValueValue()
The value child elements of the extValue element of a result.
|
java.lang.String |
getResultMessage()
The msg element of a result.
|
java.lang.String |
getResultMessageLanguage()
The lang attribute of the msg element of a result.
|
org.w3c.dom.NodeList |
getResultValue()
The value elements of a result.
|
java.lang.String[] |
getValuesAsText() |
boolean |
hasResultExtReasons()
Indicate whether the result has any extValue/reason elements.
|
boolean |
hasResultValues()
Indicate whether the result has any resultValue elements.
|
boolean |
succeeded()
Whether the associated command succeeded or not.
|
java.lang.String |
toString() |
public int getResultCode()
A "code" attribute whose value is a four-digit, decimal number that describes the success or failure of the command.
public java.lang.String getResultMessage()
A <msg>
element containing a human-readable
description of the response code.
public java.lang.String getResultMessageLanguage()
The language of the response is identified via an OPTIONAL "lang" attribute. If not specified, the default attribute value MUST be "en" (English).
public org.w3c.dom.Node[] getResultExtValueValue()
Zero or more OPTIONAL<extValue>
elements that can be used to provide additional error diagnostic information, including:
- A @{code <value>} element that identifies a client-provided element (including XML tag and value) that caused a server error condition.
public java.lang.String[] getResultExtValueReason()
Zero or more OPTIONALTODO provide interface to get language of each reason.<extValue>
elements that can be used to provide additional error diagnostic information, including:
- A<reason>
element containing a human-readable message that describes the reason for the error.
public java.lang.String[] getValuesAsText()
public boolean hasResultValues()
public boolean hasResultExtReasons()
public org.w3c.dom.NodeList getResultValue()
Zero or more OPTIONAL <value>
elements that
identify a client-provided element (including XML tag and value) that caused a server error condition.
public java.lang.String getResultExtReason(int nodeIndex)
public boolean succeeded()
public java.lang.String toString()
toString
in class java.lang.Object