com.verisign.epp.codec.org

## Class EPPOrgContact

- java.lang.Object
- - com.verisign.epp.codec.org.EPPOrgContact

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

      public class EPPOrgContact
      extends java.lang.Object
      implements EPPCodecComponent

  Represents an org contact. The valid contact types are defined by the `EPPOrgContact.Type` enumeration.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `EPPOrgContact.Type` Contact type enumeration.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ELM_LOCALNAME` XML local name for `EPPOrgContact`.
    `static java.lang.String` | `ELM_NAME` XML root tag for `EPPOrgContact`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPOrgContact()` Default constructor for `EPPOrgContact`.
    `EPPOrgContact(java.lang.String aContactId, EPPOrgContact.Type aType)` `EPPOrgContact` that takes all attributes as arguments (contactId and type).
    `EPPOrgContact(java.lang.String aContactId, EPPOrgContact.Type aType, java.lang.String aTypeName)` `EPPOrgContact` that takes all attributes as arguments (contactId and type).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone `EPPOrgContact`.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPOrgContact` attributes from the aElement DOM Element tree.
    `org.w3c.dom.Element` | `encode(org.w3c.dom.Document aDocument)` Encode a DOM Element tree from the attributes of the `EPPOrgContact` instance.
    `boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPOrgContact` compare.
    `java.lang.String` | `getContactId()` Gets the contact identifier of the contact.
    `java.lang.String` | `getNamespace()` Returns the XML namespace associated with the `EPPCodecComponent`.
    `EPPOrgContact.Type` | `getType()` Gets the contact type using the `EPPOrgContact.Type` enumeration.
    `java.lang.String` | `getTypeName()` Gets the optional type name for the `CUSTOM` type.
    `boolean` | `hasTypeName()` Is the type name defined?
    `void` | `setContactId(java.lang.String aContactId)` Sets the contact identifier of the contact.
    `void` | `setType(EPPOrgContact.Type aType)` Sets the contact type using the `EPPOrgContact.Type` enumeration.
    `void` | `setTypeName(java.lang.String aTypeName)` Gets the optional type name for the `CUSTOM` 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

      XML local name for `EPPOrgContact`.
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      XML root tag for `EPPOrgContact`.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPOrgContact

          public EPPOrgContact()

      Default constructor for `EPPOrgContact`.

    - #### EPPOrgContact

          public EPPOrgContact(java.lang.String aContactId,
                               EPPOrgContact.Type aType)

      `EPPOrgContact` that takes all attributes as arguments (contactId and type).
      Parameters:
        `aContactId` - Contact Identifier
        `aType` - Contact Type using `EPPOrgContact.Type` enumeration.

    - #### EPPOrgContact

          public EPPOrgContact(java.lang.String aContactId,
                               EPPOrgContact.Type aType,
                               java.lang.String aTypeName)

      `EPPOrgContact` that takes all attributes as arguments (contactId and type).
      Parameters:
        `aContactId` - Contact Identifier
        `aType` - Contact Type using `EPPOrgContact.Type` enumeration.
        `aTypeName` - Name of a "custom" type

  - ### Method Detail

    - #### getType

          public EPPOrgContact.Type getType()

      Gets the contact type using the `EPPOrgContact.Type` enumeration.
      Returns:
        Contact type if defined; `null` otherwise.

    - #### setType

          public void setType(EPPOrgContact.Type aType)

      Sets the contact type using the `EPPOrgContact.Type` enumeration.
      Parameters:
        `aType` - Contact type

    - #### getContactId

          public java.lang.String getContactId()

      Gets the contact identifier of the contact.
      Returns:
        Contact identifier if defined; `null` otherwise.

    - #### setContactId

          public void setContactId(java.lang.String aContactId)

      Sets the contact identifier of the contact.
      Parameters:
        `aContactId` - Contact identifier of the contact

    - #### hasTypeName

          public boolean hasTypeName()

      Is the type name defined?
      Returns:
        `true` if the type name is defined; `false` otherwise.

    - #### getTypeName

          public java.lang.String getTypeName()

      Gets the optional type name for the `CUSTOM` type.
      Returns:
        the parentId

    - #### setTypeName

          public void setTypeName(java.lang.String aTypeName)

      Gets the optional type name for the `CUSTOM` type.
      Parameters:
        `aTypeName` - the parentId to set

    - #### encode

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

      Encode a DOM Element tree from the attributes of the `EPPOrgContact` 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 `EPPOrgContact` instance.
      Throws:
        `EPPEncodeException` - Unable to encode `EPPOrgContact` instance.

    - #### decode

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

      Decode the `EPPOrgContact` attributes from the aElement DOM Element tree.
      Specified by:
        `decode` in interface `EPPCodecComponent`
      Parameters:
        `aElement` - Root DOM Element to decode `EPPOrgContact` from.
      Throws:
        `EPPDecodeException` - Unable to decode aElement.

    - #### equals

          public boolean equals(java.lang.Object aObject)

      implements a deep `EPPOrgContact` compare.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObject` - `EPPOrgContact` instance to compare with
      Returns:
        DOCUMENT ME!

    - #### clone

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

      Clone `EPPOrgContact`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        clone of `EPPOrgContact`
      Throws:
        `java.lang.CloneNotSupportedException` - standard Object.clone exception

    - #### 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`.