Class CriteriaList
- java.lang.Object
-
- es.gob.afirma.tsl.parsing.impl.common.extensions.CriteriaList
-
- All Implemented Interfaces:
java.io.Serializable
public class CriteriaList extends java.lang.Object implements java.io.SerializableClass that represents a list of assertions related to certificate contents (e.g. key usage) and status (e.g. additional assessment) used to filter certificates.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.2, 19/09/2022.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringASSERT_ALLConstant attribute that represents the assertion 'all'.static java.lang.StringASSERT_ATLEASTONEConstant attribute that represents the assertion 'atLeastOne'.static java.lang.StringASSERT_NONEConstant attribute that represents the assertion 'none'.
-
Constructor Summary
Constructors Constructor Description CriteriaList(java.lang.String assertTypeParam)Constructor method for the class CriteriaList.java.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNewCriteriaList(CriteriaList cl)Add new sub Criteria List to this Criteria List.voidaddNewKeyUsage(KeyUsage ku)Adds a new Key Usage to the Criteria List.voidaddNewPolicySet(PoliciesList pl)Add new policy set to the Criteria List.booleancheckCertificate(java.security.cert.X509Certificate cert)Checks if the input certificate is accomplished with this Criteria List.java.lang.StringgetAssertType()Gets the value of the attributeassertType.java.util.List<CriteriaList>getCriteriaListList()Gets the value of the attributecriteriaListList.java.lang.StringgetDescription()Gets the value of the attributedescription.java.util.List<KeyUsage>getKeyUsageList()Gets the value of the attributekeyUsageList.IAnyTypeOtherCriteriagetOtherCriteria()Gets the value of the attributeotherCriteria.java.util.List<PoliciesList>getPolicySetList()Gets the value of the attributepolicySetList.booleanisThereSomeCriteriaList()Checks if there is at least one sub criteria list.booleanisThereSomeKeyUsage()Check if exists at least one key usage.booleanisThereSomePolicySet()Checks if there is at least one policy set.voidsetDescription(java.lang.String descriptionParam)Sets the value of the attributedescription.voidsetOtherCriteria(IAnyTypeOtherCriteria otherCriteriaParam)Sets the value of the attributeotherCriteria.
-
-
-
Field Detail
-
ASSERT_ALL
public static final java.lang.String ASSERT_ALL
Constant attribute that represents the assertion 'all'.- See Also:
- Constant Field Values
-
ASSERT_ATLEASTONE
public static final java.lang.String ASSERT_ATLEASTONE
Constant attribute that represents the assertion 'atLeastOne'.- See Also:
- Constant Field Values
-
ASSERT_NONE
public static final java.lang.String ASSERT_NONE
Constant attribute that represents the assertion 'none'.- See Also:
- Constant Field Values
-
-
Method Detail
-
getAssertType
public final java.lang.String getAssertType()
Gets the value of the attributeassertType.- Returns:
- the value of the attribute
assertType.
-
getKeyUsageList
public final java.util.List<KeyUsage> getKeyUsageList()
Gets the value of the attributekeyUsageList.- Returns:
- the value of the attribute
keyUsageList.
-
addNewKeyUsage
public final void addNewKeyUsage(KeyUsage ku)
Adds a new Key Usage to the Criteria List.- Parameters:
ku- Key Usage to add. If it isnull, then do nothing.
-
isThereSomeKeyUsage
public final boolean isThereSomeKeyUsage()
Check if exists at least one key usage.- Returns:
trueif exists at least one key usage, otherwisefalse.
-
getPolicySetList
public final java.util.List<PoliciesList> getPolicySetList()
Gets the value of the attributepolicySetList.- Returns:
- the value of the attribute
policySetList.
-
addNewPolicySet
public final void addNewPolicySet(PoliciesList pl)
Add new policy set to the Criteria List.- Parameters:
pl- Policy Set to add. If it isnull, then do nothing.
-
isThereSomePolicySet
public final boolean isThereSomePolicySet()
Checks if there is at least one policy set.- Returns:
trueif there is at least one policy set, otherwisefalse.
-
getCriteriaListList
public final java.util.List<CriteriaList> getCriteriaListList()
Gets the value of the attributecriteriaListList.- Returns:
- the value of the attribute
criteriaListList.
-
addNewCriteriaList
public final void addNewCriteriaList(CriteriaList cl)
Add new sub Criteria List to this Criteria List.- Parameters:
cl- Criteria List to add. If it isnull, then do nothing.
-
isThereSomeCriteriaList
public final boolean isThereSomeCriteriaList()
Checks if there is at least one sub criteria list.- Returns:
trueif there is at least one sub criteria list, otherwisefalse.
-
getDescription
public final java.lang.String getDescription()
Gets the value of the attributedescription.- Returns:
- the value of the attribute
description.
-
setDescription
public final void setDescription(java.lang.String descriptionParam)
Sets the value of the attributedescription.- Parameters:
descriptionParam- The value for the attributedescription.
-
getOtherCriteria
public final IAnyTypeOtherCriteria getOtherCriteria()
Gets the value of the attributeotherCriteria.- Returns:
- the value of the attribute
otherCriteria.
-
setOtherCriteria
public final void setOtherCriteria(IAnyTypeOtherCriteria otherCriteriaParam)
Sets the value of the attributeotherCriteria.- Parameters:
otherCriteriaParam- The value for the attributeotherCriteria.
-
checkCertificate
public final boolean checkCertificate(java.security.cert.X509Certificate cert) throws TSLQualificationEvalProcessExceptionChecks if the input certificate is accomplished with this Criteria List.- Parameters:
cert- X509v3 certificate to check.- Returns:
trueif the input certificate is accomplished with this Criteria List, otherwisefalse.- Throws:
TSLQualificationEvalProcessException- In case of some error evaluating the input certificate with the criteria lists.
-
-