Class EPPDefRegCreateCmd

All Implemented Interfaces:
EPPCodecComponent, EPPMessage, Serializable, 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. The <defReg:create> element MUST contain the following child elements:

  • A <defReg:name> element that contains the name of the defReg object to be created.
  • An OPTIONAL <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. This object identifier MUST be known to the server before the contact object can be associated with the defReg object.
  • An OPTIONAL <defReg:tm> element that contains the trademark identifier (ID) associated with the defReg object.
  • An OPTIONAL <defReg:tmcountry> element that indicates the country which issued the trademark associated with the defReg object.
  • An OPTIONAL <defReg:tmdate> element that indicates the date when the trademark was issued for the defReg object.
  • An OPTIONAL <defReg:period> element that contains the initial registration period of the defReg object. A server MAY define a default initial registration period if not specified by the client.
  • An OPTIONAL <defReg:adminContact> element that contains the identifier for the administrator associated with the defReg object.
  • 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:
  • Field Details

    • ATTR_LEVELID

      protected static final String ATTR_LEVELID
      XML Element roid attribute name of EPPAuthInfo root element.
      See Also:
  • Constructor Details

    • 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 tonull.
      • tmcountry is set tonull.
      • tmdate is set tonull.
      • admincontact is set tonull.

      The name must be set before invoking encode.
    • EPPDefRegCreateCmd

      public EPPDefRegCreateCmd(String aTransId, EPPDefRegName aDefRegName, String aRegistrant, String aTm, String aTmCountry, Date aTmDate, 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 Details

    • getNamespace

      public 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
    • getKey

      public String getKey()
      Gets the key for the defensive registration object, which is the defensive registration name.
      Overrides:
      getKey in class EPPCommand
      Returns:
      The defensive registration name if set; null otherwise.
    • 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 String getRegistrant()
      Get the registrant information.
      Returns:
      DefReg registrant
    • setRegistrant

      public void setRegistrant(String aRegistrant)
      Set the registrant information.
      Parameters:
      aRegistrant - DefReg registrant
    • getTm

      public String getTm()
      Get the trademark information.
      Returns:
      DefReg tradeMark
    • setTm

      public void setTm(String aTm)
      Set the trademark information.
      Parameters:
      aTm - DefReg registrant
    • getTmCountry

      public String getTmCountry()
      Get the trademark country information.
      Returns:
      DefReg trademark country
    • setTmCountry

      public void setTmCountry(String aTmCountry)
      Set the trademark country information.
      Parameters:
      aTmCountry - DefReg trademark country
    • getTmDate

      public Date getTmDate()
      Get the trademark date information.
      Returns:
      DefReg trademark date
    • setTmDate

      public void setTmDate(Date aTmDate)
      Set the trademark date information.
      Parameters:
      aTmDate - DefReg trademark date
    • getAdminContact

      public 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(Object aObject)
      Compare an instance of EPPDefRegCreateCmd with this instance.
      Overrides:
      equals in class EPPCreateCmd
      Parameters:
      aObject - Object to compare with.
      Returns:
      true if equal; false otherwise
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPDefRegCreateCmd.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class EPPCommand
      Returns:
      clone of EPPDefRegCreateCmd
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • toString

      public 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 Element doEncode(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(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