Class EPPRegistryKeyValue

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

public class EPPRegistryKeyValue extends Object implements EPPCodecComponent
Defines one key, value pair used in EPPRegistryCustomData. The <registry:value> element contains a required "key" attribute for the value in the element. Use getKey() and getKey() to get and set the key. Use getValue() and setValue(String) to get and set the value.
See Also:
  • Field Details

  • Constructor Details

    • EPPRegistryKeyValue

      public EPPRegistryKeyValue()
      Default constructor. All attributes are set to default values. Must call setKey(String) and setValue(String) before calling encode(Document).
    • EPPRegistryKeyValue

      public EPPRegistryKeyValue(String key, String value)
      Constructs a new instance with given key and value.
      Parameters:
      key - Attribute key
      value - Attribute value
  • Method Details

    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPRegistryKeyValue instance.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOM Document that is being built. Used as an Element factory.
      Returns:
      Element Root DOM Element representing the EPPRegistryKeyValue instance.
      Throws:
      EPPEncodeException - - Unable to encode EPPRegistryKeyValue instance.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPRegistryKeyValue attributes from the aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - Root DOM Element to decode EPPRegistryKeyValue from.
      Throws:
      EPPDecodeException - Unable to decode aElement
    • clone

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

      public boolean equals(Object aObject)
      implements a deep EPPRegistryKeyValue compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPRegistryKeyValue instance to compare with
      Returns:
      true if this object is the same as the aObject argument; false otherwise
    • 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.
    • getKey

      public String getKey()
      Get the key.
      Returns:
      key
    • setKey

      public void setKey(String key)
      Set the key.
      Parameters:
      key - Key to use
    • getValue

      public String getValue()
      Get the value
      Returns:
      value
    • setValue

      public void setValue(String value)
      Set the value
      Parameters:
      value - Value to use
    • getRootName

      public String getRootName()
      Get the root name.
      Returns:
      root name of the xml element. Always return ELM_NAME
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.