org.norther.tammi.sprig.jasper
Class DefaultJasperReports

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.config.DefaultConfigurable
          extended by org.norther.tammi.sprig.report.AbstractReportEngine
              extended by org.norther.tammi.sprig.jasper.DefaultJasperReports
All Implemented Interfaces:
Serializable, EventListener, NotificationBroadcaster, NotificationEmitter, TraceListener, Manageable, MBeanDelegate, Configurable, JasperReports, ReportEngine

public class DefaultJasperReports
extends AbstractReportEngine
implements JasperReports

A JasperReports specific implementation of ReportEngine.

Version:
$Id: DefaultJasperReports.java,v 1.11 2009/09/28 17:56:48 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.norther.tammi.core.config.DefaultConfigurable
DefaultConfigurable.Modified
 
Field Summary
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.sprig.jasper.JasperReports
DESIGN_EXTENSION, PRINT_EXTENSION, REPORT_EXTENSION
 
Constructor Summary
DefaultJasperReports()
          Constructs a new engine.
 
Method Summary
 net.sf.jasperreports.engine.JasperReport compile(File source)
          Compiles the specified design.
 net.sf.jasperreports.engine.JasperReport compile(InputStream input, String encoding)
          Compiles the specified design.
 net.sf.jasperreports.engine.JasperReport compile(net.sf.jasperreports.engine.design.JasperDesign design)
          Compiles the specified design.
 net.sf.jasperreports.engine.JasperReport compile(Reader reader)
          Compiles the specified design.
 net.sf.jasperreports.engine.JasperReport compile(String source)
          Compiles the specified design.
 net.sf.jasperreports.engine.JasperReport compile(String key, String source)
          Compiles the specified design.
 net.sf.jasperreports.engine.JasperReport compile(URL source)
          Compiles the specified design.
 void fill(ReportLayout layout, Map<String,Object> params, TableModel data)
          Fills the specified report layout.
 String getCalculatorClassName()
          Gets the calculator class name
 net.sf.jasperreports.engine.JasperReport interpret(File source)
          Interprets the specified design.
 net.sf.jasperreports.engine.JasperReport interpret(InputStream input, String encoding)
          Interprets the specified design.
 net.sf.jasperreports.engine.JasperReport interpret(net.sf.jasperreports.engine.design.JasperDesign design)
          Interprets the specified design.
 net.sf.jasperreports.engine.JasperReport interpret(Reader reader)
          Interprets the specified design.
 net.sf.jasperreports.engine.JasperReport interpret(String source)
          Interprets the specified design.
 net.sf.jasperreports.engine.JasperReport interpret(String key, String source)
          Interprets the specified design.
 net.sf.jasperreports.engine.JasperReport interpret(URL source)
          Interprets the specified design.
 net.sf.jasperreports.engine.design.JasperDesign load(File source)
          Loads the specified design.
 net.sf.jasperreports.engine.design.JasperDesign load(InputStream input, String encoding)
          Loads the specified design.
 net.sf.jasperreports.engine.design.JasperDesign load(Reader reader)
          Loads the specified design.
 net.sf.jasperreports.engine.design.JasperDesign load(String source)
          Loads the specified design.
 net.sf.jasperreports.engine.design.JasperDesign load(String key, String source)
          Loads the specified design.
 net.sf.jasperreports.engine.design.JasperDesign load(URL source)
          Loads the specified design.
 ReportLayout parse(InputStream input, String encoding)
          Parses a report layout from the specified source stream.
 ReportLayout parse(Reader reader)
          Parses a report layout from the specified source reader.
 ReportLayout process(net.sf.jasperreports.engine.JasperReport report, Map<String,Object> params, TableModel data)
          Processes the specified report.
 net.sf.jasperreports.engine.JasperPrint publish(File source, Map<String,Object> params, net.sf.jasperreports.engine.JRDataSource data)
          Publishes the specified design or report.
 net.sf.jasperreports.engine.JasperPrint publish(InputStream input, Map<String,Object> params, net.sf.jasperreports.engine.JRDataSource data)
          Publishes the specified report.
 net.sf.jasperreports.engine.JasperPrint publish(net.sf.jasperreports.engine.design.JasperDesign design, Map<String,Object> params, net.sf.jasperreports.engine.JRDataSource data)
          Publishes the specified design.
 net.sf.jasperreports.engine.JasperPrint publish(net.sf.jasperreports.engine.JasperReport report, Map<String,Object> params, net.sf.jasperreports.engine.JRDataSource data)
          Publishes the specified report.
 net.sf.jasperreports.engine.JasperPrint publish(String source, Map<String,Object> params, net.sf.jasperreports.engine.JRDataSource data)
          Publishes the specified design or report.
 net.sf.jasperreports.engine.JasperPrint publish(String key, String source, Map<String,Object> params, net.sf.jasperreports.engine.JRDataSource data)
          Publishes the specified design or report.
 net.sf.jasperreports.engine.JasperPrint publish(URL source, Map<String,Object> params, net.sf.jasperreports.engine.JRDataSource data)
          Publishes the specified design or report.
 Object read(File source)
          Reads the specified object.
 Object read(InputStream input)
          Reads the specified object.
 Object read(String source)
          Reads the specified object.
 Object read(String key, String source)
          Reads the specified object.
 Object read(URL source)
          Reads the specified object.
 void setCalculatorClassName(String className)
          Sets the calculator class name
 void write(Object source, File target)
          Writes the specified object.
 void write(Object source, OutputStream output)
          Writes the specified object.
 void write(Object source, String target)
          Writes the specified object.
 void write(Object source, String key, String target)
          Writes the specified object.
 
