Class EPPValue

java.lang.Object
com.verisign.epp.codec.gen.EPPValue
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPValue extends 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. The String 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:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for serialization.
    EPPValue(String aValue)
    Allocates a new EPPValue with only the String value.
    EPPValue(String aValue, String aPrefix, String aNamespace)
    Allocates a new EPPValue with all attribute values.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPValue.
    void
    decode(Element aElement)
    decode EPPValue from a DOM element tree.
    encode(Document aDocument)
    encode EPPValue into a DOM element tree.
    boolean
    equals(Object aObject)
    implements a deep EPPValue compare.
    Gets the XML namespace URI of the client element.
    Gets the XML prefix of the client element.
    Gets XML String that identifies a client-provided element (including XML tag and value) that caused a server error.
    void
    setNamespace(String aNamespace)
    Sets the XML namespace URI of the client element.
    void
    setPrefix(String aPrefix)
    Sets the XML prefix of the client element.
    void
    setValue(String aValue)
    Sets XML String that identifies a client-provided element (including XML tag and value) that caused a server error.
    Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • EPPValue

      public EPPValue()
      Default constructor for serialization. The value attribute must be set before calling encode.
    • EPPValue

      public EPPValue(String aValue)
      Allocates a new EPPValue with only the String value. The prefix is set to null and the namespace is to the "urn:ietf:params:xml:ns:epp-1.0".
      Parameters:
      aValue - XML String that identifies a client-provided element (including XML tag and value) that caused a server error.
    • EPPValue

      public EPPValue(String aValue, String aPrefix, String aNamespace)
      Allocates a new EPPValue with all attribute values.
      Parameters:
      aValue - XML String 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 to null for no namespace prefix.
      aNamespace - XML Namespace URI. For example, "urn:ietf:params:xml:ns:domain-1.0". If set to null the default of "urn:ietf:params:xml:ns:epp-1.0" is used.
  • Method Details

    • getValue

      public String getValue()
      Gets XML String 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(String aValue)
      Sets XML String that identifies a client-provided element (including XML tag and value) that caused a server error.
      Parameters:
      aValue - XML String 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 String getPrefix()
      Gets the XML prefix of the client element. For example, "domain".
      Returns:
      XML prefix if defined; null otherwise.
    • setPrefix

      public void setPrefix(String aPrefix)
      Sets the XML prefix of the client element. For example, "domain".
      Parameters:
      aPrefix - XML prefix to predefine in the <value> element. Set to null to not predefine a namespace prefix.
    • getNamespace

      public 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 interface EPPCodecComponent
      Returns:
      XML namespace URI to predefine in the <value> element if defined; null otherwise.
    • setNamespace

      public void setNamespace(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 to null to not predefine a namespace.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      encode EPPValue into a DOM element tree.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document
      Returns:
      <extValue> root element tree.
      Throws:
      EPPEncodeException - Error encoding the DOM element tree.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      decode EPPValue from a DOM element tree. The aElement argument needs to be the "extValue" element.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - The "extValue" XML element.
      Throws:
      EPPDecodeException - Error decoding the DOM element tree.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPValue compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPValue instance to compare with
      Returns:
      true if equal; false otherwise
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPValue.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      Deep copy clone of EPPValue
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.