com.verisign.epp.codec.contact

## Class EPPContactCreateCmd

- java.lang.Object
- - com.verisign.epp.codec.gen.EPPCommand
  - - com.verisign.epp.codec.gen.EPPCreateCmd
    - - com.verisign.epp.codec.contact.EPPContactCreateCmd

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

      public class EPPContactCreateCmd
      extends EPPCreateCmd

  Represents an EPP Contact <create> command, which provides a transform that allows a client to create a contact object. In addition to the standard EPP command elements, the <create> command MUST contain a <contact:create> element that identifies the contact namespace and the location of the contact schema. The <contact:create> element contains the following child elements:
  - A <contact:id> element that contains the server-unique identifier of the contact object. Use `getId` and `setId` to get and set the elements.
  - A <contact:postalInfo> element that contains the postal contacts. Use `getPostalInfo`, `addPostalInfo` and `setPostalInfo` to get, add and set the elements.
  - An OPTIONAL <contact:i15d> ("i15d" is short for "internationalized") element that contains child elements whose content SHALL be represented in unrestricted UTF-8. Use `getI15d` and `setI15d` to get and set the elements.
  - An OPTIONAL <contact:voice> element that contains the contact's voice telephone number. Use `getVoice` and `setVoice` to get and set the elements.
  - An OPTIONAL <contact:fax> element that contains the contact's facsimile telephone number. Use `getFax` and `setFax` to get and set the elements.
  - A <contact:email> element that contains the contact's e-mail address. Use `getEmail` and `setEmail` to get and set the elements.
  - A <contact:authInfo> element that contains authorization information associated with the contact object. This element MUST NOT be provided if the querying client is not the current sponsoring client. Use `getAuthInfo` and `setAuthInfo` to get and set the element.
  `EPPContactCreateReponse` is the response associated with `EPPContactCreateCmd`.
  See Also:
    `EPPResponse`, `EPPContactPostalDefinition`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.verisign.epp.codec.gen.EPPCommand

      `extensions, OP_APPROVE, OP_CANCEL, OP_QUERY, OP_REJECT, OP_REQUEST, transId, TYPE_CHECK, TYPE_CREATE, TYPE_DELETE, TYPE_INFO, TYPE_LOGIN, TYPE_LOGOUT, TYPE_POLL, TYPE_RENEW, TYPE_TRANSFER, TYPE_UPDATE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPContactCreateCmd()` Default constructor of EPPContactCreateCmd Allocates a new `EPPContactCreateCmd` with default attribute values.
    `EPPContactCreateCmd(java.lang.String aTransId)` Constructor of EPPContactCreateCmd Allocates a new `EPPContactCreateCmd` with the contact definition information.
    `EPPContactCreateCmd(java.lang.String aTransId, java.lang.String aId, EPPContactPostalDefinition aPostalContact, java.lang.String aEmail, EPPAuthInfo aAuthInfo)` Constructor of EPPContactCreateCmd Allocates a new `EPPContactCreateCmd` with the contact definition information.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPostalInfo(EPPContactPostalDefinition newPostalInfo)` Adds contact postalInfo.
    `java.lang.Object` | `clone()` Clone `EPPContactCreateCmd`.
    `protected void` | `doDecode(org.w3c.dom.Element aElement)` Decode the EPPContactCreateCmd attributes from the aElement DOM Element tree.
    `protected org.w3c.dom.Element` | `doEncode(org.w3c.dom.Document aDocument)` Encode a DOM Element tree from the attributes of the EPPContactCreateCmd instance.
    `boolean` | `equals(java.lang.Object aObject)` Compare an instance of `EPPContactCreateCmd` with this instance.
    `EPPAuthInfo` | `getAuthInfo()` Get authorization information.
    `EPPContactDisclose` | `getDisclose()` Get disclose information.
    `java.lang.String` | `getEmail()` Get email.
    `java.lang.String` | `getFax()` Get fax number.
    `java.lang.String` | `getFaxExt()` Get fax number extension.
    `java.lang.String` | `getId()` Get contact ID.
    `java.lang.String` | `getNamespace()` Get the EPP command Namespace associated with EPPContactCreateCmd.
    `java.util.Vector` | `getPostalInfo()` Get postalInfo elements of contact.
    `java.lang.String` | `getVoice()` Get voice number.
    `java.lang.String` | `getVoiceExt()` Get voice number extension.
    `boolean` | `hasAuthInfo()` Returns `true` if the contact has auth info.
    `boolean` | `hasDisclose()` Returns `true` if the contact has disclose flag.
    `boolean` | `hasEmail()` Returns `true` if the contact has email.
    `boolean` | `hasFax()` Returns `true` if the contact has fax.
    `boolean` | `hasFaxExt()` Returns `true` if the contact has fax extension.
    `boolean` | `hasId()` Returns `true` if the contact has contact ID.
    `boolean` | `hasPostalContacts()` Returns `true` if the contact has postal info.
    `boolean` | `hasVoice()` Returns `true` if the contact has voice.
    `boolean` | `hasVoiceExt()` Returns `true` if the contact has voice extension.
    `void` | `setAuthInfo(EPPAuthInfo newAuthInfo)` Set authorization information.
    `void` | `setDisclose(EPPContactDisclose newDisclose)` Set disclose information.
    `void` | `setEmail(java.lang.String newEmail)` Set email.
    `void` | `setFax(java.lang.String newFax)` Set fax number.
    `void` | `setFaxExt(java.lang.String newFaxExt)` Set fax number extension.
    `void` | `setId(java.lang.String newId)` Set contact ID.
    `void` | `setPostalInfo(java.util.Vector newPostalContacts)` Set contact postalInfo.
    `void` | `setVoice(java.lang.String newVoice)` Set contact voice number.
    `void` | `setVoiceExt(java.lang.String newVoiceExt)` Set contact voice extension.
    `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.gen.EPPCreateCmd

      `doGenDecode, doGenEncode, getType`

    - ### Methods inherited from class com.verisign.epp.codec.gen.EPPCommand

      `addExtension, decode, encode, findDuplicateExtNamespaces, getExtension, getExtension, getExtensions, getOp, getTransId, hasExtension, hasExtensions, hasTransId, setExtension, setExtensions, setTransId`

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

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

