Class TrustAnchorVerificationData
java.lang.Object
com.verisign.epp.codec.verificationcode.TrustAnchorVerificationData
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 numberAn example alias for the EPPSDK could be "0:-1:china:domain~real-name:eppsdk:1"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intUndefined integer value of the verification data. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.TrustAnchorVerificationData(String aTrustAnchorAlias) Constructor that takes a trust anchor alias from a trust store to be decoded. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCodeType(String aCodeType) Adds a code type to the list of code types.voidDecodes a trust anchor alias from a trust store to set the trust anchor verification data.encode()Encodes a trust anchor anchor for a trust store.booleanimplements a deepTrustAnchorVerificationDatacompare.intGets 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).intGets 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).intgetVspId()Gets the internal (surrogate) Verification Service Provider (VSP) identifier.booleanHas the Verification Service Provider (VSP) trust anchor certificate number been set?booleanAre there any code types?booleanHas the Verification Code vsp-id value been set?booleanHas the locality profile associated with the Verification Service Provider (VSP) been set?booleanHas 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(List<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(String aProfileName) Sets the name of the locality profile associated with the Verification Service Provider (VSP).voidsetShortName(String aShortName) Sets the short name of the Verification Service Provider (VSP).voidsetVspId(int aVspId) Sets the internal (surrogate) Verification Service Provider (VSP) identifier.
-
Field Details
-
UNDEFINED
public static int UNDEFINEDUndefined integer value of the verification data.
-
-
Constructor Details
-
TrustAnchorVerificationData
public TrustAnchorVerificationData()Default constructor. -
TrustAnchorVerificationData
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:
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
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
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
Adds a code type to the list of code types.- Parameters:
aCodeType- Code type to add to the list of code types.
-
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
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
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
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
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
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
implements a deepTrustAnchorVerificationDatacompare.
-