Class EPPDomainCreateCmd

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

    public class EPPDomainCreateCmd
    extends EPPCreateCmd
    Represents an EPP Domain <create> command, which provides a transform operation that allows a client to create a domain object. In addition to the standard EPP command elements, the <create> command MUST contain a <domain:create> element that identifies the domain namespace and the location of the domain schema. The <domain:create> element MUST contain the following child elements:

    • A <domain:name> element that contains the fully qualified domain name of the object to be created. Use getName and setName to get and set the element.
    • An OPTIONAL <domain:period> element that contains the initial registration period of the domain object. Use getPeriod and setPeriod to get and set the element. If return null, period has not been specified yet.
    • Zero or more <domain:ns> elements that contain the fully qualified host name of a known host object to provide resolution services for the domain. A host object MUST be known to the server before a domain can be delegated to the host. A server MUST provide host object services to provide domain 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 <domain:registrant> element that contains the identifier for the human or organizational social information (contact) object to be associated with the domain object as the object registrant. This object identifier MUST be known to the server before the contact object can be associated with the domain object. Use getRegistrant and setRegistrant to get and set the elements.
    • Zero or more <domain:contact> elements that contain the registrant, administrative, technical, and billing contact identifiers to be associated with the domain. A contact identifier MUST be known to the server before the contact can be associated with the domain. Only one contact identifier of each type MAY be specified. A server MAY provide contact object services when providing domain 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 <domain:authInfo> element that contains authorization information to be associated with the domain object.

    It is important to note that the transaction identifier associated with successful creation of a domain object becomes the authorization identifier required to transfer sponsorship of the domain object. A client MUST retain all transaction identifiers associated with domain object creation and protect them from disclosure. A client MUST also provide a copy of the transaction identifier information to the domain registrant, who will need this information to request a domain transfer through a different client.

    EPPDomainCreateResp is the concrete EPPReponse associated with EPPDomainCreateCmd.

    See Also:
    EPPDomainCreateResp, Serialized Form
    • Field Detail

      • ELM_LOCALNAME

        public static final java.lang.String ELM_LOCALNAME
        XML local name for EPPDomainCreateCmd.
        See Also:
        Constant Field Values
      • ELM_NAME

        public static final java.lang.String ELM_NAME
        XML Element Name of EPPDomainCreateCmd root element.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EPPDomainCreateCmd

        public EPPDomainCreateCmd()
        Allocates a new EPPDomainCreateCmd with default attribute values. the defaults include the following:

        • name is set to null
        • period is set to UNSPEC_PERIOD
        • servers is set to to null
        • contacts is set to to null
        • transaction id is set to null.

        The name must be set before invoking encode.
      • EPPDomainCreateCmd

        public EPPDomainCreateCmd​(java.lang.String aTransId,
                                  java.lang.String aName,
                                  EPPAuthInfo aAuthInfo)
        Allocates a new EPPDomainCreateCmd with a domain name. The other attributes are initialized as follows:

        • period is set to UNSPEC_PERIOD
        • servers is set to null
        • contacts is set to null
        Parameters:
        aTransId - Transaction Id associated with command.
        aName - Domain name
        aAuthInfo - EPPAuthInfo authorization information
      • EPPDomainCreateCmd

        public EPPDomainCreateCmd​(java.lang.String aTransId,
                                  java.lang.String aName,
                                  java.util.Vector<java.lang.String> aServers,
                                  java.util.Vector<EPPDomainContact> aContacts,
                                  EPPDomainPeriod aPeriod,
                                  EPPAuthInfo aAuthInfo)
        Allocates a new EPPDomainCreateCmd with all attributes specified by the arguments.
        Parameters:
        aTransId - Transaction Id associated with command.
        aName - Domain name
        aServers - Domain name servers names. Set to null if undefined.
        aContacts - Domain contacts. Should be null if the Contact Mapping is not supported.
        aPeriod - Value greater than or equal to MIN_PERIOD or less than or equal to MAX_PERIOD.
        aAuthInfo - EPPAuthInfo authorization information.
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the domain name to create.
        Returns:
        Domain Name
      • setName

        public void setName​(java.lang.String aName)
        Set the domain name to create.
        Parameters:
        aName - Domain Name
      • hasServers

        public boolean hasServers()
        Are there name servers set?
        Returns:
        true if name servers have been set; false otherwise.
      • getServers

        public java.util.Vector<java.lang.String> getServers()
        Gets the name servers. The name servers can either be String instances containing the fully qualified name of a known name server host object, or EPPHostAttr instances containing the fully qualified name of a host and optionally the host IP addresses.
        Returns:
        Vector of name server String instances for host object references or EPPHostAttr instances for host attribute values if exists; null otherwise.
      • setServers

        public void setServers​(java.util.Vector<java.lang.String> aServers)
        Sets the name servers. The name servers can either be String instances containing the fully qualified name of a known name server host object, or EPPHostAttr instances containing the fully qualified name of a host and optionally the host IP addresses.
        Parameters:
        aServers - Vector of name server String instances for host object references or EPPHostAttr instances for host attribute values.
      • addServer

        public void addServer​(java.lang.String aServer)
        Add a name serve instance that is a fully qualified name of a known name server host object.
        Parameters:
        aServer - Fully qualified name of a known name server host object.
      • hasServerAttrs

        public boolean hasServerAttrs()
        Are there name server attributes set?
        Returns:
        true if name server attributes have been set; false otherwise.
      • getServerAttrs

        public java.util.Vector<EPPHostAttr> getServerAttrs()
        Gets the name server attributes. The name servers attributes are EPPHostAttr instances containing the fully qualified name of a host and optionally the host IP addresses.
        Returns:
        Vector of name server EPPHostAttr instances for host attribute values if exists; null otherwise.
      • setServerAttrs

        public void setServerAttrs​(java.util.Vector<EPPHostAttr> aServerAttrs)
        Sets the name server attributes. The name servers attributes are EPPHostAttr instances containing the fully qualified name of a host and optionally the host IP addresses.
        Parameters:
        aServerAttrs - Vector of name server EPPHostAttr instances for host attribute values.
      • addServerAttr

        public void addServerAttr​(EPPHostAttr aServerAttr)
        Add a name serve attribute instance that is a fully qualified name of a host and optionally the host IP addresses.
        Parameters:
        aServerAttr - A fully qualified name of a host and optionally the host IP addresses.
      • hasContacts

        public boolean hasContacts()
        Are there contacts set?
        Returns:
        true if contacts have been set; false otherwise.
      • getContacts

        public java.util.Vector<EPPDomainContact> getContacts()
        Gets the contacts.
        Returns:
        Vector of EPPDomainContact instances if defined; null otherwise.
      • setContacts

        public void setContacts​(java.util.Vector<EPPDomainContact> aContacts)
        Sets the contacts.
        Parameters:
        aContacts - Vector of EPPDomainContact instances.
      • addContact

        public void addContact​(EPPDomainContact aContact)
        Adds a contact to the list of domain contacts.
        Parameters:
        aContact - Contact to add to the domain.
      • equals

        public boolean equals​(java.lang.Object aObject)
        Compare an instance of EPPDomainCreateCmd 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 EPPDomainCreateCmd.
        Specified by:
        clone in interface EPPCodecComponent
        Overrides:
        clone in class EPPCommand
        Returns:
        clone of EPPDomainCreateCmd
        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
      • getPeriod

        public EPPDomainPeriod getPeriod()
        Gets the registration period in years.
        Returns:
        Registration Period in years.
      • getRegistrant

        public java.lang.String getRegistrant()
        Get registrant.
        Returns:
        String
      • setAuthInfo

        public void setAuthInfo​(EPPAuthInfo aAuthInfo)
        Set authorization information
        Parameters:
        aAuthInfo - String
      • setPeriod

        public void setPeriod​(EPPDomainPeriod aPeriod)
        Sets the registration period in years.
        Parameters:
        aPeriod - Registration Period in years.
      • setRegistrant

        public void setRegistrant​(java.lang.String newRegistrant)
        Set registrant.
        Parameters:
        newRegistrant - String
      • doEncode

        protected org.w3c.dom.Element doEncode​(org.w3c.dom.Document aDocument)
                                        throws EPPEncodeException
        Encode a DOM Element tree from the attributes of the EPPDomainCreateCmd 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 EPPDomainCreateCmd instance.
        Throws:
        EPPEncodeException - Unable to encode EPPDomainCreateCmd instance.
      • doDecode

        protected void doDecode​(org.w3c.dom.Element aElement)
                         throws EPPDecodeException
        Decode the EPPDomainCreateCmd attributes from the aElement DOM Element tree.
        Specified by:
        doDecode in class EPPCreateCmd
        Parameters:
        aElement - Root DOM Element to decode EPPDomainCreateCmd from.
        Throws:
        EPPDecodeException - Unable to decode aElement