Methods inherited from class org.norther.tammi.sprig.report.AbstractReportEngine
createExporter, getExporterClassName, getReportKey, parse, parse, parse, parse, process, process, process, process, process, process, removeExporterClassName, setExporterClassName, setReportKey
 
Methods inherited from class org.norther.tammi.core.config.DefaultConfigurable
addProperty, addProperty, addPropertyFilePath, addPropertyFilePath, checkConfiguration, clearProperties, containsProperty, getConfigKey, getConfiguration, getModifiedState, getProperties, getProperty, getPropertyFilePath, getPropertyFilePaths, indexOfProperty, loadConfiguration, loadConfiguration, loadConfiguration, modified, propertyMap, propertyMap, removeProperty, removeProperty, removePropertyFilePath, setConfigKey, setModifiedState, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, setPropertyFilePaths, setPropertyFilePaths, storeProperties, validateConfiguration
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.sprig.report.ReportEngine
createExporter, getExporterClassName, getReportKey, parse, parse, parse, parse, process, process, process, process, process, process, removeExporterClassName, setExporterClassName, setReportKey
 
Methods inherited from interface org.norther.tammi.core.config.Configurable
addProperty, addProperty, addPropertyFilePath, addPropertyFilePath, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, getPropertyFilePaths, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, removePropertyFilePath, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, setPropertyFilePaths, setPropertyFilePaths, storeProperties
 

Constructor Detail

DefaultJasperReports

public DefaultJasperReports()
Constructs a new engine.

Method Detail

getCalculatorClassName

public String getCalculatorClassName()
Description copied from interface: JasperReports
Gets the calculator class name

Specified by:
getCalculatorClassName in interface JasperReports
Returns:
the calculator class name.

setCalculatorClassName

public void setCalculatorClassName(String className)
Description copied from interface: JasperReports
Sets the calculator class name

Specified by:
setCalculatorClassName in interface JasperReports
Parameters:
className - the calculator class name.

parse

public ReportLayout parse(Reader reader)
                   throws LogException
Description copied from interface: ReportEngine
Parses a report layout from the specified source reader.

Specified by:
parse in interface ReportEngine
Parameters:
reader - the source reader.
Returns:
the parsed layout.
Throws:
LogException - on errors.

parse

public ReportLayout parse(InputStream input,
                          String encoding)
                   throws LogException
Description copied from interface: ReportEngine
Parses a report layout from the specified source stream.

Specified by:
parse in interface ReportEngine
Parameters:
input - the source stream.
encoding - the encoding.
Returns:
the parsed layout.
Throws:
LogException - on errors.

fill

public void fill(ReportLayout layout,
                 Map<String,Object> params,
                 TableModel data)
          throws LogException
Description copied from interface: ReportEngine
Fills the specified report layout.

