fr.opensagres.xdocreport.document.discovery
Interface IXDocReportFactoryDiscovery

All Superinterfaces:
IBaseDiscovery
All Known Implementing Classes:
AbstractXDocReportFactoryDiscovery, DocxReportFactoryDiscovery, ODPReportFactoryDiscovery, ODSReportFactoryDiscovery, ODTReportFactoryDiscovery, PPTXReportFactoryDiscovery

public interface IXDocReportFactoryDiscovery
extends 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
 IXDocReport createReport()
          Create a new instance of IXDocReport.
 MimeMapping getMimeMapping()
          Returns mime mapping switch the kind of the report (odt, docx...).
 Class<?> getReportClass()
          Returns class report created with this factory.
 boolean isAdaptFor(String fileExtension)
          Returns true if file extension support this discovery and false otherwise.
 boolean isAdaptFor(XDocArchive archive)
          Returns true if loaded document archive support this discovery and false otherwise.
 
Methods inherited from interface fr.opensagres.xdocreport.core.discovery.IBaseDiscovery
getDescription, getId
 

Method Detail

isAdaptFor

boolean isAdaptFor(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

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:


Copyright © 2013. All rights reserved.