Package com.verisign.epp.codec.gen
Class EPPExtValue
java.lang.Object
com.verisign.epp.codec.gen.EPPExtValue
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
elements that can be used to provide additional error diagnostic information,
including:
- A <value> element that identifies a client-provided element (including XML tag and value) that caused a server error condition.
- A <reason> element containing a human-readable message that describes the reason for the error. The language of the response is identified via an OPTIONAL "lang" attribute. If not specified, the default attribute value MUST be "en" (English).
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for serialization.EPPExtValue(String aReason) Allocates a newEPPExtValuewith only areasonattributes specified.EPPExtValue(String aReason, EPPValue aValue) Allocates a newEPPExtValuewith both thevalueandreasonattributes specified.EPPExtValue(String aReason, String aValue) Allocates a newEPPExtValuewith both thevalueandreasonattributes specified.EPPExtValue(String aReason, String aValue, String aPrefix, String aNamespace) Allocates a newEPPExtValuewith all attributes specified. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPExtValue.voiddecodeEPPExtValuefrom a DOM element tree.encodeEPPExtValueinto a DOM element tree.booleanimplements a deepEPPExtValuecompare.getLang()Gets the reason language.Returns the XML namespace associated with theEPPCodecComponent.Gets the human-readable message that describes the reason for the error.getValue()Gets the value element associated with the error.Gets the value elementStringassociated with the error.voidSets the reason language.voidSets the human-readable message that describes the reason for the error.voidSets the value associated with the error.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
DEFAULT_LANG
The default language of the result message "en".- See Also:
-
DEFAULT_VALUE
Default value which is used when there is only a reason and the server can not identify a single client element that caused the error.- See Also:
-
-
Constructor Details
-
EPPExtValue
public EPPExtValue()Default constructor for serialization. Thevalueandreasonattributes must be set before callingencode. -
EPPExtValue
Allocates a newEPPExtValuewith only areasonattributes specified. The value will be set to theDEFAULT_VALUEconstant, which indicates that no client element is specified. The default XML prefix and XML namespace will be used.- Parameters:
aReason- Human-readable message that describes the reason for the error.
-
EPPExtValue
Allocates a newEPPExtValuewith both thevalueandreasonattributes specified. The default XML prefix and XML namespace will be used.- Parameters:
aReason- Human-readable message that describes the reason for the error.aValue- XMLStringthat identifies a client-provided element (including XML tag and value) that caused a server error. For example, <domain:name>example.com</domain>.
-
EPPExtValue
Allocates a newEPPExtValuewith both thevalueandreasonattributes specified.- Parameters:
aReason- Human-readable message that describes the reason for the error.aValue- Value will a valueStringand XML prefix and namespace.
-
EPPExtValue
Allocates a newEPPExtValuewith all attributes specified. This is a convenience constructor in place of usingEPPExtValue(String, EPPValue).- Parameters:
aReason- Human-readable message that describes the reason for the error.aValue- XMLStringthat identifies a client-provided element (including XML tag and value) that caused a server error. For example, <domain:name>example.com</domain>.aPrefix- XML Namespace prefix. For example, "domain" or "epp".aNamespace- XML Namespace URI. For example, "urn:ietf:params:xml:ns:domain-1.0".
-
-
Method Details
-
getValue
Gets the value element associated with the error.- Returns:
- The value object that includes the XML value with prefix and namespace.
-
setValue
Sets the value associated with the error.- Parameters:
aValue- The value object that includes the XML value with prefix and namespace.
-
getValueStr
Gets the value elementStringassociated with the error.- Returns:
- Contained
EPPValue Stringvalue if defined;nullotherwise.
-
getReason
Gets the human-readable message that describes the reason for the error. The language defaults toDEFAULT_LANG, but the value can be retrieved with thegetLangmethod.- Returns:
- the human-readable message that describes the reason for the error.
-
setReason
Sets the human-readable message that describes the reason for the error. The language defaults toDEFAULT_LANG, but can be set with thesetLangmethod.- Parameters:
aReason- Human-readable message that describes the reason for the error.
-
getLang
Gets the reason language. The Language must be structured as documented in [RFC1766].- Returns:
- Language of the reason.
-
setLang
Sets the reason language. The Language must be structured as documented in [RFC1766].- Parameters:
aLang- Language of the reason.
-
encode
encodeEPPExtValueinto a DOM element tree.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOCUMENT ME!- Returns:
- <extValue> root element tree.
- Throws:
EPPEncodeException- Error encoding the DOM element tree.
-
decode
decodeEPPExtValuefrom a DOM element tree. TheaElementargument needs to be the "extValue" element.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- The "extValue" XML element.- Throws:
EPPDecodeException- Error decoding the DOM element tree.
-
equals
implements a deepEPPExtValuecompare. -
clone
CloneEPPExtValue.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- Deep copy clone of
EPPExtValue - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-