Class 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
    • 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

      • 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:
        true if equal; false otherwise
      • 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.
      • hasPostalContacts

        public boolean hasPostalContacts()
        Returns true if the contact has postal info.
        Returns:
        true if the contact has postal info false 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
      • 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 java.lang.String getEmail()
        Get email.
        Returns:
        email if defined; null otherwise.
      • setEmail

        public void setEmail​(java.lang.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 java.lang.String getFax()
        Get fax number.
        Returns:
        Fax number if defined; null otherwise.
      • setFax

        public void setFax​(java.lang.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 java.lang.String getFaxExt()
        Get fax number extension.
        Returns:
        fax number extension if defined; null otherwise.
      • setFaxExt

        public void setFaxExt​(java.lang.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 java.lang.String getId()
        Gets the contact id.
        Returns:
        Contact id if set; null otherwise.
      • setId

        public void setId​(java.lang.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 java.lang.String getVoice()
        Get voice number.
        Returns:
        Voice number if defined; null otherwise.
      • setVoice

        public void setVoice​(java.lang.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 java.lang.String getVoiceExt()
        Get voice number extension.
        Returns:
        Voice number extension if defined; null otherwise.
      • setVoiceExt

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