Specified by:
fill in interface ReportEngine
Parameters:
layout - the report layout.
params - the parameters.
data - the data model.
Throws:
LogException - on errors.

process

public ReportLayout process(net.sf.jasperreports.engine.JasperReport report,
                            Map<String,Object> params,
                            TableModel data)
                     throws LogException
Description copied from interface: JasperReports
Processes the specified report.

Specified by:
process in interface JasperReports
Parameters:
report - the report.
params - the parameters.
data - the data model.
Returns:
the filled layout.
Throws:
LogException - on errors.

load

public net.sf.jasperreports.engine.design.JasperDesign load(String source)
                                                     throws LogException
Description copied from interface: JasperReports
Loads the specified design.

Specified by:
load in interface JasperReports
Parameters:
source - the source path.
Returns:
the loaded design.
Throws:
LogException - on errors.

load

public net.sf.jasperreports.engine.design.JasperDesign load(String key,
                                                            String source)
                                                     throws LogException
Description copied from interface: JasperReports
Loads the specified design.

Specified by:
load in interface JasperReports
Parameters:
key - the path key.
source - the source path.
Returns:
the loaded design.
Throws:
LogException - on errors.

load

public net.sf.jasperreports.engine.design.JasperDesign load(File source)
                                                     throws LogException
Description copied from interface: JasperReports
Loads the specified design.

Specified by:
load in interface JasperReports
Parameters:
source - the source file.
Returns:
the loaded design.
Throws:
LogException - on errors.

load

public net.sf.jasperreports.engine.design.JasperDesign load(URL source)
                                                     throws LogException
Description copied from interface: JasperReports
Loads the specified design.

Specified by:
load in interface JasperReports
Parameters:
source - the source URL.
Returns:
the loaded design.
Throws:
LogException - on errors.

load

public net.sf.jasperreports.engine.design.JasperDesign load(Reader reader)
                                                     throws LogException
Description copied from interface: JasperReports
Loads the specified design.

Specified by:
load in interface JasperReports
Parameters:
reader - the source reader.
Returns:
the loaded design.
Throws:
LogException - on errors.

load

public net.sf.jasperreports.engine.design.JasperDesign load(InputStream input,
                                                            String encoding)
                                                     throws LogException
Description copied from interface: JasperReports
Loads the specified design.

Specified by:
load in interface JasperReports
Parameters:
input - the source stream.
encoding - the encoding.
Returns:
the loaded design.
Throws:
LogException - on errors.

compile

public net.sf.jasperreports.engine.JasperReport compile(String source)
                                                 throws LogException
Description copied from interface: JasperReports
Compiles the specified design.

Specified by:
compile in interface JasperReports
Parameters:
source - the source path.
Returns:
the compiled report.
Throws:
LogException - on errors.

compile

public net.sf.jasperreports.engine.JasperReport compile(String key,
                                                        String source)
                                                 throws LogException
Description copied from interface: JasperReports
Compiles the specified design.

Specified by:
compile in interface JasperReports
Parameters:
key - the path key.
source - the source path.
Returns:
the compiled report.
Throws:
LogException - on errors.

compile

public net.sf.jasperreports.engine.JasperReport compile(File source)
                                                 throws LogException
Description copied from interface: JasperReports
Compiles the specified design.

Specified by:
compile in interface JasperReports
Parameters:
source - the source file.
Returns:
the compiled report.
Throws:
LogException - on errors.

compile

public net.sf.jasperreports.engine.JasperReport compile(URL source)
                                                 throws LogException
Description copied from interface: JasperReports
Compiles the specified design.

Specified by:
compile in interface JasperReports
Parameters:
source - the source URL.
Returns:
the compiled report.
Throws:
LogException - on errors.

compile

public net.sf.jasperreports.engine.JasperReport compile(Reader reader)
                                                 throws LogException
Description copied from interface: JasperReports
Compiles the specified design.

Specified by:
compile in interface JasperReports
Parameters:
reader - the source reader.
Returns:
the compiled report.
Throws:
LogException - on errors.

compile

public net.sf.jasperreports.engine.JasperReport compile(InputStream input,
                                                        String encoding)
                                                 throws LogException
Description copied from interface: JasperReports
Compiles the specified design.

