Class CriteriaList

  • All Implemented Interfaces:
    java.io.Serializable

    public class CriteriaList
    extends java.lang.Object
    implements java.io.Serializable

    Class 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 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
    • Constructor Detail

      • CriteriaList

        public CriteriaList​(java.lang.String assertTypeParam)
        Constructor method for the class CriteriaList.java.
        Parameters:
        assertTypeParam - Assert type to assing to this object.
    • Method Detail

      • getAssertType

        public final java.lang.String getAssertType()
        Gets the value of the attribute assertType.
        Returns:
        the value of the attribute assertType.
      • getKeyUsageList

        public final java.util.List<KeyUsage> getKeyUsageList()
        Gets the value of the attribute keyUsageList.
        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 is null, then do nothing.
      • isThereSomeKeyUsage

        public final boolean isThereSomeKeyUsage()
        Check if exists at least one key usage.
        Returns:
        true if exists at least one key usage, otherwise false.
      • addNewPolicySet

        public final void addNewPolicySet​(PoliciesList pl)
        Add new policy set to the Criteria List.
        Parameters:
        pl - Policy Set to add. If it is null, then do nothing.
      • isThereSomePolicySet

        public final boolean isThereSomePolicySet()
        Checks if there is at least one policy set.
        Returns:
        true if there is at least one policy set, otherwise false.
      • addNewCriteriaList

        public final void addNewCriteriaList​(CriteriaList cl)
        Add new sub Criteria List to this Criteria List.
        Parameters:
        cl - Criteria List to add. If it is null, then do nothing.
      • isThereSomeCriteriaList

        public final boolean isThereSomeCriteriaList()
        Checks if there is at least one sub criteria list.
        Returns:
        true if there is at least one sub criteria list, otherwise false.
      • getDescription

        public final java.lang.String getDescription()
        Gets the value of the attribute description.
        Returns:
        the value of the attribute description.
      • setDescription

        public final void setDescription​(java.lang.String descriptionParam)
        Sets the value of the attribute description.
        Parameters:
        descriptionParam - The value for the attribute description.
      • checkCertificate

        public final boolean checkCertificate​(java.security.cert.X509Certificate cert)
                                       throws TSLQualificationEvalProcessException
        Checks if the input certificate is accomplished with this Criteria List.
        Parameters:
        cert - X509v3 certificate to check.
        Returns:
        true if the input certificate is accomplished with this Criteria List, otherwise false.
        Throws:
        TSLQualificationEvalProcessException - In case of some error evaluating the input certificate with the criteria lists.