Package com.verisign.epp.codec.org
Class EPPOrgContact
- java.lang.Object
-
- com.verisign.epp.codec.org.EPPOrgContact
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPOrgContact extends java.lang.Object implements EPPCodecComponent
Represents an org contact. The valid contact types are defined by theEPPOrgContact.Type
enumeration.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EPPOrgContact.Type
Contact type enumeration.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
XML local name forEPPOrgContact
.static java.lang.String
ELM_NAME
XML root tag forEPPOrgContact
.
-
Constructor Summary
Constructors Constructor Description EPPOrgContact()
Default constructor forEPPOrgContact
.EPPOrgContact(java.lang.String aContactId, EPPOrgContact.Type aType)
EPPOrgContact
that takes all attributes as arguments (contactId and type).EPPOrgContact(java.lang.String aContactId, EPPOrgContact.Type aType, java.lang.String aTypeName)
EPPOrgContact
that takes all attributes as arguments (contactId and type).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPOrgContact
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPOrgContact
attributes from the aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPOrgContact
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPOrgContact
compare.java.lang.String
getContactId()
Gets the contact identifier of the contact.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.EPPOrgContact.Type
getType()
Gets the contact type using theEPPOrgContact.Type
enumeration.java.lang.String
getTypeName()
Gets the optional type name for theCUSTOM
type.boolean
hasTypeName()
Is the type name defined?void
setContactId(java.lang.String aContactId)
Sets the contact identifier of the contact.void
setType(EPPOrgContact.Type aType)
Sets the contact type using theEPPOrgContact.Type
enumeration.void
setTypeName(java.lang.String aTypeName)
Gets the optional type name for theCUSTOM
type.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPOrgContact
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPOrgContact
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPOrgContact
public EPPOrgContact()
Default constructor forEPPOrgContact
.
-
EPPOrgContact
public EPPOrgContact(java.lang.String aContactId, EPPOrgContact.Type aType)
EPPOrgContact
that takes all attributes as arguments (contactId and type).- Parameters:
aContactId
- Contact IdentifieraType
- Contact Type usingEPPOrgContact.Type
enumeration.
-
EPPOrgContact
public EPPOrgContact(java.lang.String aContactId, EPPOrgContact.Type aType, java.lang.String aTypeName)
EPPOrgContact
that takes all attributes as arguments (contactId and type).- Parameters:
aContactId
- Contact IdentifieraType
- Contact Type usingEPPOrgContact.Type
enumeration.aTypeName
- Name of a "custom" type
-
-
Method Detail
-
getType
public EPPOrgContact.Type getType()
Gets the contact type using theEPPOrgContact.Type
enumeration.- Returns:
- Contact type if defined;
null
otherwise.
-
setType
public void setType(EPPOrgContact.Type aType)
Sets the contact type using theEPPOrgContact.Type
enumeration.- Parameters:
aType
- Contact type
-
getContactId
public java.lang.String getContactId()
Gets the contact identifier of the contact.- Returns:
- Contact identifier if defined;
null
otherwise.
-
setContactId
public void setContactId(java.lang.String aContactId)
Sets the contact identifier of the contact.- Parameters:
aContactId
- Contact identifier of the contact
-
hasTypeName
public boolean hasTypeName()
Is the type name defined?- Returns:
true
if the type name is defined;false
otherwise.
-
getTypeName
public java.lang.String getTypeName()
Gets the optional type name for theCUSTOM
type.- Returns:
- the parentId
-
setTypeName
public void setTypeName(java.lang.String aTypeName)
Gets the optional type name for theCUSTOM
type.- Parameters:
aTypeName
- the parentId to set
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPOrgContact
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPOrgContact
instance. - Throws:
EPPEncodeException
- Unable to encodeEPPOrgContact
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPOrgContact
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPOrgContact
from.- Throws:
EPPDecodeException
- Unable to decode aElement.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPOrgContact
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPOrgContact
instance to compare with- Returns:
- DOCUMENT ME!
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPOrgContact
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPOrgContact
- 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 classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-