- - ### Constructor Detail

    - #### EPPContactCreateCmd

          public EPPContactCreateCmd()

      Default constructor of EPPContactCreateCmd Allocates a new `EPPContactCreateCmd` with default attribute values.

    - #### EPPContactCreateCmd

          public EPPContactCreateCmd(java.lang.String aTransId)

      Constructor of EPPContactCreateCmd Allocates a new `EPPContactCreateCmd` with the contact definition information.
      Parameters:
        `aTransId` - command transaction id

    - #### EPPContactCreateCmd

          public EPPContactCreateCmd(java.lang.String aTransId,
                                     java.lang.String aId,
                                     EPPContactPostalDefinition aPostalContact,
                                     java.lang.String aEmail,
                                     EPPAuthInfo aAuthInfo)

      Constructor of EPPContactCreateCmd Allocates a new `EPPContactCreateCmd` with the contact definition information.
      Parameters:
        `aTransId` - command transaction id
        `aId` - String ID
        `aPostalContact` - postalInfo element of contact
        `aEmail` - String email
        `aAuthInfo` - authorization information

  - ### Method Detail

    - #### getNamespace

          public java.lang.String getNamespace()

      Get the EPP command Namespace associated with EPPContactCreateCmd.
      Specified by:
        `getNamespace` in interface `EPPCodecComponent`
      Specified by:
        `getNamespace` in interface `EPPMessage`
      Specified by:
        `getNamespace` in class `EPPCommand`
      Returns:
        `EPPContactMapFactory.NS`

    - #### doEncode

          protected org.w3c.dom.Element doEncode(org.w3c.dom.Document aDocument)
                                          throws EPPEncodeException

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

    - #### doDecode

          protected void doDecode(org.w3c.dom.Element aElement)
                           throws EPPDecodeException

      Decode the EPPContactCreateCmd attributes from the aElement DOM Element tree.
      Specified by:
        `doDecode` in class `EPPCreateCmd`
      Parameters:
        `aElement` - - Root DOM Element to decode EPPContactCreateCmd from.
      Throws:
        `EPPDecodeException` - Unable to decode aElement

    - #### equals

          public boolean equals(java.lang.Object aObject)

      Compare an instance of `EPPContactCreateCmd` with this instance.
      Overrides:
        `equals` in class `EPPCreateCmd`
      Parameters:
        `aObject` - Object to compare with.
      Returns:
        DOCUMENT ME!

    - #### clone

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

      Clone `EPPContactCreateCmd`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `EPPCommand`
      Returns:
        clone of `EPPContactCreateCmd`
      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 `EPPCommand`
      Returns:
        Indented XML `String` if successful; `ERROR` otherwise.

    - #### getPostalInfo

          public java.util.Vector getPostalInfo()

      Get postalInfo elements of contact.
      Returns:
        java.util.Vector

    - #### setPostalInfo

          public void setPostalInfo(java.util.Vector newPostalContacts)

      Set contact postalInfo.
      Parameters:
        `newPostalContacts` - java.util.Vector

    - #### hasPostalContacts

          public boolean hasPostalContacts()

      Returns `true` if the contact has postal info.
      Returns:
        `true` if the contact has postal info `false` otherwise

    - #### addPostalInfo

          public void addPostalInfo(EPPContactPostalDefinition newPostalInfo)

      Adds contact postalInfo.
      Parameters:
        `newPostalInfo` - com.verisign.epp.codec.contact.EPPContactPostalDefinition

    - #### getAuthInfo

          public EPPAuthInfo getAuthInfo()

      Get authorization information.
      Returns:
        com.verisign.epp.codec.gen.EPPAuthInfo

    - #### getDisclose

          public EPPContactDisclose getDisclose()

      Get disclose information.
      Returns:
        Disclose information if defined; `null` otherwise;

    - #### setDisclose

          public void setDisclose(EPPContactDisclose newDisclose)

      Set disclose information.
      Parameters:
        `newDisclose` - com.verisign.epp.codec.gen.EPPContactDisclose

    - #### hasDisclose

          public boolean hasDisclose()

      Returns `true` if the contact has disclose flag.
      Returns:
        `true` if the contact has disclose flag `false` otherwise

    - #### getEmail

          public java.lang.String getEmail()

      Get email.
      Returns:
        email if defined; `null` otherwise.

    - #### getFax

          public java.lang.String getFax()

      Get fax number.
      Returns:
        Fax number if defined; `null` otherwise.

    - #### getFaxExt

          public java.lang.String getFaxExt()

      Get fax number extension.
      Returns:
        fax number extension if defined; `null` otherwise.

    - #### getId

          public java.lang.String getId()

      Get contact ID.
      Returns:
        String

    - #### getVoice

          public java.lang.String getVoice()

      Get voice number.
      Returns:
        Voice number if defined; `null` otherwise.

    - #### getVoiceExt

          public java.lang.String getVoiceExt()

      Get voice number extension.
      Returns:
        Voice number extension if defined; `null` otherwise.

    - #### setAuthInfo

          public void setAuthInfo(EPPAuthInfo newAuthInfo)

      Set authorization information.
      Parameters:
        `newAuthInfo` - com.verisign.epp.codec.gen.EPPAuthInfo

    - #### hasAuthInfo

          public boolean hasAuthInfo()

      Returns `true` if the contact has auth info.
      Returns:
        `true` if the contact has auth info info `false` otherwise

    - #### setEmail

          public void setEmail(java.lang.String newEmail)

      Set email.
      Parameters:
        `newEmail` - String

    - #### hasEmail

          public boolean hasEmail()

      Returns `true` if the contact has email.
      Returns:
        `true` if the contact has email `false` otherwise

    - #### setFax

          public void setFax(java.lang.String newFax)

      Set fax number.
      Parameters:
        `newFax` - Fax number

    - #### hasFax

          public boolean hasFax()

      Returns `true` if the contact has fax.
      Returns:
        `true` if the contact has fax `false` otherwise

    - #### setFaxExt

          public void setFaxExt(java.lang.String newFaxExt)

      Set fax number extension.
      Parameters:
        `newFaxExt` - Fax number extension

    - #### hasFaxExt

          public boolean hasFaxExt()

      Returns `true` if the contact has fax extension.
      Returns:
        `true` if the contact has fax extension `false` otherwise

    - #### setId

          public void setId(java.lang.String newId)

      Set contact ID.
      Parameters:
        `newId` - String

    - #### hasId

          public boolean hasId()

      Returns `true` if the contact has contact ID.
      Returns:
        `true` if the contact has contact ID `false` otherwise

    - #### setVoice

          public void setVoice(java.lang.String newVoice)

      Set contact voice number.
      Parameters:
        `newVoice` - voice number

    - #### hasVoice

          public boolean hasVoice()

      Returns `true` if the contact has voice.
      Returns:
        `true` if the contact has voice `false` otherwise

    - #### setVoiceExt

          public void setVoiceExt(java.lang.String newVoiceExt)

      Set contact voice extension.
      Parameters:
        `newVoiceExt` - voice extension

    - #### hasVoiceExt

          public boolean hasVoiceExt()

      Returns `true` if the contact has voice extension.
      Returns:
        `true` if the contact has voice extension `false` otherwise