Package com.verisign.epp.codec.addlemail
Class EPPAddlEmail
java.lang.Object
com.verisign.epp.codec.addlemail.EPPAddlEmail
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
A second email can be set using the
EPPEAIEmail extension with the
option for defining the "primary" attribute to indicate that the extension
email should be treated as the primary email address.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor forEPPEAIEmail.EPPAddlEmail(String aEmail) Constructor forEPPEAIEmailthat takes the second email value.EPPAddlEmail(String aEmail, boolean aPrimary) Constructor forEPPEAIEmailthat takes the second email value. -
Method Summary
Modifier and TypeMethodDescriptionclone()clone anEPPCodecComponent.voiddecode a DOM element tree to initialize the instance attributes.encode instance into a DOM element tree.booleanCompare an instance ofEPPEAIEmailwith this instance.getEmail()Gets the second email value.Returns the XML namespace associated with theEPPCodecComponent.booleanhasEmail()Is the second email defined?booleanIs the second email the primary email? The default value isfalse.voidSets the second email value.voidsetPrimary(boolean aPrimary) Sets the primary attribute for the second email.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
ELM_LOCALNAME
XML local name forEPPEAIEmail.- See Also:
-
ELM_NAME
XML root tag forEPPEAIEmail.- See Also:
-
-
Constructor Details
-
EPPAddlEmail
public EPPAddlEmail()Default constructor forEPPEAIEmail. -
EPPAddlEmail
Constructor forEPPEAIEmailthat takes the second email value.- Parameters:
aEmail- Second email. Set tonullto explicitly indicate that there is no second email.
-
EPPAddlEmail
Constructor forEPPEAIEmailthat takes the second email value.- Parameters:
aEmail- Second email. Set tonullto explicitly indicate that there is no second email.aPrimary- Is the second email the primary email?
-
-
Method Details
-
hasEmail
public boolean hasEmail()Is the second email defined?- Returns:
trueif the second email is defined;falseotherwise.
-
getEmail
Gets the second email value.- Returns:
- second email value if defined;
nullotherwise.
-
setEmail
Sets the second email value.- Parameters:
aEmail- Second email. Set tonullto explicitly indicate that there is no second email.
-
isPrimary
public boolean isPrimary()Is the second email the primary email? The default value isfalse.- Returns:
trueif the second email is the primary email;falseotherwise.
-
setPrimary
public void setPrimary(boolean aPrimary) Sets the primary attribute for the second email.- Parameters:
aPrimary- Set totrueif the second email is the primary email;falseotherwise.
-
encode
encode instance into a DOM element tree. A DOM Document is passed as an argument and functions as a factory for DOM objects. The root element associated with the instance is created and each instance attribute is appended as a child node.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document, which acts is an Element factory- Returns:
- Element Root element associated with the object
- Throws:
EPPEncodeException- Error encodingEPPEAIEmail
-
decode
decode a DOM element tree to initialize the instance attributes. TheaElementargument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement-Elementto decode- Throws:
EPPDecodeException- Error decodingElement
-
clone
clone anEPPCodecComponent.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of concrete
EPPEAIEmail - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
equals
Compare an instance ofEPPEAIEmailwith this instance. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-