fr.opensagres.xdocreport.document.internal
Class XDocReportServiceImpl

java.lang.Object
  extended by fr.opensagres.xdocreport.document.internal.XDocReportServiceImpl
Direct Known Subclasses:
WSXDocReportService

public class XDocReportServiceImpl
extends Object


Field Summary
static XDocReportServiceImpl INSTANCE
           
 
Constructor Summary
XDocReportServiceImpl()
           
 
Method Summary
 byte[] convert(byte[] document, Options options)
           
 byte[] download(String reportID, String processState)
           
protected  XDocReportRegistry getXDocReportRegistry()
           
 boolean isCacheOriginalDocument()
           
 List<ReportId> listReports()
           
 byte[] process(byte[] document, FieldsMetadata fieldsMetadata, String templateEngineId, List<DataContext> dataContext, Options options)
           
 byte[] process(String reportId, List<DataContext> dataContext, Options options)
           
 void registerReport(String reportId, byte[] document, FieldsMetadata fieldsMetadata, String templateEngineId)
           
 void setCacheOriginalDocument(boolean cacheOriginalDocument)
           
 void unregisterReport(String reportId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final XDocReportServiceImpl INSTANCE
Constructor Detail

XDocReportServiceImpl

public XDocReportServiceImpl()
Method Detail

listReports

public List<ReportId> listReports()

process

public byte[] process(String reportId,
                      List<DataContext> dataContext,
                      Options options)
               throws XDocReportException
Parameters:
reportID - the report ID which was registered in the registry.
dataContext - "live" data to be merged in the template
options - optional, used to customize the output in the case if convertion must be done.
Returns:
the merged content eventually converted in another format (PDF or HTML)
Throws:
XDocReportException

process

public byte[] process(byte[] document,
                      FieldsMetadata fieldsMetadata,
                      String templateEngineId,
                      List<DataContext> dataContext,
                      Options options)
               throws XDocReportException
Parameters:
document - the template in a binary form
fieldsMetadatas - fields metadata used to generate for instance lzy loop for ODT, Docx..row table.
templateEngineID - the template engine ID....
dataContext - "live" data to be merged in the template
options - optional, used to customize the output in the case if convertion must be done.
Returns:
the merged content eventually converted in another format (PDF or HTML)
Throws:
XDocReportException

registerReport

public void registerReport(String reportId,
                           byte[] document,
                           FieldsMetadata fieldsMetadata,
                           String templateEngineId)
                    throws XDocReportException
Throws:
XDocReportException

convert

public byte[] convert(byte[] document,
                      Options options)
               throws XDocReportException
Throws:
XDocReportException

unregisterReport

public void unregisterReport(String reportId)

download

public byte[] download(String reportID,
                       String processState)
                throws XDocReportException
Throws:
XDocReportException

getXDocReportRegistry

protected XDocReportRegistry getXDocReportRegistry()

isCacheOriginalDocument

public boolean isCacheOriginalDocument()

setCacheOriginalDocument

public void setCacheOriginalDocument(boolean cacheOriginalDocument)


Copyright © 2013. All rights reserved.