Package eu.europa.esig.dss.policy
Class ValidationPolicyFacade
java.lang.Object
eu.europa.esig.dss.jaxb.common.AbstractJaxbFacade<ConstraintsParameters>
eu.europa.esig.dss.policy.ValidationPolicyFacade
Used to read an XML validation policy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the default policy for certificate validationGets the default validation policyprotected jakarta.xml.bind.JAXBContext
This method returns the instance ofJAXBContext
which can handle the JAXB Objectprotected Schema
This method returns an instance ofSchema
with the loaded XML Schema(s).Gets the validation policy for LOTL/TLgetValidationPolicy
(File file) Gets the validation policy from thefile
Gets the validation policy from theis
getValidationPolicy
(String path) Gets the validation policy from thepath
static ValidationPolicyFacade
Initializes a newValidationPolicyFacade
protected jakarta.xml.bind.JAXBElement
<ConstraintsParameters> wrap
(ConstraintsParameters jaxbObject) This method wraps/envelops the JAXB object with a "root" elementMethods inherited from class eu.europa.esig.dss.jaxb.common.AbstractJaxbFacade
getMarshaller, getUnmarshaller, marshall, marshall, marshall, marshall, unmarshall, unmarshall, unmarshall, unmarshall, unmarshall, unmarshall
-
Constructor Details
-
ValidationPolicyFacade
protected ValidationPolicyFacade()Default constructor
-
-
Method Details
-
newFacade
Initializes a newValidationPolicyFacade
- Returns:
ValidationPolicyFacade
-
getJAXBContext
protected jakarta.xml.bind.JAXBContext getJAXBContext() throws jakarta.xml.bind.JAXBExceptionDescription copied from class:AbstractJaxbFacade
This method returns the instance ofJAXBContext
which can handle the JAXB Object- Specified by:
getJAXBContext
in classAbstractJaxbFacade<ConstraintsParameters>
- Returns:
- an instance of
JAXBContext
- Throws:
jakarta.xml.bind.JAXBException
- if an error occurred in the initialization process
-
getSchema
Description copied from class:AbstractJaxbFacade
This method returns an instance ofSchema
with the loaded XML Schema(s). The XSD(s) allows to validate the JAXB Object.- Specified by:
getSchema
in classAbstractJaxbFacade<ConstraintsParameters>
- Returns:
- an instance of
Schema
- Throws:
IOException
- if an I/O error occurred in the initialization processSAXException
- if a SAX error occurred in the initialization process
-
wrap
protected jakarta.xml.bind.JAXBElement<ConstraintsParameters> wrap(ConstraintsParameters jaxbObject) Description copied from class:AbstractJaxbFacade
This method wraps/envelops the JAXB object with a "root" element- Specified by:
wrap
in classAbstractJaxbFacade<ConstraintsParameters>
- Parameters:
jaxbObject
- the JAXB object to be enveloped to marshall- Returns:
- the enveloped JAXB object, ready to be marshalled
-
getDefaultValidationPolicy
public ValidationPolicy getDefaultValidationPolicy() throws jakarta.xml.bind.JAXBException, XMLStreamException, IOException, SAXExceptionGets the default validation policy- Returns:
ValidationPolicy
- Throws:
jakarta.xml.bind.JAXBException
- ifJAXBException
occursXMLStreamException
- ifXMLStreamException
occursIOException
- ifIOException
occursSAXException
- ifSAXException
occurs
-
getCertificateValidationPolicy
public ValidationPolicy getCertificateValidationPolicy() throws jakarta.xml.bind.JAXBException, XMLStreamException, IOException, SAXExceptionGets the default policy for certificate validation- Returns:
ValidationPolicy
- Throws:
jakarta.xml.bind.JAXBException
- ifJAXBException
occursXMLStreamException
- ifXMLStreamException
occursIOException
- ifIOException
occursSAXException
- ifSAXException
occurs
-
getTrustedListValidationPolicy
public ValidationPolicy getTrustedListValidationPolicy() throws jakarta.xml.bind.JAXBException, XMLStreamException, IOException, SAXExceptionGets the validation policy for LOTL/TL- Returns:
ValidationPolicy
- Throws:
jakarta.xml.bind.JAXBException
- ifJAXBException
occursXMLStreamException
- ifXMLStreamException
occursIOException
- ifIOException
occursSAXException
- ifSAXException
occurs
-
getValidationPolicy
public ValidationPolicy getValidationPolicy(String path) throws jakarta.xml.bind.JAXBException, XMLStreamException, IOException, SAXException Gets the validation policy from thepath
- Parameters:
path
-String
- Returns:
ValidationPolicy
- Throws:
jakarta.xml.bind.JAXBException
- ifJAXBException
occursXMLStreamException
- ifXMLStreamException
occursIOException
- ifIOException
occursSAXException
- ifSAXException
occurs
-
getValidationPolicy
public ValidationPolicy getValidationPolicy(InputStream is) throws jakarta.xml.bind.JAXBException, XMLStreamException, IOException, SAXException Gets the validation policy from theis
- Parameters:
is
-InputStream
- Returns:
ValidationPolicy
- Throws:
jakarta.xml.bind.JAXBException
- ifJAXBException
occursXMLStreamException
- ifXMLStreamException
occursIOException
- ifIOException
occursSAXException
- ifSAXException
occurs
-
getValidationPolicy
public ValidationPolicy getValidationPolicy(File file) throws jakarta.xml.bind.JAXBException, XMLStreamException, IOException, SAXException Gets the validation policy from thefile
- Parameters:
file
-File
- Returns:
ValidationPolicy
- Throws:
jakarta.xml.bind.JAXBException
- ifJAXBException
occursXMLStreamException
- ifXMLStreamException
occursIOException
- ifIOException
occursSAXException
- ifSAXException
occurs
-