Package com.verisign.epp.codec.defReg

## Class EPPDefRegCreateCmd

- java.lang.Object
- - com.verisign.epp.codec.gen.EPPCommand
  - - com.verisign.epp.codec.gen.EPPCreateCmd
    - - com.verisign.epp.codec.defReg.EPPDefRegCreateCmd

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

      public class EPPDefRegCreateCmd
      extends EPPCreateCmd

  Represents an EPPDefReg <create> command, which provides a transform operation that allows a client to create a defReg object. In addition to the standard EPP command elements, the <create> command MUST contain a <defReg:create> element that identifies the defReg namespace and the location of the defReg schema. The <defReg:create> element MUST contain the following child elements:
  - A <defReg:name> element that contains name information associated with the defReg object. Use `getName` and `setName` to get and set the defReg object.
  - An <defReg:registrant> element that contains the identifier for the human or organizational social information (contact) object to be associated with the defReg object as the object registrant. Use `getRegistrant` and `setRegistrant` to get and set the elements.
  - A <defReg:tm> OPTIONAL element that contains trademark information to be associated with the defReg object.
  - A <defReg:tmcountry> OPTIONAL element that contains trademark country information to be associated with the defReg object.
  - A <defReg:tmdate> OPTIONAL element that contains tradeamark date information to be associated with the defReg object.
  - A <defReg:admincontact> element that contains admincontact information to be associated with the defReg object.
  - An OPTIONAL <defReg:period> element that contains the initial registration period of the defReg object. Use `getPeriod` and `setPeriod` to get and set the element. If return `null`, period has not been specified yet.
  - A <defReg:authInfo> element that contains authorization information to be associated with the defReg object.
  It is important to note that the transaction identifier associated with successful creation of a defReg object becomes the authorization identifier required to transfer sponsorship of the defReg object. A client MUST retain all transaction identifiers associated with defReg object creation and protect them from disclosure. A client MUST also provide a copy of the transaction identifier information to the defReg registrant, who will need this information to request a defReg transfer through a different client.
  `EPPDefRegCreateResp` is the concrete `EPPReponse` associated with `EPPDefRegCreateCmd`.
  See Also:
    `EPPDefRegCreateResp`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected static java.lang.String` | `ATTR_LEVELID` | XML Element roid attribute name of `EPPAuthInfo` root element.

    - ### 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 | Description
    --- | ---
    `EPPDefRegCreateCmd()` | Allocates a new `EPPDefRegCreateCmd` with default attribute values.
    `EPPDefRegCreateCmd​(java.lang.String aTransId, EPPDefRegName aDefRegName, java.lang.String aRegistrant, java.lang.String aTm, java.lang.String aTmCountry, java.util.Date aTmDate, java.lang.String aAdminContact, EPPDefRegPeriod aPeriod, EPPAuthInfo aAuthInfo)` | Allocates a new `EPPDefRegCreateCmd` with all attributes specified by the arguments.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `clone()` | Clone `EPPDefRegCreateCmd`.
    `protected void` | `doDecode​(org.w3c.dom.Element aElement)` | Decode the EPPDefRegCreateCmd 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 EPPDefRegCreateCmd instance.
    `boolean` | `equals​(java.lang.Object aObject)` | Compare an instance of `EPPDefRegCreateCmd` with this instance.
    `java.lang.String` | `getAdminContact()` | Get the AdminContact information.
    `EPPAuthInfo` | `getAuthInfo()` | Get authorization information
    `EPPDefRegName` | `getDefRegName()` | Get the EPPDefRegName information.
    `java.lang.String` | `getNamespace()` | Get the EPP command Namespace associated with EPPDefRegCreateCmd.
    `EPPDefRegPeriod` | `getPeriod()` | Gets the registration period in years.
    `java.lang.String` | `getRegistrant()` | Get the registrant information.
    `java.lang.String` | `getTm()` | Get the trademark information.
    `java.lang.String` | `getTmCountry()` | Get the trademark country information.
    `java.util.Date` | `getTmDate()` | Get the trademark date information.
    `void` | `setAuthInfo​(EPPAuthInfo newAuthInfo)` | Set authorization information
    `void` | `setDefRegName​(EPPDefRegName aName)` | Set the defRegName information.
    `void` | `setPeriod​(EPPDefRegPeriod aPeriod)` | Sets the registration period in years.
    `void` | `setRegistrant​(java.lang.String aRegistrant)` | Set the registrant information.
    `void` | `setTm​(java.lang.String aTm)` | Set the trademark information.
    `void` | `setTmCountry​(java.lang.String aTmCountry)` | Set the trademark country information.
    `void` | `setTmDate​(java.util.Date aTmDate)` | Set the trademark date information.
    `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, findExtNamespaces, findExtNamespaceSuffixes, findUnsupportedExtNamespaces, findUnsupportedExtNamespaceSuffixes, 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`

- - ### Field Detail

    - #### ATTR_LEVELID

          protected static final java.lang.String ATTR_LEVELID

      XML Element roid attribute name of `EPPAuthInfo` root element.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EPPDefRegCreateCmd

          public EPPDefRegCreateCmd()

      Allocates a new `EPPDefRegCreateCmd` with default attribute values. the defaults include the following:
      - name is set to `null`
      - registrant is set to `null`
      - period is set to `UNSPEC_PERIOD`
      - tm is set to`null`.
      - tmcountry is set to`null`.
      - tmdate is set to`null`.
      - admincontact is set to`null`.
      The name must be set before invoking `encode`.

    - #### EPPDefRegCreateCmd

          public EPPDefRegCreateCmd​(java.lang.String aTransId,
                                    EPPDefRegName aDefRegName,
                                    java.lang.String aRegistrant,
                                    java.lang.String aTm,
                                    java.lang.String aTmCountry,
                                    java.util.Date aTmDate,
                                    java.lang.String aAdminContact,
                                    EPPDefRegPeriod aPeriod,
                                    EPPAuthInfo aAuthInfo)

      Allocates a new `EPPDefRegCreateCmd` with all attributes specified by the arguments.
      Parameters:
        `aTransId` - Transaction Id associated with command.
        `aDefRegName` - EPPDefRegName name
        `aRegistrant` - DefReg Registrant
        `aTm` - DefReg TradeMark
        `aTmCountry` - DefReg TradeMarkCountry
        `aTmDate` - DefReg TradeMarkDate
        `aAdminContact` - DefReg AdminContact
        `aPeriod` - DefReg Registration Period.
        `aAuthInfo` - EPPAuthInfo authorization information

  - ### Method Detail

    - #### getNamespace

          public java.lang.String getNamespace()

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

    - #### getDefRegName

          public EPPDefRegName getDefRegName()

      Get the EPPDefRegName information.
      Returns:
        EPPDefRegName element

    - #### setDefRegName

          public void setDefRegName​(EPPDefRegName aName)

      Set the defRegName information.
      Parameters:
        `aName` - EPPDefRegName name object

    - #### getRegistrant

          public java.lang.String getRegistrant()

      Get the registrant information.
      Returns:
        DefReg registrant

    - #### setRegistrant

          public void setRegistrant​(java.lang.String aRegistrant)

      Set the registrant information.
      Parameters:
        `aRegistrant` - DefReg registrant

    - #### getTm

          public java.lang.String getTm()

      Get the trademark information.
      Returns:
        DefReg tradeMark

    - #### setTm

          public void setTm​(java.lang.String aTm)

      Set the trademark information.
      Parameters:
        `aTm` - DefReg registrant

    - #### getTmCountry

          public java.lang.String getTmCountry()

      Get the trademark country information.
      Returns:
        DefReg trademark country

    - #### setTmCountry

          public void setTmCountry​(java.lang.String aTmCountry)

      Set the trademark country information.
      Parameters:
        `aTmCountry` - DefReg trademark country

    - #### getTmDate

          public java.util.Date getTmDate()

      Get the trademark date information.
      Returns:
        DefReg trademark date

    - #### setTmDate

          public void setTmDate​(java.util.Date aTmDate)

      Set the trademark date information.
      Parameters:
        `aTmDate` - DefReg trademark date

    - #### getAdminContact

          public java.lang.String getAdminContact()

      Get the AdminContact information.
      Returns:
        DefReg AdminContact

    - #### getAuthInfo

          public EPPAuthInfo getAuthInfo()

      Get authorization information
      Returns:
        EPPAuthInfo

    - #### getPeriod

          public EPPDefRegPeriod getPeriod()

      Gets the registration period in years.
      Returns:
        Registration Period in years.

    - #### setAuthInfo

          public void setAuthInfo​(EPPAuthInfo newAuthInfo)

      Set authorization information
      Parameters:
        `newAuthInfo` - java.lang.String

    - #### setPeriod

          public void setPeriod​(EPPDefRegPeriod aPeriod)

      Sets the registration period in years.
      Parameters:
        `aPeriod` - Registration Period in years.

    - #### equals

          public boolean equals​(java.lang.Object aObject)

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

    - #### doEncode

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

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

    - #### doDecode

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

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