Package com.verisign.epp.codec.gen
Class EPPValue
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPValue
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPValue extends java.lang.Object implements EPPCodecComponent
Identifies a client-provided element (including XML tag and value) that caused a server error condition. The value can reference to the namespace URI and namespace prefix for encoding the value. TheString
value needs to be set using XML with the specified namespace prefix. For example, the URI could be "urn:ietf:params:xml:ns:domain-1.0", the prefix could be "domain", and the value could be <domain:name>example.com</domain:name>.- See Also:
EPPResult
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EPPValue()
Default constructor for serialization.EPPValue(java.lang.String aValue)
Allocates a newEPPValue
with only theString
value.EPPValue(java.lang.String aValue, java.lang.String aPrefix, java.lang.String aNamespace)
Allocates a newEPPValue
with all attribute values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPValue
.void
decode(org.w3c.dom.Element aElement)
decodeEPPValue
from a DOM element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encodeEPPValue
into a DOM element tree.boolean
equals(java.lang.Object aObject)
implements a deepEPPValue
compare.java.lang.String
getNamespace()
Gets the XML namespace URI of the client element.java.lang.String
getPrefix()
Gets the XML prefix of the client element.java.lang.String
getValue()
Gets XMLString
that identifies a client-provided element (including XML tag and value) that caused a server error.void
setNamespace(java.lang.String aNamespace)
Sets the XML namespace URI of the client element.void
setPrefix(java.lang.String aPrefix)
Sets the XML prefix of the client element.void
setValue(java.lang.String aValue)
Sets XMLString
that identifies a client-provided element (including XML tag and value) that caused a server error.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Constructor Detail
-
EPPValue
public EPPValue()
Default constructor for serialization. Thevalue
attribute must be set before callingencode
.
-
EPPValue
public EPPValue(java.lang.String aValue)
Allocates a newEPPValue
with only theString
value. The prefix is set tonull
and the namespace is to the "urn:ietf:params:xml:ns:epp-1.0".- Parameters:
aValue
- XMLString
that identifies a client-provided element (including XML tag and value) that caused a server error.
-
EPPValue
public EPPValue(java.lang.String aValue, java.lang.String aPrefix, java.lang.String aNamespace)
Allocates a newEPPValue
with all attribute values.- Parameters:
aValue
- XMLString
that identifies a client-provided element (including XML tag and value) that caused a server error. For example, <domain:name>example.com</domain:name>.aPrefix
- XML Namespace prefix. For example, "domain". Set tonull
for no namespace prefix.aNamespace
- XML Namespace URI. For example, "urn:ietf:params:xml:ns:domain-1.0". If set tonull
the default of "urn:ietf:params:xml:ns:epp-1.0" is used.
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Gets XMLString
that identifies a client-provided element (including XML tag and value) that caused a server error.- Returns:
- XML
String
value using namespace prefix.
-
setValue
public void setValue(java.lang.String aValue)
Sets XMLString
that identifies a client-provided element (including XML tag and value) that caused a server error.- Parameters:
aValue
- XMLString
that identifies a client-provided element (including XML tag and value) that caused a server error. For example, <domain:name>example.com</domain:name>.
-
getPrefix
public java.lang.String getPrefix()
Gets the XML prefix of the client element. For example, "domain".- Returns:
- XML prefix if defined;
null
otherwise.
-
setPrefix
public void setPrefix(java.lang.String aPrefix)
Sets the XML prefix of the client element. For example, "domain".- Parameters:
aPrefix
- XML prefix to predefine in the <value> element. Set tonull
to not predefine a namespace prefix.
-
getNamespace
public java.lang.String getNamespace()
Gets the XML namespace URI of the client element. For example, "urn:ietf:params:xml:ns:domain-1.0".- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace URI to predefine in the <value> element if
defined;
null
otherwise.
-
setNamespace
public void setNamespace(java.lang.String aNamespace)
Sets the XML namespace URI of the client element. For example, "urn:ietf:params:xml:ns:domain-1.0".- Parameters:
aNamespace
- ML namespace URI to predefine in the <value> element. Set tonull
to not predefine a namespace.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encodeEPPValue
into a DOM element tree.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document- Returns:
- <extValue> root element tree.
- Throws:
EPPEncodeException
- Error encoding the DOM element tree.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
decodeEPPValue
from a DOM element tree. TheaElement
argument needs to be the "extValue" element.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- The "extValue" XML element.- Throws:
EPPDecodeException
- Error decoding the DOM element tree.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPValue
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPValue
instance to compare with- Returns:
true
if equal;false
otherwise
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPValue
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- Deep copy clone of
EPPValue
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
-