Package com.verisign.epp.codec.domain
Class EPPDomainCreateCmd
java.lang.Object
com.verisign.epp.codec.gen.EPPCommand
com.verisign.epp.codec.gen.EPPCreateCmd
com.verisign.epp.codec.domain.EPPDomainCreateCmd
- All Implemented Interfaces:
EPPCodecComponent,EPPMessage,Serializable,Cloneable
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:
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.
- A <domain:name> element that contains the fully qualified domain
name of the object to be created. Use
getNameandsetNameto get and set the element. - An OPTIONAL <domain:period> element that contains the initial
registration period of the domain object. Use
getPeriodandsetPeriodto get and set the element. If returnnull, 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
getServersandsetServersto 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
getRegistrantandsetRegistrantto 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
getContactsandsetContactsto 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML local name forEPPDomainCreateCmd.static final StringXML Element Name ofEPPDomainCreateCmdroot 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
ConstructorsConstructorDescriptionAllocates a newEPPDomainCreateCmdwith default attribute values.EPPDomainCreateCmd(String aTransId, String aName, EPPAuthInfo aAuthInfo) Allocates a newEPPDomainCreateCmdwith a domain name.EPPDomainCreateCmd(String aTransId, String aName, Vector<String> aServers, Vector<EPPDomainContact> aContacts, EPPDomainPeriod aPeriod, EPPAuthInfo aAuthInfo) Allocates a newEPPDomainCreateCmdwith all attributes specified by the arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContact(EPPDomainContact aContact) Adds a contact to the list of domain contacts.voidAdd a name serve instance that is a fully qualified name of a known name server host object.voidaddServerAttr(EPPHostAttr aServerAttr) Add a name serve attribute instance that is a fully qualified name of a host and optionally the host IP addresses.clone()CloneEPPDomainCreateCmd.protected voidDecode the EPPDomainCreateCmd attributes from the aElement DOM Element tree.protected ElementEncode a DOM Element tree from the attributes of the EPPDomainCreateCmd instance.booleanCompare an instance ofEPPDomainCreateCmdwith this instance.Get authorization informationGets the contacts.getKey()Gets the key for the domain name object, which is the domain name.getName()Get the domain name to create.Get the EPP command Namespace associated with EPPDomainCreateCmd.Gets the registration period in years.Get registrant.Gets the name server attributes.Gets the name servers.booleanAre there contacts set?booleanAre there name server attributes set?booleanAre there name servers set?voidsetAuthInfo(EPPAuthInfo aAuthInfo) Set authorization informationvoidsetContacts(Vector<EPPDomainContact> aContacts) Sets the contacts.voidSet the domain name to create.voidsetPeriod(EPPDomainPeriod aPeriod) Sets the registration period in years.voidsetRegistrant(String newRegistrant) Set registrant.voidsetServerAttrs(Vector<EPPHostAttr> aServerAttrs) Sets the name server attributes.voidsetServers(Vector<String> aServers) Sets the name servers.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.Methods inherited from class com.verisign.epp.codec.gen.EPPCreateCmd
doGenDecode, doGenEncode, getTypeMethods inherited from class com.verisign.epp.codec.gen.EPPCommand
addExtension, decode, encode, findDuplicateExtNamespaces, findExtNamespaces, findExtNamespaceSuffixes, findUnsupportedExtNamespaces, findUnsupportedExtNamespaceSuffixes, getExtension, getExtension, getExtensions, getOp, getTransId, hasExtension, hasExtensions, hasKey, hasTransId, setExtension, setExtensions, setTransId
-
Field Details
-
ELM_LOCALNAME
XML local name forEPPDomainCreateCmd.- See Also:
-
ELM_NAME
XML Element Name ofEPPDomainCreateCmdroot element.- See Also:
-
-
Constructor Details
-
EPPDomainCreateCmd
public EPPDomainCreateCmd()Allocates a newEPPDomainCreateCmdwith 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 invokingencode. - name is set to
-
EPPDomainCreateCmd
Allocates a newEPPDomainCreateCmdwith 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 nameaAuthInfo- EPPAuthInfo authorization information
- period is set to
-
EPPDomainCreateCmd
public EPPDomainCreateCmd(String aTransId, String aName, Vector<String> aServers, Vector<EPPDomainContact> aContacts, EPPDomainPeriod aPeriod, EPPAuthInfo aAuthInfo) Allocates a newEPPDomainCreateCmdwith all attributes specified by the arguments.- Parameters:
aTransId- Transaction Id associated with command.aName- Domain nameaServers- Domain name servers names. Set tonullif undefined.aContacts- Domain contacts. Should benullif the Contact Mapping is not supported.aPeriod- Value greater than or equal toMIN_PERIODor less than or equal toMAX_PERIOD.aAuthInfo- EPPAuthInfo authorization information.
-
-
Method Details
-
getNamespace
Get the EPP command Namespace associated with EPPDomainCreateCmd.- Specified by:
getNamespacein interfaceEPPCodecComponent- Specified by:
getNamespacein interfaceEPPMessage- Specified by:
getNamespacein classEPPCommand- Returns:
EPPDomainMapFactory.NS
-
getKey
Gets the key for the domain name object, which is the domain name.- Overrides:
getKeyin classEPPCommand- Returns:
- The domain name if set;
nullotherwise.
-
getName
Get the domain name to create.- Returns:
- Domain Name
-
setName
Set the domain name to create.- Parameters:
aName- Domain Name
-
hasServers
public boolean hasServers()Are there name servers set?- Returns:
trueif name servers have been set;falseotherwise.
-
getServers
Gets the name servers. The name servers can either beStringinstances containing the fully qualified name of a known name server host object, orEPPHostAttrinstances containing the fully qualified name of a host and optionally the host IP addresses.- Returns:
Vectorof name serverStringinstances for host object references orEPPHostAttrinstances for host attribute values if exists;nullotherwise.
-
setServers
Sets the name servers. The name servers can either beStringinstances containing the fully qualified name of a known name server host object, orEPPHostAttrinstances containing the fully qualified name of a host and optionally the host IP addresses.- Parameters:
aServers-Vectorof name serverStringinstances for host object references orEPPHostAttrinstances for host attribute values.
-
addServer
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:
trueif name server attributes have been set;falseotherwise.
-
getServerAttrs
Gets the name server attributes. The name servers attributes areEPPHostAttrinstances containing the fully qualified name of a host and optionally the host IP addresses.- Returns:
Vectorof name serverEPPHostAttrinstances for host attribute values if exists;nullotherwise.
-
setServerAttrs
Sets the name server attributes. The name servers attributes areEPPHostAttrinstances containing the fully qualified name of a host and optionally the host IP addresses.- Parameters:
aServerAttrs-Vectorof name serverEPPHostAttrinstances for host attribute values.
-
addServerAttr
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:
trueif contacts have been set;falseotherwise.
-
getContacts
Gets the contacts.- Returns:
VectorofEPPDomainContactinstances if defined;nullotherwise.
-
setContacts
Sets the contacts.- Parameters:
aContacts-VectorofEPPDomainContactinstances.
-
addContact
Adds a contact to the list of domain contacts.- Parameters:
aContact- Contact to add to the domain.
-
equals
Compare an instance ofEPPDomainCreateCmdwith this instance.- Overrides:
equalsin classEPPCreateCmd- Parameters:
aObject- Object to compare with.- Returns:
trueif equal;falseotherwise.
-
clone
CloneEPPDomainCreateCmd.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPCommand- Returns:
- clone of
EPPDomainCreateCmd - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classEPPCommand- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getAuthInfo
Get authorization information- Returns:
- EPPAuthInfo
-
getPeriod
Gets the registration period in years.- Returns:
- Registration Period in years.
-
getRegistrant
Get registrant.- Returns:
- String
-
setAuthInfo
Set authorization information- Parameters:
aAuthInfo- String
-
setPeriod
Sets the registration period in years.- Parameters:
aPeriod- Registration Period in years.
-
setRegistrant
Set registrant.- Parameters:
newRegistrant- String
-
doEncode
Encode a DOM Element tree from the attributes of the EPPDomainCreateCmd instance.- Specified by:
doEncodein classEPPCreateCmd- 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
Decode the EPPDomainCreateCmd attributes from the aElement DOM Element tree.- Specified by:
doDecodein classEPPCreateCmd- Parameters:
aElement- Root DOM Element to decode EPPDomainCreateCmd from.- Throws:
EPPDecodeException- Unable to decode aElement
-