Class TrustAnchorVerificationData
- java.lang.Object
-
- com.verisign.epp.codec.verificationcode.TrustAnchorVerificationData
-
public class TrustAnchorVerificationData extends java.lang.ObjectA 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 intUNDEFINEDUndefined integer value of the verification data.
-
Constructor Summary
Constructors Constructor Description TrustAnchorVerificationData()Default constructor.TrustAnchorVerificationData(java.lang.String aTrustAnchorAlias)Constructor that takes a trust anchor alias from a trust store to be decoded.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCodeType(java.lang.String aCodeType)Adds a code type to the list of code types.voiddecode(java.lang.String aTrustAnchorAlias)Decodes a trust anchor alias from a trust store to set the trust anchor verification data.java.lang.Stringencode()Encodes a trust anchor anchor for a trust store.booleanequals(java.lang.Object aObject)implements a deepTrustAnchorVerificationDatacompare.intgetCertNumber()Gets the Verification Service Provider (VSP) trust anchor certificate number.java.util.List<java.lang.String>getCodeTypes()Gets the list of code types, per the "type" attribute of <verificationCode:code>, supported by the Verification Service Provider (VSP).intgetCodeVspId()Gets the Verification Code vsp-id value per draft-gould-eppext-verificationcode.java.lang.StringgetProfileName()Gets the name of the locality profile associated with the Verification Service Provider (VSP).java.lang.StringgetShortName()Gets the short name of the Verification Service Provider (VSP).intgetVspId()Gets the internal (surrogate) Verification Service Provider (VSP) identifier.booleanhasCertNumber()Has the Verification Service Provider (VSP) trust anchor certificate number been set?booleanhasCodeTypes()Are there any code types?booleanhasCodeVspId()Has the Verification Code vsp-id value been set?booleanhasProfileName()Has the locality profile associated with the Verification Service Provider (VSP) been set?booleanhasShortName()Has VSP short name been set?booleanhasVspId()Has the internal (surrogate) Verification Service Provider (VSP) identifier been set?voidsetCertNumber(int aCertNumber)Sets the Verification Service Provider (VSP) trust anchor certificate number.voidsetCodeTypes(java.util.List<java.lang.String> aCodeTypes)Sets the list of code types, per the "type" attribute of <verificationCode:code>, supported by the Verification Service Provider (VSP).voidsetCodeVspId(int aCodeVspId)Sets the Verification Code vsp-id value per draft-gould-eppext-verificationcode.voidsetProfileName(java.lang.String aProfileName)Sets the name of the locality profile associated with the Verification Service Provider (VSP).voidsetShortName(java.lang.String aShortName)Sets the short name of the Verification Service Provider (VSP).voidsetVspId(int aVspId)Sets the internal (surrogate) Verification Service Provider (VSP) identifier.
-
-
-
Constructor Detail
-
TrustAnchorVerificationData
public TrustAnchorVerificationData()
Default constructor.
-
TrustAnchorVerificationData
public TrustAnchorVerificationData(java.lang.String aTrustAnchorAlias) throws EPPExceptionConstructor 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 Detail
-
hasCodeVspId
public boolean hasCodeVspId()
Has the Verification Code vsp-id value been set?- Returns:
trueof the Verification Code vsp-id value has been set;falseotherwise.
-
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;
UNDEFINEDotherwise.
-
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:
trueof the internal (surrogate) Verification Service Provider (VSP) identifier has been set;falseotherwise.
-
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;
UNDEFINEDotherwise.
-
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:
trueof the locality profile associated with the Verification Service Provider (VSP) has been set;falseotherwise.
-
getProfileName
public java.lang.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;
nullotherwise.
-
setProfileName
public void setProfileName(java.lang.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:
trueif there are code types;falseotherwise.
-
addCodeType
public void addCodeType(java.lang.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 java.util.List<java.lang.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(java.util.List<java.lang.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:
trueof the VSP short name has been set;falseotherwise.
-
getShortName
public java.lang.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;
nullotherwise.
-
setShortName
public void setShortName(java.lang.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:
trueof the Verification Service Provider (VSP) trust anchor certificate number has been set;falseotherwise.
-
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;
nullotherwise.
-
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(java.lang.String aTrustAnchorAlias) throws EPPExceptionDecodes 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 java.lang.String encode() throws EPPExceptionEncodes 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(java.lang.Object aObject)
implements a deepTrustAnchorVerificationDatacompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-TrustAnchorVerificationDatainstance to compare with- Returns:
trueif equalfalseotherwise
-
-