Class TrustAnchorVerificationData

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

public class TrustAnchorVerificationData extends Object
A class to simulate validating a verification code value by utilizing the encoding of the trust anchor alias in a trust store, which could be formatted in the following way using Augmented Backus-Naur Form (ABNF) grammar:
 alias = codevspid ":" vspid ":" profilename ":" codetypes ":" shortname ":" certnumber
 codevspid  = 1*DIGIT ; Verification Code vsp-id value
 vspid      = 1*DIGIT ; Surrogate VSP Identifier
 profilename= 1*(DIGIT / ALPHA) ; Name of profile
 codetypes  = codetype *( “~“ codetype) ; List of supported signed code types
 codetype   = 1*(DIGIT / ALPHA / “-“) ; <verificationCode:signedCode> “type” attribute
 shortname  = 1*(DIGIT / ALPHA) ; VSP Short name
 certnumber = 1*DIGIT  ; Unique certificate number
 
An example alias for the EPPSDK could be "0:-1:china:domain~real-name:eppsdk:1"
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
    Undefined integer value of the verification data.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
    Constructor that takes a trust anchor alias from a trust store to be decoded.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCodeType(String aCodeType)
    Adds a code type to the list of code types.
    void
    decode(String aTrustAnchorAlias)
    Decodes a trust anchor alias from a trust store to set the trust anchor verification data.
    Encodes a trust anchor anchor for a trust store.
    boolean
    equals(Object aObject)
    implements a deep TrustAnchorVerificationData compare.
    int
    Gets the Verification Service Provider (VSP) trust anchor certificate number.
    Gets the list of code types, per the "type" attribute of <verificationCode:code>, supported by the Verification Service Provider (VSP).
    int
    Gets the Verification Code vsp-id value per draft-gould-eppext-verificationcode.
    Gets the name of the locality profile associated with the Verification Service Provider (VSP).
    Gets the short name of the Verification Service Provider (VSP).
    int
    Gets the internal (surrogate) Verification Service Provider (VSP) identifier.
    boolean
    Has the Verification Service Provider (VSP) trust anchor certificate number been set?
    boolean
    Are there any code types?
    boolean
    Has the Verification Code vsp-id value been set?
    boolean
    Has the locality profile associated with the Verification Service Provider (VSP) been set?
    boolean
    Has VSP short name been set?
    boolean
    Has the internal (surrogate) Verification Service Provider (VSP) identifier been set?
    void
    setCertNumber(int aCertNumber)
    Sets the Verification Service Provider (VSP) trust anchor certificate number.
    void
    setCodeTypes(List<String> aCodeTypes)
    Sets the list of code types, per the "type" attribute of <verificationCode:code>, supported by the Verification Service Provider (VSP).
    void
    setCodeVspId(int aCodeVspId)
    Sets the Verification Code vsp-id value per draft-gould-eppext-verificationcode.
    void
    setProfileName(String aProfileName)
    Sets the name of the locality profile associated with the Verification Service Provider (VSP).
    void
    setShortName(String aShortName)
    Sets the short name of the Verification Service Provider (VSP).
    void
    setVspId(int aVspId)
    Sets the internal (surrogate) Verification Service Provider (VSP) identifier.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UNDEFINED

      public static int UNDEFINED
      Undefined integer value of the verification data.
  • Constructor Details

    • TrustAnchorVerificationData

      public TrustAnchorVerificationData()
      Default constructor.
    • TrustAnchorVerificationData

      public TrustAnchorVerificationData(String aTrustAnchorAlias) throws EPPException
      Constructor that takes a trust anchor alias from a trust store to be decoded.
      Parameters:
      aTrustAnchorAlias - Alias of the trust anchor from a trust store.
      Throws:
      EPPException - Error decoding the trust anchor alias
  • Method Details

    • hasCodeVspId

      public boolean hasCodeVspId()
      Has the Verification Code vsp-id value been set?
      Returns:
      true of the Verification Code vsp-id value has been set; false otherwise.
    • getCodeVspId

      public int getCodeVspId()
      Gets the Verification Code vsp-id value per draft-gould-eppext-verificationcode.
      Returns:
      Verification Code vsp-id value per draft-gould-eppext-verificationcode if defined; UNDEFINED otherwise.
    • setCodeVspId

      public void setCodeVspId(int aCodeVspId)
      Sets the Verification Code vsp-id value per draft-gould-eppext-verificationcode.
      Parameters:
      aCodeVspId - Verification Code vsp-id value per draft-gould-eppext-verificationcode
    • hasVspId

      public boolean hasVspId()
      Has the internal (surrogate) Verification Service Provider (VSP) identifier been set?
      Returns:
      true of the internal (surrogate) Verification Service Provider (VSP) identifier has been set; false otherwise.
    • getVspId

      public int getVspId()
      Gets the internal (surrogate) Verification Service Provider (VSP) identifier. This can be matched up with records in a database.
      Returns:
      internal (surrogate) Verification Service Provider (VSP) identifier if defined; UNDEFINED otherwise.
    • setVspId

      public void setVspId(int aVspId)
      Sets the internal (surrogate) Verification Service Provider (VSP) identifier. This can be matched up with records in a database.
      Parameters:
      aVspId - Internal (surrogate) Verification Service Provider (VSP) identifier.
    • hasProfileName

      public boolean hasProfileName()
      Has the locality profile associated with the Verification Service Provider (VSP) been set?
      Returns:
      true of the locality profile associated with the Verification Service Provider (VSP) has been set; false otherwise.
    • getProfileName

      public String getProfileName()
      Gets the name of the locality profile associated with the Verification Service Provider (VSP).
      Returns:
      The locality profile associated with the Verification Service Provider (VSP) if defined; null otherwise.
    • setProfileName

      public void setProfileName(String aProfileName)
      Sets the name of the locality profile associated with the Verification Service Provider (VSP).
      Parameters:
      aProfileName - Locality profile associated with the Verification Service Provider (VSP).
    • hasCodeTypes

      public boolean hasCodeTypes()
      Are there any code types?
      Returns:
      true if there are code types; false otherwise.
    • addCodeType

      public void addCodeType(String aCodeType)
      Adds a code type to the list of code types.
      Parameters:
      aCodeType - Code type to add to the list of code types.
    • getCodeTypes

      public List<String> getCodeTypes()
      Gets the list of code types, per the "type" attribute of <verificationCode:code>, supported by the Verification Service Provider (VSP).
      Returns:
      List of code types supported by the Verification Service Provider (VSP).
    • setCodeTypes

      public void setCodeTypes(List<String> aCodeTypes)
      Sets the list of code types, per the "type" attribute of <verificationCode:code>, supported by the Verification Service Provider (VSP).
      Parameters:
      aCodeTypes - List of code types supported by the Verification Service Provider (VSP).
    • hasShortName

      public boolean hasShortName()
      Has VSP short name been set?
      Returns:
      true of the VSP short name has been set; false otherwise.
    • getShortName

      public String getShortName()
      Gets the short name of the Verification Service Provider (VSP). The short name must only contain alphanumeric characters.
      Returns:
      Short name of the Verification Service Provider (VSP) if defined; null otherwise.
    • setShortName

      public void setShortName(String aShortName)
      Sets the short name of the Verification Service Provider (VSP). The short name must only contain alphanumeric characters.
      Parameters:
      aShortName - Short name of the Verification Service Provider (VSP).
    • hasCertNumber

      public boolean hasCertNumber()
      Has the Verification Service Provider (VSP) trust anchor certificate number been set?
      Returns:
      true of the Verification Service Provider (VSP) trust anchor certificate number has been set; false otherwise.
    • getCertNumber

      public int getCertNumber()
      Gets the Verification Service Provider (VSP) trust anchor certificate number. This must be unique across all trust anchor certificates for the VSP.
      Returns:
      Verification Service Provider (VSP) trust anchor certificate number if defined; null otherwise.
    • setCertNumber

      public void setCertNumber(int aCertNumber)
      Sets the Verification Service Provider (VSP) trust anchor certificate number. This must be unique across all trust anchor certificates for the VSP.
      Parameters:
      aCertNumber - Unique certificate number for the VSP
    • decode

      public void decode(String aTrustAnchorAlias) throws EPPException
      Decodes a trust anchor alias from a trust store to set the trust anchor verification data.
      Parameters:
      aTrustAnchorAlias - Alias of the trust anchor from a trust store.
      Throws:
      EPPException - Error decoding the trust anchor alias
    • encode

      public String encode() throws EPPException
      Encodes a trust anchor anchor for a trust store.
      Returns:
      Trust anchor alias for a trust store.
      Throws:
      EPPException - Error encoding the trust anchor alias
    • equals

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