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 Type
    Method
    Description
    Create a new instance of IXDocReport.
    fr.opensagres.xdocreport.converter.MimeMapping
    Returns mime mapping switch the kind of the report (odt, docx...).
    Returns class report created with this factory.
    boolean
    isAdaptFor(fr.opensagres.xdocreport.core.io.XDocArchive archive)
    Returns true if loaded document archive support this discovery and false otherwise.
    boolean
    isAdaptFor(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

      boolean isAdaptFor(String fileExtension)
      Returns true if file extension support this discovery and false otherwise.
      Parameters:
      archive -
      Returns:
    • createReport

      IXDocReport createReport()
      Create a new instance of IXDocReport.
      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: