Package com.verisign.epp.codec.verificationcode

## Class EPPVerificationCode

- java.lang.Object
- - com.verisign.epp.codec.verificationcode.EPPVerificationCode

- All Implemented Interfaces:
    `EPPCodecComponent`, `java.io.Serializable`, `java.lang.Cloneable`

      public class EPPVerificationCode
      extends java.lang.Object
      implements EPPCodecComponent

  Class for representing the various forms of the verification code, which include:
  - Verification code signed and passed along with transform commands.
  - Verification code type returned in the missing element of the info response.
  - Verification code returned in the set element of the info response.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `ELM_LOCALNAME` | Constant for the local name
    `static java.lang.String` | `ELM_NAME` | Constant for the tag name
    `static int` | `UNDEFINED` | Undefined integer value

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPVerificationCode()` | Create an `EPPVerificationCode` instance.
    `EPPVerificationCode​(java.lang.String aCode, java.lang.String aType)` | Create an `EPPVerificationCode` with the code value and the type.
    `EPPVerificationCode​(java.lang.String aCode, java.lang.String aType, java.util.Date aSetDate)` | Create an `EPPVerificationCode` with the code, type, and set date.
    `EPPVerificationCode​(java.lang.String aType, java.util.Date aDueDate)` | Create an `EPPVerificationCode` with the code type and due date.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `clone()` | Clone `EPPVerificationCode`.
    `void` | `decode​(org.w3c.dom.Element aElement)` | Decode the `EPPVerificationCode` component
    `org.w3c.dom.Element` | `encode​(org.w3c.dom.Document aDocument)` | Sets all this instance's data in the given XML document
    `boolean` | `equals​(java.lang.Object aObject)` | implements a deep `EPPVerificationCode` compare.
    `java.lang.String` | `getCode()` | Gets the code value.
    `java.util.Date` | `getDueDate()` | Gets the due date for the verification code.
    `java.lang.String` | `getNamespace()` | Returns the XML namespace associated with the `EPPCodecComponent`.
    `java.util.Date` | `getSetDate()` | Gets the date that the verification code was set.
    `java.lang.String` | `getType()` | Gets the code type.
    `java.lang.String` | `getVerificationId()` | Gets the Verification Identifier (verification-id) from the code.
    `int` | `getVspId()` | Gets the VSP Identifier (vsp-id) from the code.
    `boolean` | `hasCode()` | Has the code been set?
    `boolean` | `hasDueDate()` | Has the due date been set?
    `boolean` | `hasSetDate()` | Has the set date been set?
    `void` | `setCode​(java.lang.String aCode)` | Sets the code value.
    `void` | `setDueDate​(java.util.Date aDueDate)` | Sets the due date for the verification code.
    `void` | `setSetDate​(java.util.Date aSetDate)` | Sets the date that the verification code was set.
    `void` | `setType​(java.lang.String aType)` | Sets the code type.
    `java.lang.String` | `toString()` | 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`

