Package com.verisign.epp.codec.contact
Class EPPContactCreateCmd
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPCommand
-
- com.verisign.epp.codec.gen.EPPCreateCmd
-
- com.verisign.epp.codec.contact.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
andsetId
to get and set the elements. - A <contact:postalInfo> element that contains the postal contacts.
Use
getPostalInfo
,addPostalInfo
andsetPostalInfo
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
andsetI15d
to get and set the elements. - An OPTIONAL <contact:voice> element that contains the contact's
voice telephone number. Use
getVoice
andsetVoice
to get and set the elements. - An OPTIONAL <contact:fax> element that contains the contact's
facsimile telephone number. Use
getFax
andsetFax
to get and set the elements. - A <contact:email> element that contains the contact's e-mail
address. Use
getEmail
andsetEmail
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
andsetAuthInfo
to get and set the element.
EPPContactCreateReponse
is the response associated withEPPContactCreateCmd
.
- See Also:
EPPResponse
,EPPContactPostalDefinition
, Serialized Form
-
-
Field Summary
-
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
Constructors Constructor Description EPPContactCreateCmd()
Default constructor of EPPContactCreateCmd Allocates a newEPPContactCreateCmd
with default attribute values.EPPContactCreateCmd(java.lang.String aTransId)
Constructor of EPPContactCreateCmd Allocates a newEPPContactCreateCmd
with the contact definition information.EPPContactCreateCmd(java.lang.String aTransId, java.lang.String aId, EPPContactPostalDefinition aPostalContact, java.lang.String aEmail, EPPAuthInfo aAuthInfo)
Constructor of EPPContactCreateCmd Allocates a newEPPContactCreateCmd
with the contact definition information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPostalInfo(EPPContactPostalDefinition newPostalInfo)
Adds contact postalInfo.java.lang.Object
clone()
CloneEPPContactCreateCmd
.protected void
doDecode(org.w3c.dom.Element aElement)
Decode the EPPContactCreateCmd attributes from the aElement DOM Element tree.protected org.w3c.dom.Element
doEncode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of the EPPContactCreateCmd instance.boolean
equals(java.lang.Object aObject)
Compare an instance ofEPPContactCreateCmd
with this instance.EPPAuthInfo
getAuthInfo()
Get authorization information.EPPContactDisclose
getDisclose()
Get disclose information.java.lang.String
getEmail()
Get email.java.lang.String
getFax()
Get fax number.java.lang.String
getFaxExt()
Get fax number extension.java.lang.String
getId()
Gets the contact id.java.lang.String
getNamespace()
Get the EPP command Namespace associated with EPPContactCreateCmd.java.util.Vector
getPostalInfo()
Get postalInfo elements of contact.java.lang.String
getVoice()
Get voice number.java.lang.String
getVoiceExt()
Get voice number extension.boolean
hasAuthInfo()
Returnstrue
if the contact has auth info.boolean
hasDisclose()
Returnstrue
if the contact has disclose flag.boolean
hasEmail()
Returnstrue
if the contact has email.boolean
hasFax()
Returnstrue
if the contact has fax.boolean
hasFaxExt()
Returnstrue
if the contact has fax extension.boolean
hasId()
Returnstrue
if the contact has contact ID.boolean
hasPostalContacts()
Returnstrue
if the contact has postal info.boolean
hasVoice()
Returnstrue
if the contact has voice.boolean
hasVoiceExt()
Returnstrue
if the contact has voice extension.void
setAuthInfo(EPPAuthInfo newAuthInfo)
Set authorization information.void
setDisclose(EPPContactDisclose newDisclose)
Set disclose information.void
setEmail(java.lang.String newEmail)
Set email.void
setFax(java.lang.String newFax)
Set fax number.void
setFaxExt(java.lang.String newFaxExt)
Set fax number extension.void
setId(java.lang.String aId)
Set the contact id.void
setPostalInfo(java.util.Vector newPostalContacts)
Set contact postalInfo.void
setVoice(java.lang.String newVoice)
Set contact voice number.void
setVoiceExt(java.lang.String newVoiceExt)
Set contact voice extension.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.-
Methods inherited from class com.verisign.epp.codec.gen.EPPCreateCmd
doGenDecode, doGenEncode, getType
-
Methods inherited from class com.verisign.epp.codec.gen.EPPCommand
addExtension, decode, encode, findDuplicateExtNamespaces, findExtNamespaces, findExtNamespaceSuffixes, findUnsupportedExtNamespaces, findUnsupportedExtNamespaceSuffixes, getExtension, getExtension, getExtensions, getOp, getTransId, hasExtension, hasExtensions, hasTransId, setExtension, setExtensions, setTransId
-
-
-
-
Constructor Detail
-
EPPContactCreateCmd
public EPPContactCreateCmd()
Default constructor of EPPContactCreateCmd Allocates a newEPPContactCreateCmd
with default attribute values.
-
EPPContactCreateCmd
public EPPContactCreateCmd(java.lang.String aTransId)
Constructor of EPPContactCreateCmd Allocates a newEPPContactCreateCmd
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 newEPPContactCreateCmd
with the contact definition information.- Parameters:
aTransId
- command transaction idaId
- String IDaPostalContact
- postalInfo element of contactaEmail
- String emailaAuthInfo
- authorization information
-
-
Method Detail
-
getNamespace
public java.lang.String getNamespace()
Get the EPP command Namespace associated with EPPContactCreateCmd.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Specified by:
getNamespace
in interfaceEPPMessage
- Specified by:
getNamespace
in classEPPCommand
- Returns:
EPPContactMapFactory.NS
-
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 classEPPCreateCmd
- 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 classEPPCreateCmd
- 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 ofEPPContactCreateCmd
with this instance.- Overrides:
equals
in classEPPCreateCmd
- Parameters:
aObject
- Object to compare with.- Returns:
true
if equal;false
otherwise
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPContactCreateCmd
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classEPPCommand
- Returns:
- clone of
EPPContactCreateCmd
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classEPPCommand
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
hasPostalContacts
public boolean hasPostalContacts()
Returnstrue
if the contact has postal info.- Returns:
true
if the contact has postal infofalse
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()
Returnstrue
if the contact has auth info.- Returns:
true
if the contact has auth info infofalse
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()
Returnstrue
if the contact has disclose flag.- Returns:
true
if the contact has disclose flagfalse
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()
Returnstrue
if the contact has email.- Returns:
true
if the contact has emailfalse
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()
Returnstrue
if the contact has fax.- Returns:
true
if the contact has faxfalse
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()
Returnstrue
if the contact has fax extension.- Returns:
true
if the contact has fax extensionfalse
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()
Returnstrue
if the contact has contact ID.- Returns:
true
if the contact has contact IDfalse
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()
Returnstrue
if the contact has voice.- Returns:
true
if the contact has voicefalse
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()
Returnstrue
if the contact has voice extension.- Returns:
true
if the contact has voice extensionfalse
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
-
-