com.verisign.epp.codec.registry.v02

## Class EPPRegistryDomainContact

- java.lang.Object
- - com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
  - - com.verisign.epp.codec.registry.v02.EPPRegistryDomainContact

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

      public class EPPRegistryDomainContact
      extends EPPRegistryAbstractMinMax

  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 `EPPRegistryAbstractMinMax.getMin()` and `EPPRegistryAbstractMinMax.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 `EPPRegistryAbstractMinMax.getMax()` and `EPPRegistryAbstractMinMax.setMax(Integer)` to get and set this element.
  See Also:
    `EPPRegistryDomain`, Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `EPPRegistryDomainContact.Type` Possible values for the `sharePolicy` attribute.

  - ### 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_LOCALNAME` XML local name for `EPPRegistryDomainContact`.
    `static java.lang.String` | `ELM_NAME` XML root tag for `EPPRegistryDomainContact`.

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

      `ELM_MAX, ELM_MAX_LENGTH, ELM_MIN, ELM_MIN_LENGTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPRegistryDomainContact()` Default constructor of `EPPRegistryDomainContact`.
    `EPPRegistryDomainContact(EPPRegistryDomainContact.Type aType, java.lang.Integer aMin, java.lang.Integer aMax)` Creates a new `EPPRegistryDomainContact` object that takes the types and both the minimum and maximum values as `Integer`'s.
    `EPPRegistryDomainContact(EPPRegistryDomainContact.Type aType, int aMin, int aMax)` Creates a new `EPPRegistryDomainContact` object that takes the types and both the minimum and maximum values as `int`'s.

  - ### 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.
    `protected java.lang.String` | `getElmMax()` Gets the maximum element local name.
    `protected java.lang.String` | `getElmMin()` Gets the minimum element local name.
    `protected org.apache.log4j.Logger` | `getLogger()` Gets the `Logger` to use.
    `protected java.lang.String` | `getRootName()` Gets the root element local name.
    `EPPRegistryDomainContact.Type` | `getType()` Gets the type of contact.
    `void` | `setType(EPPRegistryDomainContact.Type aType)` Sets the type of contact.
    `java.lang.String` | `toString()` Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.
    `protected void` | `validateState()` Validate the state of the `EPPRegistryDomainContact` instance.

    - ### Methods inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax

      `getMax, getMin, getNamespace, setMax, setMin`

    - ### 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 `EPPRegistryDomainContact`.
      See Also:
        Constant Field Values

    - #### ELM_NAME

          public static final java.lang.String ELM_NAME

      XML root tag for `EPPRegistryDomainContact`.
      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

  - ### Constructor Detail

    - #### EPPRegistryDomainContact

          public EPPRegistryDomainContact()

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

    - #### EPPRegistryDomainContact

          public EPPRegistryDomainContact(EPPRegistryDomainContact.Type aType,
                                          java.lang.Integer aMin,
                                          java.lang.Integer aMax)

      Creates a new `EPPRegistryDomainContact` object that takes the types and both the minimum and maximum values as `Integer`'s.
      Parameters:
        `aType` - type of contact
        `aMin` - minimum number of contact entries.
        `aMax` - maximum number of contact entries.

    - #### EPPRegistryDomainContact

          public EPPRegistryDomainContact(EPPRegistryDomainContact.Type aType,
                                          int aMin,
                                          int aMax)

      Creates a new `EPPRegistryDomainContact` object that takes the types and both the minimum and maximum values as `int`'s.
      Parameters:
        `aType` - type of contact
        `aMin` - minimum number of contact entries.
        `aMax` - 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 `EPPRegistryAbstractMinMax`
      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 `EPPRegistryAbstractMinMax`
      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 `EPPRegistryAbstractMinMax`
      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 `EPPRegistryAbstractMinMax`
      Parameters:
        `aObject` - `EPPRegistryDomainContact` instance to compare with
      Returns:
        `true` if this object is the same as the aObject argument; `false` otherwise

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

    - #### getType

          public EPPRegistryDomainContact.Type getType()

      Gets the type of contact.
      Returns:
        Type of contact if defined; `null` otherwise.

    - #### setType

          public void setType(EPPRegistryDomainContact.Type aType)

      Sets the type of contact.
      Parameters:
        `aType` - The type of contact

    - #### getRootName

          protected java.lang.String getRootName()

      Gets the root element local name.
      Specified by:
        `getRootName` in class `EPPRegistryAbstractMinMax`
      Returns:
        Root element local name.

    - #### getElmMin

          protected java.lang.String getElmMin()

      Gets the minimum element local name.
      Specified by:
        `getElmMin` in class `EPPRegistryAbstractMinMax`
      Returns:
        Minimum element local name.

    - #### getElmMax

          protected java.lang.String getElmMax()

      Gets the maximum element local name.
      Specified by:
        `getElmMax` in class `EPPRegistryAbstractMinMax`
      Returns:
        Maximum element local name.

    - #### getLogger

          protected org.apache.log4j.Logger getLogger()

      Gets the `Logger` to use.
      Specified by:
        `getLogger` in class `EPPRegistryAbstractMinMax`
      Returns:
        `Logger` instance to use for logging.

    - #### validateState

          protected void validateState()
                                throws EPPEncodeException

      Validate the state of the `EPPRegistryDomainContact` instance. A valid state means that all of the required attributes have been set. If validateState returns without an exception, the state is valid. If the state is not valid, the `EPPCodecException` will contain a description of the error.
      Overrides:
        `validateState` in class `EPPRegistryAbstractMinMax`
      Throws:
        `EPPCodecException` - Validation error
        `EPPEncodeException`

Copyright © VeriSign Inc. All Rights Reserved.