info.joseluismartin.gui.report
Class ReportManager.ProcessFileStrategy

java.lang.Object
  extended by info.joseluismartin.gui.report.ReportManager.ProcessFileStrategy
Direct Known Subclasses:
ReportManager.ConnectionFileStrategy, ReportManager.JRDataSourceFileStrategy
Enclosing class:
ReportManager

public abstract class ReportManager.ProcessFileStrategy
extends Object

Strategy to process the jasper file. Different strategies depending on the system used to retrieve the data (JRDataSource, java.sql.Connection)

Author:
Jose A. Corbacho

Constructor Summary
ReportManager.ProcessFileStrategy()
           
 
Method Summary
 FileProcessor getFileProcessor()
           
 Map<String,Object> getParameters()
           
 boolean isInteractive()
           
 boolean preprocessFile(Report report)
          Pre-process file.
 void processFile(Report report, String outputType, Object reportDataSource)
          Process the report with this reportDataSource.
 void setFileProcessor(FileProcessor fileProcessor)
           
 void setInteractive(boolean interactive)
           
 void setParameters(Map<String,Object> parameters)
           
abstract  void setReportDataSource(FileProcessor fp, Object obj)
          Set the data source in this file processor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportManager.ProcessFileStrategy

public ReportManager.ProcessFileStrategy()
Method Detail

setReportDataSource

public abstract void setReportDataSource(FileProcessor fp,
                                         Object obj)
Set the data source in this file processor.

Parameters:
fp -
obj -

preprocessFile

public boolean preprocessFile(Report report)
Pre-process file. In case this report includes params, display it. The fact a report has params can be determined at the moment of registering it the system. At this point, it could be possible to have this information thus making this process faster

Parameters:
report - report to process

processFile

public void processFile(Report report,
                        String outputType,
                        Object reportDataSource)
                 throws ReportingException,
                        IOException
Process the report with this reportDataSource. The data source can be JRDataSource or Connection

Parameters:
report -
outputType -
reportDataSource -
Throws:
ReportingException
IOException

isInteractive

public boolean isInteractive()
Returns:
the interactive

setInteractive

public void setInteractive(boolean interactive)
Parameters:
interactive - the interactive to set

getParameters

public Map<String,Object> getParameters()
Returns:
the parameters

setParameters

public void setParameters(Map<String,Object> parameters)
Parameters:
parameters - the parameters to set

getFileProcessor

public FileProcessor getFileProcessor()
Returns:
the fileProcessor

setFileProcessor

public void setFileProcessor(FileProcessor fileProcessor)
Parameters:
fileProcessor - the fileProcessor to set


Copyright © 2013 JDAL. All Rights Reserved.