- - ### Field Detail

    - #### ELM_LOCALNAME

          public static final java.lang.String ELM_LOCALNAME

      Constant for the local name
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      Constant for the tag name
      See Also:
        Constant Field Values

    - #### UNDEFINED

          public static int UNDEFINED

      Undefined integer value

  - ### Constructor Detail

    - #### EPPVerificationCode

          public EPPVerificationCode()

      Create an `EPPVerificationCode` instance.

    - #### EPPVerificationCode

          public EPPVerificationCode​(java.lang.String aCode,
                                     java.lang.String aType)

      Create an `EPPVerificationCode` with the code value and the type. This constructor is used for passing the code with a transform command.
      Parameters:
        `aCode` - Verification code value
        `aType` - Verification code type

    - #### EPPVerificationCode

          public EPPVerificationCode​(java.lang.String aType,
                                     java.util.Date aDueDate)

      Create an `EPPVerificationCode` with the code type and due date. This constructor is used for the list of codes in the missing list.
      Parameters:
        `aType` - Verification code type
        `aDueDate` - Due date that the code must be set

    - #### EPPVerificationCode

          public EPPVerificationCode​(java.lang.String aCode,
                                     java.lang.String aType,
                                     java.util.Date aSetDate)

      Create an `EPPVerificationCode` with the code, type, and set date. This constructor is used for the list of codes in the set list.
      Parameters:
        `aCode` - Verification code value. Pass `null` if the code value should not be set.
        `aType` - Verification code type
        `aSetDate` - Date that the code was set

  - ### Method Detail

    - #### decode

          public void decode​(org.w3c.dom.Element aElement)
                      throws EPPDecodeException

      Decode the `EPPVerificationCode` component
      Specified by:
        `decode` in interface `EPPCodecComponent`
      Parameters:
        `aElement` - Root element of the `EPPVerificationCode`
      Throws:
        `EPPDecodeException` - Error decoding the `EPPVerificationCode`

    - #### encode

          public org.w3c.dom.Element encode​(org.w3c.dom.Document aDocument)
                                     throws EPPEncodeException

      Sets all this instance's data in the given XML document
      Specified by:
        `encode` in interface `EPPCodecComponent`
      Parameters:
        `aDocument` - a DOM Document to attach data to.
      Returns:
        The root element of this component.
      Throws:
        `EPPEncodeException` - Thrown if any errors prevent encoding.

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Clone `EPPVerificationCode`. Signature element is not cloned.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of `EPPVerificationCode`
      Throws:
        `java.lang.CloneNotSupportedException` - standard Object.clone exception

    - #### equals

          public boolean equals​(java.lang.Object aObject)

      implements a deep `EPPVerificationCode` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPVerificationCode` instance to compare with
      Returns:
        `true` if equal `false` otherwise

    - #### hasCode

          public boolean hasCode()

      Has the code been set?
      Returns:
        `true` if the code has been set; `false` otherwise.

    - #### getCode

          public java.lang.String getCode()

      Gets the code value.
      Returns:
        The code value if defined: `null` otherwise.

    - #### setCode

          public void setCode​(java.lang.String aCode)

      Sets the code value.
      Parameters:
        `aCode` - Code value to set

    - #### getVspId

          public int getVspId()

      Gets the VSP Identifier (vsp-id) from the code.
      Returns:
        VSP Identifier (vsp-id) if defined; `UNDEFINED` otherwise.

    - #### getVerificationId

          public java.lang.String getVerificationId()

      Gets the Verification Identifier (verification-id) from the code.
      Returns:
        Verification Identifier (verification-id) if defined; `null` otherwise.

    - #### getType

          public java.lang.String getType()

      Gets the code type.
      Returns:
        The code type set.

    - #### setType

          public void setType​(java.lang.String aType)

      Sets the code type.
      Parameters:
        `aType` - Code type to set

    - #### hasSetDate

          public boolean hasSetDate()

      Has the set date been set?
      Returns:
        `true` if the set date has been set; `false` otherwise.

    - #### getSetDate

          public java.util.Date getSetDate()

      Gets the date that the verification code was set.
      Returns:
        The set date if defined: `null` otherwise.

    - #### setSetDate

          public void setSetDate​(java.util.Date aSetDate)

      Sets the date that the verification code was set.
      Parameters:
        `aSetDate` - Date that the verification code was set.

    - #### hasDueDate

          public boolean hasDueDate()

      Has the due date been set?
      Returns:
        `true` if the due date has been set; `false` otherwise.

    - #### getDueDate

          public java.util.Date getDueDate()

      Gets the due date for the verification code.
      Returns:
        The due date if defined: `null` otherwise.

    - #### setDueDate

          public void setDueDate​(java.util.Date aDueDate)

      Sets the due date for the verification code.
      Parameters:
        `aDueDate` - Due date for the verification code

    - #### toString

          public java.lang.String toString()

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

    - #### getNamespace

          public java.lang.String getNamespace()

      Returns the XML namespace associated with the `EPPCodecComponent`.
      Specified by:
        `getNamespace` in interface `EPPCodecComponent`
      Returns:
        XML namespace for the `EPPCodecComponent`.