Package com.verisign.epp.codec.addlemail
Class EPPAddlEmail
- java.lang.Object
-
- com.verisign.epp.codec.addlemail.EPPAddlEmail
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPAddlEmail extends java.lang.Object implements EPPCodecComponent
A second email can be set using theEPPEAIEmailextension with the option for defining the "primary" attribute to indicate that the extension email should be treated as the primary email address.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELM_LOCALNAMEXML local name forEPPEAIEmail.static java.lang.StringELM_NAMEXML root tag forEPPEAIEmail.
-
Constructor Summary
Constructors Constructor Description EPPAddlEmail()Default constructor forEPPEAIEmail.EPPAddlEmail(java.lang.String aEmail)Constructor forEPPEAIEmailthat takes the second email value.EPPAddlEmail(java.lang.String aEmail, boolean aPrimary)Constructor forEPPEAIEmailthat takes the second email value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()clone anEPPCodecComponent.voiddecode(org.w3c.dom.Element aElement)decode a DOM element tree to initialize the instance attributes.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)encode instance into a DOM element tree.booleanequals(java.lang.Object aObject)Compare an instance ofEPPEAIEmailwith this instance.java.lang.StringgetEmail()Gets the second email value.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.booleanhasEmail()Is the second email defined?booleanisPrimary()Is the second email the primary email? The default value isfalse.voidsetEmail(java.lang.String aEmail)Sets the second email value.voidsetPrimary(boolean aPrimary)Sets the primary attribute for the second email.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPEAIEmail.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPEAIEmail.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPAddlEmail
public EPPAddlEmail()
Default constructor forEPPEAIEmail.
-
EPPAddlEmail
public EPPAddlEmail(java.lang.String aEmail)
Constructor forEPPEAIEmailthat takes the second email value.- Parameters:
aEmail- Second email. Set tonullto explicitly indicate that there is no second email.
-
EPPAddlEmail
public EPPAddlEmail(java.lang.String aEmail, boolean aPrimary)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 Detail
-
hasEmail
public boolean hasEmail()
Is the second email defined?- Returns:
trueif the second email is defined;falseotherwise.
-
getEmail
public java.lang.String getEmail()
Gets the second email value.- Returns:
- second email value if defined;
nullotherwise.
-
setEmail
public void setEmail(java.lang.String aEmail)
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
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionencode 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
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptiondecode 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
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionclone anEPPCodecComponent.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of concrete
EPPEAIEmail - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPEAIEmailwith this instance.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject- Object to compare with.- Returns:
trueif equal;falseotherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-