Specified by:
compile in interface JasperReports
Parameters:
input - the source stream.
encoding - the encoding.
Returns:
the compiled report.
Throws:
LogException - on errors.

compile

public net.sf.jasperreports.engine.JasperReport compile(net.sf.jasperreports.engine.design.JasperDesign design)
                                                 throws LogException
Description copied from interface: JasperReports
Compiles the specified design.

Specified by:
compile in interface JasperReports
Parameters:
design - the design.
Returns:
the compiled report.
Throws:
LogException - on errors.

interpret

public net.sf.jasperreports.engine.JasperReport interpret(String source)
                                                   throws LogException
Description copied from interface: JasperReports
Interprets the specified design.

Specified by:
interpret in interface JasperReports
Parameters:
source - the source path.
Returns:
the interpreted design.
Throws:
LogException - on errors.

interpret

public net.sf.jasperreports.engine.JasperReport interpret(String key,
                                                          String source)
                                                   throws LogException
Description copied from interface: JasperReports
Interprets the specified design.

Specified by:
interpret in interface JasperReports
Parameters:
key - the path key.
source - the source path.
Returns:
the interpreted report.
Throws:
LogException - on errors.

interpret

public net.sf.jasperreports.engine.JasperReport interpret(File source)
                                                   throws LogException
Description copied from interface: JasperReports
Interprets the specified design.

Specified by:
interpret in interface JasperReports
Parameters:
source - the source file.
Returns:
the interpreted report.
Throws:
LogException - on errors.

interpret

public net.sf.jasperreports.engine.JasperReport interpret(URL source)
                                                   throws LogException
Description copied from interface: JasperReports
Interprets the specified design.

Specified by:
interpret in interface JasperReports
Parameters:
source - the source URL.
Returns:
the interpreted report.
Throws:
LogException - on errors.

interpret

public net.sf.jasperreports.engine.JasperReport interpret(Reader reader)
                                                   throws LogException
Description copied from interface: JasperReports
Interprets the specified design.

Specified by:
interpret in interface JasperReports
Parameters:
reader - the source reader.
Returns:
the interpreted report.
Throws:
LogException - on errors.

interpret

public net.sf.jasperreports.engine.JasperReport interpret(InputStream input,
                                                          String encoding)
                                                   throws LogException
Description copied from interface: JasperReports
Interprets the specified design.

Specified by:
interpret in interface JasperReports
Parameters:
input - the source stream.
encoding - the encoding.
Returns:
the interpreted report.
Throws:
LogException - on errors.

interpret

public net.sf.jasperreports.engine.JasperReport interpret(net.sf.jasperreports.engine.design.JasperDesign design)
                                                   throws LogException
Description copied from interface: JasperReports
Interprets the specified design.

Specified by:
interpret in interface JasperReports
Parameters:
design - the design.
Returns:
the interpreted report.
Throws:
LogException - on errors.

publish

public net.sf.jasperreports.engine.JasperPrint publish(String source,
                                                       Map<String,Object> params,
                                                       net.sf.jasperreports.engine.JRDataSource data)
                                                throws LogException
Description copied from interface: JasperReports
Publishes the specified design or report.

Specified by:
publish in interface JasperReports
Parameters:
source - the source path.
params - the parameters.
data - the data source.
Returns:
the published print.
Throws:
LogException - on errors.

publish

public net.sf.jasperreports.engine.JasperPrint publish(String key,
                                                       String source,
                                                       Map<String,Object> params,
                                                       net.sf.jasperreports.engine.JRDataSource data)
                                                throws LogException
Description copied from interface: JasperReports
Publishes the specified design or report.

Specified by:
publish in interface JasperReports
Parameters:
key - the path key.
source - the source path.
params - the parameters.
data - the data source.
Returns:
the published print.
Throws:
LogException - on errors.

publish

public net.sf.jasperreports.engine.JasperPrint publish(File source,
                                                       Map<String,Object> params,
                                                       net.sf.jasperreports.engine.JRDataSource data)
                                                throws LogException
Description copied from interface: JasperReports
Publishes the specified design or report.

Specified by:
publish in interface JasperReports
Parameters:
source - the source file.
params - the parameters.
data - the data source.
Returns:
the published print.
Throws:
LogException - on errors.

