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.String
ELM_LOCALNAME
Constant for the local namestatic java.lang.String
ELM_NAME
Constant for the tag namestatic int
UNDEFINED
Undefined integer value
-
Constructor Summary
Constructors Constructor Description EPPVerificationCode()
Create anEPPVerificationCode
instance.EPPVerificationCode(java.lang.String aCode, java.lang.String aType)
Create anEPPVerificationCode
with the code value and the type.EPPVerificationCode(java.lang.String aCode, java.lang.String aType, java.util.Date aSetDate)
Create anEPPVerificationCode
with the code, type, and set date.EPPVerificationCode(java.lang.String aType, java.util.Date aDueDate)
Create anEPPVerificationCode
with the code type and due date.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPVerificationCode
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPVerificationCode
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 deepEPPVerificationCode
compare.java.lang.String
getCode()
Gets the code value.java.util.Date
getDueDate()
Gets the due date for the verification code.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.util.Date
getSetDate()
Gets the date that the verification code was set.java.lang.String
getType()
Gets the code type.java.lang.String
getVerificationId()
Gets the Verification Identifier (verification-id) from the code.int
getVspId()
Gets the VSP Identifier (vsp-id) from the code.boolean
hasCode()
Has the code been set?boolean
hasDueDate()
Has the due date been set?boolean
hasSetDate()
Has the set date been set?void
setCode(java.lang.String aCode)
Sets the code value.void
setDueDate(java.util.Date aDueDate)
Sets the due date for the verification code.void
setSetDate(java.util.Date aSetDate)
Sets the date that the verification code was set.void
setType(java.lang.String aType)
Sets the code type.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation 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 anEPPVerificationCode
instance.
-
EPPVerificationCode
public EPPVerificationCode(java.lang.String aCode, java.lang.String aType)
Create anEPPVerificationCode
with 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 anEPPVerificationCode
with 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 anEPPVerificationCode
with the code, type, and set date. This constructor is used for the list of codes in the set list.- Parameters:
aCode
- Verification code value. Passnull
if 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 EPPDecodeException
Decode theEPPVerificationCode
component- Specified by:
decode
in 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 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.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPVerificationCode
. Signature element is not cloned.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in 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 deepEPPVerificationCode
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPVerificationCode
instance to compare with- Returns:
true
if equalfalse
otherwise
-
hasCode
public boolean hasCode()
Has the code been set?- Returns:
true
if the code has been set;false
otherwise.
-
getCode
public java.lang.String getCode()
Gets the code value.- Returns:
- The code value if defined:
null
otherwise.
-
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;
UNDEFINED
otherwise.
-
getVerificationId
public java.lang.String getVerificationId()
Gets the Verification Identifier (verification-id) from the code.- Returns:
- Verification Identifier (verification-id) if defined;
null
otherwise.
-
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:
true
if the set date has been set;false
otherwise.
-
getSetDate
public java.util.Date getSetDate()
Gets the date that the verification code was set.- Returns:
- The set date if defined:
null
otherwise.
-
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:
true
if the due date has been set;false
otherwise.
-
getDueDate
public java.util.Date getDueDate()
Gets the due date for the verification code.- Returns:
- The due date if defined:
null
otherwise.
-
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 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
.
-
-