Class VerificationCodeRevocationList
- java.lang.Object
-
- com.verisign.epp.codec.verificationcode.VerificationCodeRevocationList
-
public class VerificationCodeRevocationList extends java.lang.Object
Class that holds the attributes for a Verification Code Revocation List and provides the following:
- Encode the Verification Code Revocation List to a
String
, that can be written to a file. - Decode the Verification Code Revocation List from a
String
or anInputStream
. - Check if a specific
EPPSignedCode
is revoked.
- Encode the Verification Code Revocation List to a
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_VERSION
Default value of theversion
attribute.
-
Constructor Summary
Constructors Constructor Description VerificationCodeRevocationList()
Default constructor.VerificationCodeRevocationList(java.util.Date aCreatedDate)
Constructor that takes the requirement attribute value.VerificationCodeRevocationList(java.util.Date aCreatedDate, java.util.List<RevokedVerificationCode> aRevokedVerificationCodes)
Constructor that takes the requirement created date attribute value and the optional list of revoked VerificationCode's.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRevokedVerificationCode(RevokedVerificationCode aRevokedVerificationCode)
Adds a revokedVerificationCode
to the list of revokedVerificationCode
's.java.lang.Object
clone()
CloneVerificationCodeRevocationList
.void
decode(java.io.InputStream aVerificationCodeRevocationListStream)
Decodes the Verification Code Revocation List from anInputStream
.void
decode(java.lang.String aVerificationCodeRevocationListStr)
Decodes the Verification Code Revocation List from aString
.java.lang.String
encode()
Encodes the Verification Code Revocation List to aString
.boolean
equals(java.lang.Object aObject)
implements a deepVerificationCodeRevocationList
compare.java.util.Date
getCreatedDate()
Gets the datetime in UTC that the Verification Code Revocation List was created.java.util.List<RevokedVerificationCode>
getRevokedVerificationCodes()
Gets the list of revokedVerificationCode
's.int
getVersion()
Gets the version of the Verification Code Revocation List format.boolean
isRevoked(EPPSignedCode aVerificationCode)
Is the passed verification code revoked?void
setCreatedDate(java.util.Date aCreatedDate)
Sets the datetime in UTC that the Verification Code Revocation List was created.void
setRevokedVerificationCodes(java.util.List<RevokedVerificationCode> aRevokedVerificationCodes)
Sets the list of revokedVerificationCode
's.void
setVersion(int aVersion)
Sets the version of the Verification Code Revocation List format.java.lang.String
toString()
Implementation ofObject.toString
, which will result in the full Verification OCode revocation list being converted to aString
.
-
-
-
Field Detail
-
DEFAULT_VERSION
public static final int DEFAULT_VERSION
Default value of theversion
attribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VerificationCodeRevocationList
public VerificationCodeRevocationList()
Default constructor. The createdDate must be set prior to calling theencode()
method.
-
VerificationCodeRevocationList
public VerificationCodeRevocationList(java.util.Date aCreatedDate)
Constructor that takes the requirement attribute value. The version defaults to theDEFAULT_VERSION
value, and the removed VerificationCode list defaults to an empty list.- Parameters:
aCreatedDate
- Datetime in UTC that the Verification Code Revocation List was created.
-
VerificationCodeRevocationList
public VerificationCodeRevocationList(java.util.Date aCreatedDate, java.util.List<RevokedVerificationCode> aRevokedVerificationCodes)
Constructor that takes the requirement created date attribute value and the optional list of revoked VerificationCode's. The version defaults to theDEFAULT_VERSION
value.- Parameters:
aCreatedDate
- Datetime in UTC that the Verification Code Revocation List was created.aRevokedVerificationCodes
- List of revoked VerificationCode's
-
-
Method Detail
-
getVersion
public int getVersion()
Gets the version of the Verification Code Revocation List format.- Returns:
- Version of the Verification Code Revocation List format with the
default of
DEFAULT_VERSION
.
-
setVersion
public void setVersion(int aVersion)
Sets the version of the Verification Code Revocation List format.- Parameters:
aVersion
- Version of the Verification Code Revocation List format
-
getCreatedDate
public java.util.Date getCreatedDate()
Gets the datetime in UTC that the Verification Code Revocation List was created.- Returns:
- Datetime in UTC that the Verification Code Revocation List was created.
-
setCreatedDate
public void setCreatedDate(java.util.Date aCreatedDate)
Sets the datetime in UTC that the Verification Code Revocation List was created.- Parameters:
aCreatedDate
- Datetime in UTC that the Verification Code Revocation List was created.
-
getRevokedVerificationCodes
public java.util.List<RevokedVerificationCode> getRevokedVerificationCodes()
Gets the list of revokedVerificationCode
's.- Returns:
- List of revoked
VerificationCode
's
-
setRevokedVerificationCodes
public void setRevokedVerificationCodes(java.util.List<RevokedVerificationCode> aRevokedVerificationCodes)
Sets the list of revokedVerificationCode
's.- Parameters:
aRevokedVerificationCodes
- List of revokedVerificationCode
's
-
addRevokedVerificationCode
public void addRevokedVerificationCode(RevokedVerificationCode aRevokedVerificationCode)
Adds a revokedVerificationCode
to the list of revokedVerificationCode
's.- Parameters:
aRevokedVerificationCode
- RevokedVerificationCode
to add to the list of revokedVerificationCode
's
-
isRevoked
public boolean isRevoked(EPPSignedCode aVerificationCode)
Is the passed verification code revoked?- Parameters:
aVerificationCode
- Signed mark to check if revoked.- Returns:
true
if the signed mark is revoked;false
otherwise.
-
encode
public java.lang.String encode() throws EPPEncodeException
Encodes the Verification Code Revocation List to aString
.- Returns:
- Encoded Verification Code Revocation List
- Throws:
EPPEncodeException
- Error encoding the Verification Code Revocation List.
-
decode
public void decode(java.lang.String aVerificationCodeRevocationListStr) throws EPPDecodeException
Decodes the Verification Code Revocation List from aString
.- Parameters:
aVerificationCodeRevocationListStr
- String containing the full Verification Code Revocation List.- Throws:
EPPDecodeException
- Error decoding the Verification Code Revocation List
-
decode
public void decode(java.io.InputStream aVerificationCodeRevocationListStream) throws EPPDecodeException
Decodes the Verification Code Revocation List from anInputStream
.- Parameters:
aVerificationCodeRevocationListStream
-InputStream
containing the full Verification Code Revocation List.- Throws:
EPPDecodeException
- Error decoding the Verification Code Revocation List
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneVerificationCodeRevocationList
.- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
VerificationCodeRevocationList
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepVerificationCodeRevocationList
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-VerificationCodeRevocationList
instance to compare with- Returns:
- true if equal false otherwise
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in the full Verification OCode revocation list being converted to aString
. If there is an error encoding the Revocation List, aRuntimeException
is thrown.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Encoded Verification Code Revocation List
-
-