publish

public net.sf.jasperreports.engine.JasperPrint publish(URL source,
                                                       Map<String,Object> params,
                                                       net.sf.jasperreports.engine.JRDataSource data)
                                                throws LogException
Description copied from interface: JasperReports
Publishes the specified design or report.

Specified by:
publish in interface JasperReports
Parameters:
source - the source URL.
params - the parameters.
data - the data source.
Returns:
the published print.
Throws:
LogException - on errors.

publish

public net.sf.jasperreports.engine.JasperPrint publish(InputStream input,
                                                       Map<String,Object> params,
                                                       net.sf.jasperreports.engine.JRDataSource data)
                                                throws LogException
Description copied from interface: JasperReports
Publishes the specified report.

Specified by:
publish in interface JasperReports
Parameters:
input - the source stream.
params - the parameters.
data - the data source.
Returns:
the published print.
Throws:
LogException - on errors.

publish

public net.sf.jasperreports.engine.JasperPrint publish(net.sf.jasperreports.engine.design.JasperDesign design,
                                                       Map<String,Object> params,
                                                       net.sf.jasperreports.engine.JRDataSource data)
                                                throws LogException
Description copied from interface: JasperReports
Publishes the specified design.

Specified by:
publish in interface JasperReports
Parameters:
design - the source design.
params - the parameters.
data - the data source.
Returns:
the published print.
Throws:
LogException - on errors.

publish

public net.sf.jasperreports.engine.JasperPrint publish(net.sf.jasperreports.engine.JasperReport report,
                                                       Map<String,Object> params,
                                                       net.sf.jasperreports.engine.JRDataSource data)
                                                throws LogException
Description copied from interface: JasperReports
Publishes the specified report.

Specified by:
publish in interface JasperReports
Parameters:
report - the report.
params - the parameters.
data - the data source.
Returns:
the published print.
Throws:
LogException - on errors.

read

public Object read(String source)
            throws LogException
Description copied from interface: JasperReports
Reads the specified object.

Specified by:
read in interface JasperReports
Parameters:
source - the source path.
Returns:
the read object.
Throws:
LogException - on errors.

read

public Object read(String key,
                   String source)
            throws LogException
Description copied from interface: JasperReports
Reads the specified object.

Specified by:
read in interface JasperReports
Parameters:
key - the path key.
source - the source path.
Returns:
the read object.
Throws:
LogException - on errors.

read

public Object read(File source)
            throws LogException
Description copied from interface: JasperReports
Reads the specified object.

Specified by:
read in interface JasperReports
Parameters:
source - the source file.
Returns:
the read object.
Throws:
LogException - on errors.

read

public Object read(URL source)
            throws LogException
Description copied from interface: JasperReports
Reads the specified object.

Specified by:
read in interface JasperReports
Parameters:
source - the source URL.
Returns:
the read object.
Throws:
LogException - on errors.

read

public Object read(InputStream input)
            throws LogException
Description copied from interface: JasperReports
Reads the specified object.

Specified by:
read in interface JasperReports
Parameters:
input - the source stream.
Returns:
the read object.
Throws:
LogException - on errors.

write

public void write(Object source,
                  String target)
           throws LogException
Description copied from interface: JasperReports
Writes the specified object.

Specified by:
write in interface JasperReports
Parameters:
source - the source object.
target - the target path.
Throws:
LogException - on errors.

write

public void write(Object source,
                  String key,
                  String target)
           throws LogException
Description copied from interface: JasperReports
Writes the specified object.

Specified by:
write in interface JasperReports
Parameters:
source - the source object.
key - the path key.
target - the target path.
Throws:
LogException - on errors.

write

public void write(Object source,
                  File target)
           throws LogException
Description copied from interface: JasperReports
Writes the specified object.

Specified by:
write in interface JasperReports
Parameters:
source - the source object.
target - the target file.
Throws:
LogException - on errors.

write

public void write(Object source,
                  OutputStream output)
           throws LogException
Description copied from interface: JasperReports
Writes the specified object.

Specified by:
write in interface JasperReports
Parameters:
source - the source object.
output - the target stream.
Throws:
LogException - on errors.


Copyright © 2004 The Norther Organization. All rights reserved.