Package com.verisign.epp.codec.mark
Class EPPMarkContact
- java.lang.Object
-
- com.verisign.epp.codec.mark.EPPMarkContact
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPMarkContact extends java.lang.Object implements EPPCodecComponent
Class for a Trademark, Mark for short, contact.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_CONTACT_LOCALNAME
Constant for the contact local namestatic java.lang.String
ELM_CONTACT_NAME
Constant for the contact tag namestatic java.lang.String
ELM_HOLDER_LOCALNAME
Constant for the owner local namestatic java.lang.String
ELM_HOLDER_NAME
Constant for the owner tag namestatic java.lang.String
ENTITLEMENT_ASSIGNEE
Assignee entitlement for a holder contact.static java.lang.String
ENTITLEMENT_LICENSEE
Licensee entitlement for a holder contact.static java.lang.String
ENTITLEMENT_OWNER
Owner entitlement for a holder contact.static java.lang.String
TYPE_AGENT
Agent type for a (non-holder) contact.static java.lang.String
TYPE_OWNER
Owner type for a (non-holder) contact.static java.lang.String
TYPE_THIRD_PARTY
Third party type for a (non-holder) contact.
-
Constructor Summary
Constructors Constructor Description EPPMarkContact()
Creates emptyEPPMarkContact
instance.EPPMarkContact(java.lang.String aName, java.lang.String aOrg, EPPMarkAddress aAddress, java.lang.String aVoice, java.lang.String aFax, java.lang.String aEmail)
Creates a mark contact with the name, organization, address, voice, fax, and email attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPMark
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPMark
componentorg.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Sets all this instance's data in the given XML documentboolean
equals(java.lang.Object aObject)
implements a deepEPPMarkContact
compare.EPPMarkAddress
getAddress()
Gets the address information associated with the contact.java.lang.String
getEmail()
Gets the contact's email address.java.lang.String
getEntitlement()
Gets the entitlement of the holder contact.java.lang.String
getFax()
Gets the contact's facsimile telephone number.java.lang.String
getFaxExt()
Gets the contact's facsimile telephone number extension.java.lang.String
getLocalName()
Gets the XML local name of the mark contact.java.lang.String
getName()
Gets name of the individual or role represented by the contact.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getOrg()
Gets the name of the organization with which the contact is affiliated.java.lang.String
getType()
Gets the type of the (non-holder) contact.java.lang.String
getVoice()
Gets the contact's voice telephone number.java.lang.String
getVoiceExt()
Gets the contact's voice telephone number extension.boolean
isContact()
Is theEPPMarkContact
a (non-holder) contact?boolean
isHolderContact()
Is theEPPMarkContact
a holder contact?void
setAddress(EPPMarkAddress aAddress)
Sets the address information associated with the contact.void
setEmail(java.lang.String aEmail)
Sets the contact's email address.void
setEntitlement(java.lang.String aEntitlement)
Sets the entitlement of the holder contact.void
setFax(java.lang.String aFax)
Sets the contact's facsimile telephone number.void
setFaxExt(java.lang.String aFaxExt)
Sets the contact's facsimile telephone extension number.void
setLocalName(java.lang.String aLocalName)
Sets the XML local name of the mark contact.void
setName(java.lang.String aName)
Sets name of the individual or role represented by the contact.void
setOrg(java.lang.String aOrg)
Sets the name of the organization with which the contact is affiliated.void
setType(java.lang.String aType)
Sets the type of the (non-holder) contact.void
setVoice(java.lang.String aVoice)
Sets the contact's voice telephone number.void
setVoiceExt(java.lang.String aVoiceExt)
Sets the contact's voice telephone extension number.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ENTITLEMENT_OWNER
public static final java.lang.String ENTITLEMENT_OWNER
Owner entitlement for a holder contact.- See Also:
- Constant Field Values
-
ENTITLEMENT_ASSIGNEE
public static final java.lang.String ENTITLEMENT_ASSIGNEE
Assignee entitlement for a holder contact.- See Also:
- Constant Field Values
-
ENTITLEMENT_LICENSEE
public static final java.lang.String ENTITLEMENT_LICENSEE
Licensee entitlement for a holder contact.- See Also:
- Constant Field Values
-
TYPE_OWNER
public static final java.lang.String TYPE_OWNER
Owner type for a (non-holder) contact.- See Also:
- Constant Field Values
-
TYPE_AGENT
public static final java.lang.String TYPE_AGENT
Agent type for a (non-holder) contact.- See Also:
- Constant Field Values
-
TYPE_THIRD_PARTY
public static final java.lang.String TYPE_THIRD_PARTY
Third party type for a (non-holder) contact.- See Also:
- Constant Field Values
-
ELM_HOLDER_LOCALNAME
public static final java.lang.String ELM_HOLDER_LOCALNAME
Constant for the owner local name- See Also:
- Constant Field Values
-
ELM_CONTACT_LOCALNAME
public static final java.lang.String ELM_CONTACT_LOCALNAME
Constant for the contact local name- See Also:
- Constant Field Values
-
ELM_HOLDER_NAME
public static final java.lang.String ELM_HOLDER_NAME
Constant for the owner tag name- See Also:
- Constant Field Values
-
ELM_CONTACT_NAME
public static final java.lang.String ELM_CONTACT_NAME
Constant for the contact tag name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPMarkContact
public EPPMarkContact()
Creates emptyEPPMarkContact
instance.
-
EPPMarkContact
public EPPMarkContact(java.lang.String aName, java.lang.String aOrg, EPPMarkAddress aAddress, java.lang.String aVoice, java.lang.String aFax, java.lang.String aEmail)
Creates a mark contact with the name, organization, address, voice, fax, and email attributes.- Parameters:
aName
- name of the individual or role represented by the contact.aOrg
- name of the organization with which the contact is affiliated.aAddress
- address information associated with the contact.aVoice
- contact's voice telephone numberaFax
- contact's facsimile telephone numberaEmail
- contact's email address
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPMark
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPMark
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Sets all this instance's data in the given XML document- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- a DOM Document to attach data to.- Returns:
- The root element of this component.
- Throws:
EPPEncodeException
- Thrown if any errors prevent encoding.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPMark
component- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root element of theEPPMark
- Throws:
EPPDecodeException
- Error decoding theEPPMark
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPMarkContact
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPMarkContact
instance to compare with- Returns:
- true if equal false otherwise
-
isHolderContact
public boolean isHolderContact()
Is theEPPMarkContact
a holder contact?- Returns:
true
if theEPPMarkContact
is a holder contact;false
otherwise.
-
isContact
public boolean isContact()
Is theEPPMarkContact
a (non-holder) contact?- Returns:
true
if theEPPMarkContact
is a (non-holder) contact;false
otherwise.
-
setLocalName
public void setLocalName(java.lang.String aLocalName)
Sets the XML local name of the mark contact. This should be set to eitherELM_HOLDER_LOCALNAME
orELM_CONTACT_LOCALNAME
.- Parameters:
aLocalName
- XML local name of the mark contact
-
getLocalName
public java.lang.String getLocalName()
Gets the XML local name of the mark contact.- Returns:
- The XML local name of the mark contact, which should be either
ELM_HOLDER_LOCALNAME
orELM_CONTACT_LOCALNAME
.
-
getEntitlement
public java.lang.String getEntitlement()
Gets the entitlement of the holder contact.- Returns:
- Entitlement using one of the
ENTITLEMENT
constants if defined;null
otherwise.
-
setEntitlement
public void setEntitlement(java.lang.String aEntitlement)
Sets the entitlement of the holder contact.- Parameters:
aEntitlement
- Entitlement of the holder contact using one of theENTITLEMENT
constants.
-
getType
public java.lang.String getType()
Gets the type of the (non-holder) contact.- Returns:
- Type using one of the
TYPE
constants.
-
setType
public void setType(java.lang.String aType)
Sets the type of the (non-holder) contact.- Parameters:
aType
- Type of the contact using one of theTYPE
constants.
-
getName
public java.lang.String getName()
Gets name of the individual or role represented by the contact.- Returns:
- Name of the individual or role represented by the contact if
defined;
null
otherwise.
-
setName
public void setName(java.lang.String aName)
Sets name of the individual or role represented by the contact.- Parameters:
aName
- Name of the individual or role represented by the contact.
-
getOrg
public java.lang.String getOrg()
Gets the name of the organization with which the contact is affiliated.- Returns:
- The name of the organization with which the contact is affiliated
if defined;
null
otherwise.
-
setOrg
public void setOrg(java.lang.String aOrg)
Sets the name of the organization with which the contact is affiliated.- Parameters:
aOrg
- The name of the organization with which the contact is affiliated.
-
getAddress
public EPPMarkAddress getAddress()
Gets the address information associated with the contact.- Returns:
- address information associated with the contact if defined;
null
otherwise.
-
setAddress
public void setAddress(EPPMarkAddress aAddress)
Sets the address information associated with the contact.- Parameters:
aAddress
- address information associated with the contact.
-
getVoice
public java.lang.String getVoice()
Gets the contact's voice telephone number.- Returns:
- The contact's voice telephone number if defined;
null
otherwise.
-
setVoice
public void setVoice(java.lang.String aVoice)
Sets the contact's voice telephone number.- Parameters:
aVoice
- The contact's voice telephone number.
-
getVoiceExt
public java.lang.String getVoiceExt()
Gets the contact's voice telephone number extension.- Returns:
- The contact's voice telephone number extension if defined;
null
otherwise.
-
setVoiceExt
public void setVoiceExt(java.lang.String aVoiceExt)
Sets the contact's voice telephone extension number.- Parameters:
aVoiceExt
- The contact's voice telephone extension number.
-
getFax
public java.lang.String getFax()
Gets the contact's facsimile telephone number.- Returns:
- The contact's facsimile telephone number if defined;
null
otherwise.
-
setFax
public void setFax(java.lang.String aFax)
Sets the contact's facsimile telephone number.- Parameters:
aFax
- The contact's facsimile telephone number.
-
getFaxExt
public java.lang.String getFaxExt()
Gets the contact's facsimile telephone number extension.- Returns:
- The contact's facsimile telephone number extension if defined;
null
otherwise.
-
setFaxExt
public void setFaxExt(java.lang.String aFaxExt)
Sets the contact's facsimile telephone extension number.- Parameters:
aFaxExt
- The contact's facsimile telephone extension number.
-
getEmail
public java.lang.String getEmail()
Gets the contact's email address.- Returns:
- The contact's email address if defined;
null
otherwise.
-
setEmail
public void setEmail(java.lang.String aEmail)
Sets the contact's email address.- Parameters:
aEmail
- The contact's email address.
-
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
.
-
-