Class PoliciesList
- java.lang.Object
-
- es.gob.afirma.tsl.parsing.impl.common.extensions.PoliciesList
-
- All Implemented Interfaces:
java.io.Serializable
public class PoliciesList extends java.lang.Object implements java.io.SerializableClass that represents Policy Lists.
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 intIDENTIFIER_OID_AS_UNSPECIFIEDConstant attribute that represents that the identifier type is undefined.static intIDENTIFIER_OID_AS_URIConstant attribute that represents that the identifier is defined as URI.static intIDENTIFIER_OID_AS_URNConstant attribute that represents that the identifier is defined as URN.
-
Constructor Summary
Constructors Constructor Description PoliciesList()Constructor method for the class PoliciesList.java.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNewPolicyIdentifier(java.lang.String policyIdentifier, int type)Adds a new policy identifier if not isnull.booleancheckCertificate(java.security.cert.X509Certificate cert)Checks if the input certificate has the CertificatePolicies extension and it includes all the OIDs declared in this object.java.util.List<java.lang.String>getPolicyIdentifiersList()Gets the policy identifiers list.booleanisThereSomePolicyIdentifier()Checks if there is at least one policy identifier in the list.
-
-
-
Field Detail
-
IDENTIFIER_OID_AS_URN
public static final int IDENTIFIER_OID_AS_URN
Constant attribute that represents that the identifier is defined as URN.- See Also:
- Constant Field Values
-
IDENTIFIER_OID_AS_URI
public static final int IDENTIFIER_OID_AS_URI
Constant attribute that represents that the identifier is defined as URI.- See Also:
- Constant Field Values
-
IDENTIFIER_OID_AS_UNSPECIFIED
public static final int IDENTIFIER_OID_AS_UNSPECIFIED
Constant attribute that represents that the identifier type is undefined.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPolicyIdentifiersList
public final java.util.List<java.lang.String> getPolicyIdentifiersList()
Gets the policy identifiers list.- Returns:
- the policy identifiers list
-
isThereSomePolicyIdentifier
public final boolean isThereSomePolicyIdentifier()
Checks if there is at least one policy identifier in the list.- Returns:
trueif there is at least one policy identifier in the list, otherwisefalse.
-
addNewPolicyIdentifier
public final void addNewPolicyIdentifier(java.lang.String policyIdentifier, int type)Adds a new policy identifier if not isnull.- Parameters:
policyIdentifier- policy identifier to add.type- Identifier type. It must be one of the following:IDENTIFIER_OID_AS_URN,IDENTIFIER_OID_AS_URIorIDENTIFIER_OID_AS_UNSPECIFIED.
-
checkCertificate
public final boolean checkCertificate(java.security.cert.X509Certificate cert) throws TSLQualificationEvalProcessExceptionChecks if the input certificate has the CertificatePolicies extension and it includes all the OIDs declared in this object.- Parameters:
cert- Certificate X509v3 to check.- Returns:
trueif the input certificate has the CertificatePolicies extension and it includes all the OIDs declared in this object, otherwisefalse.- Throws:
TSLQualificationEvalProcessException- In case of some error evaluating the input certificate with all defined criteria.
-
-