Class EPPVerificationCode
java.lang.Object
com.verisign.epp.codec.verificationcode.EPPVerificationCode
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
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:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate anEPPVerificationCodeinstance.EPPVerificationCode(String aCode, String aType) Create anEPPVerificationCodewith the code value and the type.EPPVerificationCode(String aCode, String aType, Date aSetDate) Create anEPPVerificationCodewith the code, type, and set date.EPPVerificationCode(String aType, Date aDueDate) Create anEPPVerificationCodewith the code type and due date. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPVerificationCode.voidDecode theEPPVerificationCodecomponentSets all this instance's data in the given XML documentbooleanimplements a deepEPPVerificationCodecompare.getCode()Gets the code value.Gets the due date for the verification code.Returns the XML namespace associated with theEPPCodecComponent.Gets the date that the verification code was set.getType()Gets the code type.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?booleanHas the due date been set?booleanHas the set date been set?voidSets the code value.voidsetDueDate(Date aDueDate) Sets the due date for the verification code.voidsetSetDate(Date aSetDate) Sets the date that the verification code was set.voidSets the code type.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
ELM_LOCALNAME
Constant for the local name- See Also:
-
ELM_NAME
Constant for the tag name- See Also:
-
UNDEFINED
public static int UNDEFINEDUndefined integer value
-
-
Constructor Details
-
EPPVerificationCode
public EPPVerificationCode()Create anEPPVerificationCodeinstance. -
EPPVerificationCode
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
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
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 Details
-
decode
Decode theEPPVerificationCodecomponent- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root element of theEPPVerificationCode- Throws:
EPPDecodeException- Error decoding theEPPVerificationCode
-
encode
Sets 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
CloneEPPVerificationCode. Signature element is not cloned.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPVerificationCode - Throws:
CloneNotSupportedException- standard Object.clone exception
-
equals
implements a deepEPPVerificationCodecompare. -
hasCode
public boolean hasCode()Has the code been set?- Returns:
trueif the code has been set;falseotherwise.
-
getCode
Gets the code value.- Returns:
- The code value if defined:
nullotherwise.
-
setCode
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
Gets the Verification Identifier (verification-id) from the code.- Returns:
- Verification Identifier (verification-id) if defined;
nullotherwise.
-
getType
Gets the code type.- Returns:
- The code type set.
-
setType
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
Gets the date that the verification code was set.- Returns:
- The set date if defined:
nullotherwise.
-
setSetDate
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
Gets the due date for the verification code.- Returns:
- The due date if defined:
nullotherwise.
-
setDueDate
Sets the due date for the verification code.- Parameters:
aDueDate- Due date for the verification code
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-