Class VerificationCodeRevocationList

java.lang.Object
com.verisign.epp.codec.verificationcode.VerificationCodeRevocationList

public class VerificationCodeRevocationList extends Object
Class that holds the attributes for a Verification Code Revocation List and provides the following:
  1. Encode the Verification Code Revocation List to a String, that can be written to a file.
  2. Decode the Verification Code Revocation List from a String or an InputStream.
  3. Check if a specific EPPSignedCode is revoked.
  • Field Details

    • DEFAULT_VERSION

      public static final int DEFAULT_VERSION
      Default value of the version attribute.
      See Also:
  • Constructor Details

    • VerificationCodeRevocationList

      public VerificationCodeRevocationList()
      Default constructor. The createdDate must be set prior to calling the encode() method.
    • VerificationCodeRevocationList

      public VerificationCodeRevocationList(Date aCreatedDate)
      Constructor that takes the requirement attribute value. The version defaults to the DEFAULT_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(Date aCreatedDate, List<RevokedVerificationCode> aRevokedVerificationCodes)
      Constructor that takes the requirement created date attribute value and the optional list of revoked VerificationCode's. The version defaults to the DEFAULT_VERSION value.
      Parameters:
      aCreatedDate - Datetime in UTC that the Verification Code Revocation List was created.
      aRevokedVerificationCodes - List of revoked VerificationCode's
  • Method Details

    • 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 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(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 List<RevokedVerificationCode> getRevokedVerificationCodes()
      Gets the list of revoked VerificationCode's.
      Returns:
      List of revoked VerificationCode's
    • setRevokedVerificationCodes

      public void setRevokedVerificationCodes(List<RevokedVerificationCode> aRevokedVerificationCodes)
      Sets the list of revoked VerificationCode's.
      Parameters:
      aRevokedVerificationCodes - List of revoked VerificationCode's
    • addRevokedVerificationCode

      public void addRevokedVerificationCode(RevokedVerificationCode aRevokedVerificationCode)
      Adds a revoked VerificationCode to the list of revoked VerificationCode's.
      Parameters:
      aRevokedVerificationCode - Revoked VerificationCode to add to the list of revoked VerificationCode'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 String encode() throws EPPEncodeException
      Encodes the Verification Code Revocation List to a String.
      Returns:
      Encoded Verification Code Revocation List
      Throws:
      EPPEncodeException - Error encoding the Verification Code Revocation List.
    • decode

      public void decode(String aVerificationCodeRevocationListStr) throws EPPDecodeException
      Decodes the Verification Code Revocation List from a String.
      Parameters:
      aVerificationCodeRevocationListStr - String containing the full Verification Code Revocation List.
      Throws:
      EPPDecodeException - Error decoding the Verification Code Revocation List
    • decode

      public void decode(InputStream aVerificationCodeRevocationListStream) throws EPPDecodeException
      Decodes the Verification Code Revocation List from an InputStream.
      Parameters:
      aVerificationCodeRevocationListStream - InputStream containing the full Verification Code Revocation List.
      Throws:
      EPPDecodeException - Error decoding the Verification Code Revocation List
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone VerificationCodeRevocationList.
      Overrides:
      clone in class Object
      Returns:
      clone of VerificationCodeRevocationList
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • equals

      public boolean equals(Object aObject)
      implements a deep VerificationCodeRevocationList compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - VerificationCodeRevocationList instance to compare with
      Returns:
      true if equal false otherwise
    • toString

      public String toString()
      Implementation of Object.toString, which will result in the full Verification OCode revocation list being converted to a String. If there is an error encoding the Revocation List, a RuntimeException is thrown.
      Overrides:
      toString in class Object
      Returns:
      Encoded Verification Code Revocation List