Package eu.europa.esig.dss.simplereport
Class SimpleReportFacade
java.lang.Object
eu.europa.esig.dss.jaxb.common.AbstractJaxbFacade<XmlSimpleReport>
eu.europa.esig.dss.simplereport.SimpleReportFacade
Contains methods to generate SimpleReport
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateHtmlReport
(XmlSimpleReport simpleReport) Generates a Bootstrap 4 Simple reportvoid
generateHtmlReport
(XmlSimpleReport simpleReport, Result result) Generates a Bootstrap 4 Simple reportgenerateHtmlReport
(String marshalledSimpleReport) Generates a Bootstrap 4 Simple reportvoid
generateHtmlReport
(String marshalledSimpleReport, Result result) Generates a Bootstrap 4 Simple reportvoid
generatePdfReport
(XmlSimpleReport simpleReport, Result result) Generates a PDF Simple reportvoid
generatePdfReport
(String marshalledSimpleReport, Result result) Generates a PDF Simple reportprotected 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).static SimpleReportFacade
Instantiates a newSimpleReportFacade
protected JAXBElement<XmlSimpleReport>
wrap
(XmlSimpleReport simpleReport) 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
-
SimpleReportFacade
protected SimpleReportFacade()Default constructor
-
-
Method Details
-
newFacade
Instantiates a newSimpleReportFacade
- Returns:
SimpleReportFacade
-
getJAXBContext
Description copied from class:AbstractJaxbFacade
This method returns the instance ofJAXBContext
which can handle the JAXB Object- Specified by:
getJAXBContext
in classAbstractJaxbFacade<XmlSimpleReport>
- Returns:
- an instance of
JAXBContext
- Throws:
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<XmlSimpleReport>
- 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
Description copied from class:AbstractJaxbFacade
This method wraps/envelops the JAXB object with a "root" element- Specified by:
wrap
in classAbstractJaxbFacade<XmlSimpleReport>
- Parameters:
simpleReport
- the JAXB object to be enveloped to marshall- Returns:
- the enveloped JAXB object, ready to be marshalled
-
generateHtmlReport
public String generateHtmlReport(XmlSimpleReport simpleReport) throws IOException, TransformerException, JAXBException Generates a Bootstrap 4 Simple report- Parameters:
simpleReport
-XmlSimpleReport
- Returns:
String
- Throws:
IOException
- if an IOException occursTransformerException
- if an TransformerException occursJAXBException
- if an JAXBException occurs
-
generateHtmlReport
public void generateHtmlReport(XmlSimpleReport simpleReport, Result result) throws IOException, TransformerException, JAXBException Generates a Bootstrap 4 Simple report- Parameters:
simpleReport
-XmlSimpleReport
result
-Result
to write the report into- Throws:
IOException
- if an IOException occursTransformerException
- if an TransformerException occursJAXBException
- if an JAXBException occurs
-
generateHtmlReport
public String generateHtmlReport(String marshalledSimpleReport) throws IOException, TransformerException Generates a Bootstrap 4 Simple report- Parameters:
marshalledSimpleReport
-String
marshalled report- Returns:
String
- Throws:
IOException
- if IOException occursTransformerException
- if TransformerException occurs
-
generateHtmlReport
public void generateHtmlReport(String marshalledSimpleReport, Result result) throws IOException, TransformerException Generates a Bootstrap 4 Simple report- Parameters:
marshalledSimpleReport
-String
marshalled reportresult
-Result
to write the report into- Throws:
IOException
- if an IOException occursTransformerException
- if an TransformerException occurs
-
generatePdfReport
public void generatePdfReport(XmlSimpleReport simpleReport, Result result) throws IOException, TransformerException, JAXBException Generates a PDF Simple report- Parameters:
simpleReport
-XmlSimpleReport
result
-Result
to write the report into- Throws:
IOException
- if an IOException occursTransformerException
- if an TransformerException occursJAXBException
- if an JAXBException occurs
-
generatePdfReport
public void generatePdfReport(String marshalledSimpleReport, Result result) throws IOException, TransformerException Generates a PDF Simple report- Parameters:
marshalledSimpleReport
-String
marshalled reportresult
-Result
to write the report into- Throws:
IOException
- if an IOException occursTransformerException
- if an TransformerException occurs
-