Class EPPValidateKeyValue

java.lang.Object
com.verisign.epp.codec.validate.v02.EPPValidateKeyValue
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPValidateKeyValue extends Object implements EPPCodecComponent
EPPValidateKeyValue is used to hold key, value pairs along with an optional "contactType" attribute for use in EPPValidateCheckCmd and EPPValidateKeyValue. EPPValidateKeyValue consists of a required "key" and "value" attribute.
See Also:
  • Field Details

  • Constructor Details

    • EPPValidateKeyValue

      public EPPValidateKeyValue()
      Default constructor for EPPValidateKeyValue.
    • EPPValidateKeyValue

      public EPPValidateKeyValue(String aKey, String aValue)
      Constructor for EPPValidateKeyValue that includes the required attributes of the key and the value.
      Parameters:
      aKey - Key associated with the value
      aValue - Value associated with the key
    • EPPValidateKeyValue

      public EPPValidateKeyValue(String aKey, String aValue, String aContactType)
      Constructor for EPPValidateKeyValue that includes all of the attributes.
      Parameters:
      aKey - Key associated with the value
      aValue - Value associated with the key
      aContactType - Contact type associated with this key value pair.
  • Method Details

    • getKey

      public String getKey()
      Gets the key.
      Returns:
      The key if defined;null otherwise.
    • setKey

      public void setKey(String aKey)
      Sets the key.
      Parameters:
      aKey - The key
    • getValue

      public String getValue()
      Gets the value.
      Returns:
      The value if defined;null otherwise.
    • setValue

      public void setValue(String aValue)
      Sets the value.
      Parameters:
      aValue - The value
    • hasContactType

      public boolean hasContactType()
      Is the contact type defined?
      Returns:
      true if the contact type is defined; false otherwise.
    • getContactType

      public String getContactType()
      Gets the contact type.
      Returns:
      The contact type if defined;null otherwise.
    • setContactType

      public void setContactType(String aType)
      Sets the contact type.
      Parameters:
      aType - The contact type
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPValidateKeyValue 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 EPPValidateKeyValue instance.
      Throws:
      EPPEncodeException - Unable to encode EPPValidateKeyValue instance.
    • decode

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

      public boolean equals(Object aObject)
      Compare an instance of EPPValidateKeyValue with this instance.
      Overrides:
      equals in class Object
      Parameters:
      aObject - Object to compare with.
      Returns:
      true if equal; false otherwise.
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPValidateKeyValue.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPValidateKeyValue
      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.
    • getNamespace

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