Interface IXDocReportFactoryDiscovery
- All Superinterfaces:
fr.opensagres.xdocreport.core.discovery.IBaseDiscovery
- All Known Implementing Classes:
AbstractXDocReportFactoryDiscovery
public interface IXDocReportFactoryDiscovery
extends fr.opensagres.xdocreport.core.discovery.IBaseDiscovery
Discovery used to register report factory in the
XDocReportLoader. When report is loaded with
XDocReportLoader#loadReport(java.io.InputStream) discovery is used to create the well instance report
(ODTReport, DocxReport...) switch the type of ziped XML document coming from teh stream.
An implementation report factory discovery is declared in the xdocreport-discovery.properties with 'class' property. Example for ODT report factory :
------------------------- class=fr.opensagres.xdocreport.document.odt.discovery.ODTReportFactoryDiscovery -------------
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new instance ofIXDocReport.fr.opensagres.xdocreport.converter.MimeMappingReturns mime mapping switch the kind of the report (odt, docx...).Class<?>Returns class report created with this factory.booleanisAdaptFor(fr.opensagres.xdocreport.core.io.XDocArchive archive) Returns true if loaded document archive support this discovery and false otherwise.booleanisAdaptFor(String fileExtension) Returns true if file extension support this discovery and false otherwise.Methods inherited from interface fr.opensagres.xdocreport.core.discovery.IBaseDiscovery
getDescription, getId
-
Method Details
-
isAdaptFor
boolean isAdaptFor(fr.opensagres.xdocreport.core.io.XDocArchive archive) Returns true if loaded document archive support this discovery and false otherwise.- Parameters:
archive-- Returns:
-
isAdaptFor
Returns true if file extension support this discovery and false otherwise.- Parameters:
archive-- Returns:
-
createReport
IXDocReport createReport()Create a new instance ofIXDocReport.- Returns:
-
getMimeMapping
fr.opensagres.xdocreport.converter.MimeMapping getMimeMapping()Returns mime mapping switch the kind of the report (odt, docx...).- Returns:
-
getReportClass
Class<?> getReportClass()Returns class report created with this factory.- Returns:
-