com.verisign.epp.codec.nameWatch

## Class EPPNameWatchCreateCmd

- java.lang.Object
- - com.verisign.epp.codec.gen.EPPCommand
  - - com.verisign.epp.codec.gen.EPPCreateCmd
    - - com.verisign.epp.codec.nameWatch.EPPNameWatchCreateCmd

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

      public class EPPNameWatchCreateCmd
      extends EPPCreateCmd

  Represents an EPP NameWatch <create> command, which provides a transform operation that allows a client to create a nameWatch object. In addition to the standard EPP command elements, the <create> command MUST contain a <nameWatch:create> element that identifies the nameWatch namespace and the location of the nameWatch schema. The <nameWatch:create> element MUST contain the following child elements:
  - A <nameWatch:name> element that contains the fully qualified nameWatch name of the object to be created. Use `getName` and `setName` to get and set the element.
  - An OPTIONAL <nameWatch:period> element that contains the initial registration period of the nameWatch object. Use `getPeriod` and `setPeriod` to get and set the element. If return `null`, period has not been specified yet.
  - Zero or more <nameWatch:ns> elements that contain the fully qualified host name of a known host object to provide resolution services for the nameWatch. A host object MUST be known to the server before a nameWatch can be delegated to the host. A server MUST provide host object services to provide nameWatch name services. The EPP mapping for host objects is described in [EPP-H]. Use `getServers` and `setServers` to get and set the elements.
  - An OPTIONAL <nameWatch:registrant> element that contains the identifier for the human or organizational social information (contact) object to be associated with the nameWatch object as the object registrant. This object identifier MUST be known to the server before the contact object can be associated with the nameWatch object. Use `getRegistrant` and `setRegistrant` to get and set the elements.
  - Zero or more <nameWatch:contact> elements that contain the registrant, administrative, technical, and billing contact identifiers to be associated with the nameWatch. A contact identifier MUST be known to the server before the contact can be associated with the nameWatch. Only one contact identifier of each type MAY be specified. A server MAY provide contact object services when providing nameWatch name object services. The EPP mapping for contact objects is described in [EPP-C]. Use `getContacts` and `setContacts` to get and set the elements. Contacts should only be specified if the Contact Mapping is supported.
  - A <nameWatch:authInfo> element that contains authorization information to be associated with the nameWatch object.
  It is important to note that the transaction identifier associated with successful creation of a nameWatch object becomes the authorization identifier required to transfer sponsorship of the nameWatch object. A client MUST retain all transaction identifiers associated with nameWatch object creation and protect them from disclosure. A client MUST also provide a copy of the transaction identifier information to the nameWatch registrant, who will need this information to request a nameWatch transfer through a different client.
  `EPPNameWatchCreateResp` is the concrete `EPPReponse` associated with `EPPNameWatchCreateCmd`.
  See Also:
    `EPPNameWatchCreateResp`, 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
    `EPPNameWatchCreateCmd()` Allocates a new `EPPNameWatchCreateCmd` with default attribute values.
    `EPPNameWatchCreateCmd(java.lang.String aTransId, java.lang.String aName)` Allocates a new `EPPNameWatchCreateCmd` with default attribute values.
    `EPPNameWatchCreateCmd(java.lang.String aTransId, java.lang.String aName, java.lang.String aRegistrant, EPPNameWatchRptTo aRptTo, EPPAuthInfo aAuthInfo)` Allocates a new `EPPNameWatchCreateCmd` with a nameWatch name.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone `EPPNameWatchCreateCmd`.
    `protected void` | `doDecode(org.w3c.dom.Element aElement)` Decode the EPPNameWatchCreateCmd 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 EPPNameWatchCreateCmd instance.
    `boolean` | `equals(java.lang.Object aObject)` Compare an instance of `EPPNameWatchCreateCmd` with this instance.
    `EPPAuthInfo` | `getAuthInfo()` Get authorization information
    `java.lang.String` | `getName()` Gets NameWatch name.
    `java.lang.String` | `getNamespace()` Get the EPP command Namespace associated with EPPNameWatchCreateCmd.
    `EPPNameWatchPeriod` | `getPeriod()` Get NameWatch period.
    `java.lang.String` | `getRegistrant()` Get registrant.
    `EPPNameWatchRptTo` | `getRptTo()` Gets NameWatch report to specification, which includes the e-mail address and the frequency.
    `void` | `setAuthInfo(EPPAuthInfo newAuthInfo)` Set authorization information
    `void` | `setName(java.lang.String aName)` Sets NameWatch name.
    `void` | `setPeriod(EPPNameWatchPeriod newPeriod)` Set NameWatch period.
    `void` | `setRegistrant(java.lang.String newRegistrant)` Set registrant.
    `void` | `setRptTo(EPPNameWatchRptTo aRptTo)` Sets NameWatch Report to specification, which includes the e-mail address and frequency.
    `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

    - #### EPPNameWatchCreateCmd

          public EPPNameWatchCreateCmd()

      Allocates a new `EPPNameWatchCreateCmd` with default attribute values. the defaults include the following:
      - name is set to `null`
      - registrant is set to to `null`
      - rptTo is set to `null`
      - period is set to 0
      - authInfo is set to `null`
      The name, registrant, rptTo, and authInfo must be set before invoking `encode`.

    - #### EPPNameWatchCreateCmd

          public EPPNameWatchCreateCmd(java.lang.String aTransId,
                                       java.lang.String aName)

      Allocates a new `EPPNameWatchCreateCmd` with default attribute values. the defaults include the following:
      - registrant is set to to `null`
      - rptTo is set to `null`
      - period is set to `null`
      - authInfo is set to `null`
      The registrant, rptTo, and authInfo must be set before invoking `encode`.
      Parameters:
        `aTransId` - DOCUMENT ME!
        `aName` - DOCUMENT ME!

    - #### EPPNameWatchCreateCmd

          public EPPNameWatchCreateCmd(java.lang.String aTransId,
                                       java.lang.String aName,
                                       java.lang.String aRegistrant,
                                       EPPNameWatchRptTo aRptTo,
                                       EPPAuthInfo aAuthInfo)

      Allocates a new `EPPNameWatchCreateCmd` with a nameWatch name. The other attributes are initialized as follows:
      - period is default to 0
      Parameters:
        `aTransId` - Transaction Id associated with command.
        `aName` - NameWatch name
        `aRegistrant` - NameWatch registrant
        `aRptTo` - EPPNameWatchRptTo rptTo
        `aAuthInfo` - EPPAuthInfo authorization information

  - ### Method Detail

    - #### getNamespace

          public java.lang.String getNamespace()

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

    - #### getName

          public java.lang.String getName()

      Gets NameWatch name.
      Returns:
        NameWatch Name

    - #### setName

          public void setName(java.lang.String aName)

      Sets NameWatch name.
      Parameters:
        `aName` - NameWatch Name

    - #### getRptTo

          public EPPNameWatchRptTo getRptTo()

      Gets NameWatch report to specification, which includes the e-mail address and the frequency.
      Returns:
        Report to specification if defined; `null` otherwise.

    - #### setRptTo

          public void setRptTo(EPPNameWatchRptTo aRptTo)

      Sets NameWatch Report to specification, which includes the e-mail address and frequency.
      Parameters:
        `aRptTo` - to specification.

    - #### getPeriod

          public EPPNameWatchPeriod getPeriod()

      Get NameWatch period.
      Returns:
        period if defined; `null` otherwise.

    - #### setPeriod

          public void setPeriod(EPPNameWatchPeriod newPeriod)

      Set NameWatch period.
      Parameters:
        `newPeriod` - NameWatch period

    - #### equals

          public boolean equals(java.lang.Object aObject)

      Compare an instance of `EPPNameWatchCreateCmd` 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 `EPPNameWatchCreateCmd`.
      Specified by:
        `clone` in interface `EPPCodecComponent`
      Overrides:
        `clone` in class `EPPCommand`
      Returns:
        clone of `EPPNameWatchCreateCmd`
      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.

    - #### getAuthInfo

          public EPPAuthInfo getAuthInfo()

      Get authorization information
      Returns:
        EPPAuthInfo

    - #### getRegistrant

          public java.lang.String getRegistrant()

      Get registrant.
      Returns:
        registrant

    - #### setAuthInfo

          public void setAuthInfo(EPPAuthInfo newAuthInfo)

      Set authorization information
      Parameters:
        `newAuthInfo` - EPPAuthInfo

    - #### setRegistrant

          public void setRegistrant(java.lang.String newRegistrant)

      Set registrant.
      Parameters:
        `newRegistrant` - NameWatch registrant

    - #### doEncode

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

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

    - #### doDecode

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

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