Class EPPVerificationCode
- java.lang.Object
-
- com.verisign.epp.codec.verificationcode.EPPVerificationCode
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPVerificationCode extends java.lang.Object implements EPPCodecComponent
Class for representing the various forms of the verification code, which include:- Verification code signed and passed along with transform commands.
- Verification code type returned in the missing element of the info response.
- Verification code returned in the set element of the info response.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELM_LOCALNAMEConstant for the local namestatic java.lang.StringELM_NAMEConstant for the tag namestatic intUNDEFINEDUndefined integer value
-
Constructor Summary
Constructors Constructor Description EPPVerificationCode()Create anEPPVerificationCodeinstance.EPPVerificationCode(java.lang.String aCode, java.lang.String aType)Create anEPPVerificationCodewith the code value and the type.EPPVerificationCode(java.lang.String aCode, java.lang.String aType, java.util.Date aSetDate)Create anEPPVerificationCodewith the code, type, and set date.EPPVerificationCode(java.lang.String aType, java.util.Date aDueDate)Create anEPPVerificationCodewith the code type and due date.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPVerificationCode.voiddecode(org.w3c.dom.Element aElement)Decode theEPPVerificationCodecomponentorg.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Sets all this instance's data in the given XML documentbooleanequals(java.lang.Object aObject)implements a deepEPPVerificationCodecompare.java.lang.StringgetCode()Gets the code value.java.util.DategetDueDate()Gets the due date for the verification code.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.util.DategetSetDate()Gets the date that the verification code was set.java.lang.StringgetType()Gets the code type.java.lang.StringgetVerificationId()Gets the Verification Identifier (verification-id) from the code.intgetVspId()Gets the VSP Identifier (vsp-id) from the code.booleanhasCode()Has the code been set?booleanhasDueDate()Has the due date been set?booleanhasSetDate()Has the set date been set?voidsetCode(java.lang.String aCode)Sets the code value.voidsetDueDate(java.util.Date aDueDate)Sets the due date for the verification code.voidsetSetDate(java.util.Date aSetDate)Sets the date that the verification code was set.voidsetType(java.lang.String aType)Sets the code type.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
Constant for the local name- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
Constant for the tag name- See Also:
- Constant Field Values
-
UNDEFINED
public static int UNDEFINED
Undefined integer value
-
-
Constructor Detail
-
EPPVerificationCode
public EPPVerificationCode()
Create anEPPVerificationCodeinstance.
-
EPPVerificationCode
public EPPVerificationCode(java.lang.String aCode, java.lang.String aType)Create anEPPVerificationCodewith the code value and the type. This constructor is used for passing the code with a transform command.- Parameters:
aCode- Verification code valueaType- Verification code type
-
EPPVerificationCode
public EPPVerificationCode(java.lang.String aType, java.util.Date aDueDate)Create anEPPVerificationCodewith the code type and due date. This constructor is used for the list of codes in the missing list.- Parameters:
aType- Verification code typeaDueDate- Due date that the code must be set
-
EPPVerificationCode
public EPPVerificationCode(java.lang.String aCode, java.lang.String aType, java.util.Date aSetDate)Create anEPPVerificationCodewith the code, type, and set date. This constructor is used for the list of codes in the set list.- Parameters:
aCode- Verification code value. Passnullif the code value should not be set.aType- Verification code typeaSetDate- Date that the code was set
-
-
Method Detail
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPVerificationCodecomponent- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root element of theEPPVerificationCode- Throws:
EPPDecodeException- Error decoding theEPPVerificationCode
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionSets all this instance's data in the given XML document- Specified by:
encodein 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.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPVerificationCode. Signature element is not cloned.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPVerificationCode - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPVerificationCodecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPVerificationCodeinstance to compare with- Returns:
trueif equalfalseotherwise
-
hasCode
public boolean hasCode()
Has the code been set?- Returns:
trueif the code has been set;falseotherwise.
-
getCode
public java.lang.String getCode()
Gets the code value.- Returns:
- The code value if defined:
nullotherwise.
-
setCode
public void setCode(java.lang.String aCode)
Sets the code value.- Parameters:
aCode- Code value to set
-
getVspId
public int getVspId()
Gets the VSP Identifier (vsp-id) from the code.- Returns:
- VSP Identifier (vsp-id) if defined;
UNDEFINEDotherwise.
-
getVerificationId
public java.lang.String getVerificationId()
Gets the Verification Identifier (verification-id) from the code.- Returns:
- Verification Identifier (verification-id) if defined;
nullotherwise.
-
getType
public java.lang.String getType()
Gets the code type.- Returns:
- The code type set.
-
setType
public void setType(java.lang.String aType)
Sets the code type.- Parameters:
aType- Code type to set
-
hasSetDate
public boolean hasSetDate()
Has the set date been set?- Returns:
trueif the set date has been set;falseotherwise.
-
getSetDate
public java.util.Date getSetDate()
Gets the date that the verification code was set.- Returns:
- The set date if defined:
nullotherwise.
-
setSetDate
public void setSetDate(java.util.Date aSetDate)
Sets the date that the verification code was set.- Parameters:
aSetDate- Date that the verification code was set.
-
hasDueDate
public boolean hasDueDate()
Has the due date been set?- Returns:
trueif the due date has been set;falseotherwise.
-
getDueDate
public java.util.Date getDueDate()
Gets the due date for the verification code.- Returns:
- The due date if defined:
nullotherwise.
-
setDueDate
public void setDueDate(java.util.Date aDueDate)
Sets the due date for the verification code.- Parameters:
aDueDate- Due date for the verification code
-
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.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-