com.verisign.epp.codec.registry

## Class EPPRegistryDomainContact

- java.lang.Object
- - com.verisign.epp.codec.registry.EPPRegistryMinMax
  - - com.verisign.epp.codec.registry.EPPRegistryDomainContact

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

      public class EPPRegistryDomainContact
      extends EPPRegistryMinMax

  Defines the miniumum and maximum numbers of contacts by contact type. The contact type is defined with the required "type" attribute with the possible values of "admin", "tech", and "billing". The <registry:contact> element contains the following child elements
  - <registry:min> - The minimum number of contacts for the contact type. Use `EPPRegistryMinMax.getMin()` and `EPPRegistryMinMax.setMin(Integer)` to get and set this element.
  - <registry:max> - The OPTIONAL maximum number of contacts for the contact type. If this element is not defined, the maximum number is unbounded. Use `EPPRegistryMinMax.getMax()` and `EPPRegistryMinMax.setMax(Integer)` to get and set this element.
  See Also:
    `EPPRegistryDomain`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ATTR_TYPE` XML attribute name for the `type` attribute.
    `static java.lang.String` | `ELM_NAME` XML Element Name of `EPPRegistryDomainContact` root element.
    `static java.lang.String` | `TYPE_ADMIN` "admin" contact type
    `static java.lang.String` | `TYPE_BILLING` "billing" contact type
    `static java.lang.String` | `TYPE_TECH` "tech" contact type
    `static java.util.Set` | `VALID_TYPES`

    - ### Fields inherited from class com.verisign.epp.codec.registry.EPPRegistryMinMax

      `ELM_MAX, ELM_MAX_LENGTH, ELM_MIN, ELM_MIN_LENGTH, elmMax, elmMin, max, min, rootName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPRegistryDomainContact()` Default constructor of EPPRegistryDomainContact.
    `EPPRegistryDomainContact(java.lang.String type, java.lang.Integer min, java.lang.Integer max)` Constructor an EPPRegistryDomainContact with type, min and max.
    `EPPRegistryDomainContact(java.lang.String type, int min, int max)` Constructor an EPPRegistryDomainContact with type, min and max.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone `EPPRegistryDomainContact`.
    `void` | `decode(org.w3c.dom.Element aElement)` Decode the `EPPRegistryDomainContact` 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 `EPPRegistryDomainContact` instance.
    `boolean` | `equals(java.lang.Object aObject)` implements a deep `EPPRegistryDomainContact` compare.
    `java.lang.String` | `getRootName()` Return the root name of the XML element.
    `java.lang.String` | `getType()` Get type of contact.
    `void` | `setType(java.lang.String type)` Set type of contact.
    `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 com.verisign.epp.codec.registry.EPPRegistryMinMax

      `getElmMax, getElmMin, getMax, getMin, getNamespace, setElmMax, setElmMin, setMax, setMin, setRootName`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      XML Element Name of `EPPRegistryDomainContact` root element.
      See Also:
        Constant Field Values

    - #### ATTR_TYPE

          public static final java.lang.String ATTR_TYPE

      XML attribute name for the `type` attribute.
      See Also:
        Constant Field Values

    - #### TYPE_ADMIN

          public static final java.lang.String TYPE_ADMIN

      "admin" contact type
      See Also:
        Constant Field Values

    - #### TYPE_BILLING

          public static final java.lang.String TYPE_BILLING

      "billing" contact type
      See Also:
        Constant Field Values

    - #### TYPE_TECH

          public static final java.lang.String TYPE_TECH

      "tech" contact type
      See Also:
        Constant Field Values

    - #### VALID_TYPES

          public static java.util.Set VALID_TYPES

  - ### Constructor Detail

    - #### EPPRegistryDomainContact

          public EPPRegistryDomainContact()

      Default constructor of EPPRegistryDomainContact. All attributes are set to null. Must call `setType(String)` and `EPPRegistryMinMax.setMin(Integer)` before calling `encode(Document)`.

    - #### EPPRegistryDomainContact

          public EPPRegistryDomainContact(java.lang.String type,
                                          java.lang.Integer min,
                                          java.lang.Integer max)

      Constructor an EPPRegistryDomainContact with type, min and max.
      Parameters:
        `type` - type of contact
        `min` - minimum number of contact entries.
        `max` - maximum number of contact entries.

    - #### EPPRegistryDomainContact

          public EPPRegistryDomainContact(java.lang.String type,
                                          int min,
                                          int max)

      Constructor an EPPRegistryDomainContact with type, min and max.
      Parameters:
        `type` - type of contact
        `min` - minimum number of contact entries.
        `max` - maximum number of contact entries.

  - ### Method Detail

    - #### encode

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

      Encode a DOM Element tree from the attributes of the `EPPRegistryDomainContact` instance.
      Specified by:
        `encode` in interface `EPPCodecComponent`
      Overrides:
        `encode` in class `EPPRegistryMinMax`
      Parameters:
        `aDocument` - DOM Document that is being built. Used as an Element factory.
      Returns:
        Element Root DOM Element representing the `EPPRegistryDomainContact` instance.
      Throws:
        `EPPEncodeException` - - Unable to encode `EPPRegistryDomainContact` instance.

    - #### decode

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

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

    - #### clone

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

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

    - #### equals

          public boolean equals(java.lang.Object aObject)

      implements a deep `EPPRegistryDomainContact` compare.
      Overrides:
        `equals` in class `EPPRegistryMinMax`
      Parameters:
        `aObject` - `EPPRegistryDomainContact` instance to compare with
      Returns:
        `true` if this object is the same as the aObject argument; `false` otherwise

    - #### getRootName

          public java.lang.String getRootName()

      Return the root name of the XML element.
      Overrides:
        `getRootName` in class `EPPRegistryMinMax`
      Returns:
        `EPPRegistryDomainContact.ELM_NAME`

    - #### 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 `EPPRegistryMinMax`
      Returns:
        Indented XML `String` if successful; `ERROR` otherwise.

    - #### getType

          public java.lang.String getType()

      Get type of contact.
      Returns:
        type of contact

    - #### setType

          public void setType(java.lang.String type)

      Set type of contact.
      Parameters:
        `type` - type of contact