Class EPPContactCreateCmd

All Implemented Interfaces:
EPPCodecComponent, EPPMessage, Serializable, 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:
  • Constructor Details

    • EPPContactCreateCmd

      public EPPContactCreateCmd()
      Default constructor of EPPContactCreateCmd Allocates a new EPPContactCreateCmd with default attribute values.
    • EPPContactCreateCmd

      public EPPContactCreateCmd(String aTransId)
      Constructor of EPPContactCreateCmd Allocates a new EPPContactCreateCmd with the contact definition information.
      Parameters:
      aTransId - command transaction id
    • EPPContactCreateCmd

      public EPPContactCreateCmd(String aTransId, String aId, EPPContactPostalDefinition aPostalContact, 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 Details

    • getNamespace

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

      public String getKey()
      Gets the key for the contact object, which is the contact identifier.
      Overrides:
      getKey in class EPPCommand
      Returns:
      The host identifier if set; null otherwise.
    • doEncode

      protected Element doEncode(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(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(Object aObject)
      Compare an instance of EPPContactCreateCmd 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 EPPContactCreateCmd.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class EPPCommand
      Returns:
      clone of EPPContactCreateCmd
      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.
    • hasPostalContacts

      public boolean hasPostalContacts()
      Returns true if the contact has postal info.
      Returns:
      true if the contact has postal info false otherwise
    • getPostalInfo

      public Vector getPostalInfo()
      Get postalInfo elements of contact.
      Returns:
      java.util.Vector
    • setPostalInfo

      public void setPostalInfo(Vector newPostalContacts)
      Set contact postalInfo.
      Parameters:
      newPostalContacts - java.util.Vector
    • addPostalInfo

      public void addPostalInfo(EPPContactPostalDefinition newPostalInfo)
      Adds contact postalInfo.
      Parameters:
      newPostalInfo - com.verisign.epp.codec.contact.EPPContactPostalDefinition
    • hasAuthInfo

      public boolean hasAuthInfo()
      Returns true if the contact has auth info.
      Returns:
      true if the contact has auth info info false otherwise
    • getAuthInfo

      public EPPAuthInfo getAuthInfo()
      Get authorization information.
      Returns:
      com.verisign.epp.codec.gen.EPPAuthInfo
    • setAuthInfo

      public void setAuthInfo(EPPAuthInfo newAuthInfo)
      Set authorization information.
      Parameters:
      newAuthInfo - com.verisign.epp.codec.gen.EPPAuthInfo
    • hasDisclose

      public boolean hasDisclose()
      Returns true if the contact has disclose flag.
      Returns:
      true if the contact has disclose flag false otherwise
    • 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
    • hasEmail

      public boolean hasEmail()
      Returns true if the contact has email.
      Returns:
      true if the contact has email false otherwise
    • getEmail

      public String getEmail()
      Get email.
      Returns:
      email if defined; null otherwise.
    • setEmail

      public void setEmail(String newEmail)
      Set email.
      Parameters:
      newEmail - String
    • hasFax

      public boolean hasFax()
      Returns true if the contact has fax.
      Returns:
      true if the contact has fax false otherwise
    • getFax

      public String getFax()
      Get fax number.
      Returns:
      Fax number if defined; null otherwise.
    • setFax

      public void setFax(String newFax)
      Set fax number.
      Parameters:
      newFax - Fax number
    • hasFaxExt

      public boolean hasFaxExt()
      Returns true if the contact has fax extension.
      Returns:
      true if the contact has fax extension false otherwise
    • getFaxExt

      public String getFaxExt()
      Get fax number extension.
      Returns:
      fax number extension if defined; null otherwise.
    • setFaxExt

      public void setFaxExt(String newFaxExt)
      Set fax number extension.
      Parameters:
      newFaxExt - Fax number extension
    • hasId

      public boolean hasId()
      Returns true if the contact has contact ID.
      Returns:
      true if the contact has contact ID false otherwise
    • getId

      public String getId()
      Gets the contact id.
      Returns:
      Contact id if set; null otherwise.
    • setId

      public void setId(String aId)
      Set the contact id.
      Parameters:
      aId - String
    • hasVoice

      public boolean hasVoice()
      Returns true if the contact has voice.
      Returns:
      true if the contact has voice false otherwise
    • getVoice

      public String getVoice()
      Get voice number.
      Returns:
      Voice number if defined; null otherwise.
    • setVoice

      public void setVoice(String newVoice)
      Set contact voice number.
      Parameters:
      newVoice - voice number
    • hasVoiceExt

      public boolean hasVoiceExt()
      Returns true if the contact has voice extension.
      Returns:
      true if the contact has voice extension false otherwise
    • getVoiceExt

      public String getVoiceExt()
      Get voice number extension.
      Returns:
      Voice number extension if defined; null otherwise.
    • setVoiceExt

      public void setVoiceExt(String newVoiceExt)
      Set contact voice extension.
      Parameters:
      newVoiceExt - voice extension