org.norther.tammi.sprig.report
Class AbstractReportEngine

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
All Implemented Interfaces:
Serializable, EventListener, NotificationBroadcaster, NotificationEmitter, TraceListener, Manageable, MBeanDelegate, Configurable, ReportEngine
Direct Known Subclasses:
DefaultJasperReports, DefaultJFreeReports

public abstract class AbstractReportEngine
extends DefaultConfigurable
implements ReportEngine

An abstract implementation of ReportEngine.

Version:
$Id: AbstractReportEngine.java,v 1.12 2009/09/28 15:08:51 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
 
Constructor Summary
AbstractReportEngine()
          Constructs a new engine.
 
Method Summary
 Exporter createExporter(String extension)
          Creates a new exporter.
 String getExporterClassName(String extension)
          Gets the class name of the specified exporter.
 String getReportKey()
          Gets the path finder key for resolving report paths.
 ReportLayout parse(File file)
          Parses a report layout from the specified source file.
 ReportLayout parse(String path)
          Parses a report layout from the specified source path.
 ReportLayout parse(String key, String path)
          Parses a report layout from the specified key path.
 ReportLayout parse(URL url)
          Parses a report layout from the specified source URL.
 ReportLayout process(File file, Map<String,Object> params, TableModel data)
          Processes a report layout from the specified source file.
 ReportLayout process(InputStream input, String encoding, Map<String,Object> params, TableModel data)
          Processes a report layout from the specified source stream.
 ReportLayout process(Reader reader, Map<String,Object> params, TableModel data)
          Processes a report layout from the specified source reader.
 ReportLayout process(String path, Map<String,Object> params, TableModel data)
          Processes a report layout from the specified source path.
 ReportLayout process(String key, String path, Map<String,Object> params, TableModel data)
          Processes a report layout from the specified key path.
 ReportLayout process(URL url, Map<String,Object> params, TableModel data)
          Processes a report layout from the specified source URL.
 void removeExporterClassName(String extension)
          Removes the class name of the specified exporter.
 void setExporterClassName(String extension, String className)
          Sets the class name of the specified exporter.
 void setReportKey(String key)
          Sets the path finder key for resolving script paths.
 
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
fill, parse, parse
 
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

AbstractReportEngine

public AbstractReportEngine()
Constructs a new engine.

Method Detail

getReportKey

public String getReportKey()
Description copied from interface: ReportEngine
Gets the path finder key for resolving report paths.

Specified by:
getReportKey in interface ReportEngine
Returns:
the path finder key.

setReportKey

public void setReportKey(String key)
Description copied from interface: ReportEngine
Sets the path finder key for resolving script paths. The default key is PathFinder.SCRIPT.

Specified by:
setReportKey in interface ReportEngine
Parameters:
key - the path finder key.

parse

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

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

parse

public ReportLayout parse(String key,
                          String path)
                   throws LogException
Description copied from interface: ReportEngine
Parses a report layout from the specified key path.

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

parse

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

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

parse

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

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

process

public ReportLayout process(String path,
                            Map<String,Object> params,
                            TableModel data)
                     throws LogException
Description copied from interface: ReportEngine
Processes a report layout from the specified source path.

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

process

public ReportLayout process(String key,
                            String path,
                            Map<String,Object> params,
                            TableModel data)
                     throws LogException
Description copied from interface: ReportEngine
Processes a report layout from the specified key path.

Specified by:
process in interface ReportEngine
Parameters:
key - the path key.
path - the source path.
params - the parameters.
data - the data model.
Returns:
the filled layout.
Throws:
LogException - on errors.

process

public ReportLayout process(File file,
                            Map<String,Object> params,
                            TableModel data)
                     throws LogException
Description copied from interface: ReportEngine
Processes a report layout from the specified source file.

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

process

public ReportLayout process(URL url,
                            Map<String,Object> params,
                            TableModel data)
                     throws LogException
Description copied from interface: ReportEngine
Processes a report layout from the specified source URL.

Specified by:
process in interface ReportEngine
Parameters:
url - the source URL.
params - the parameters.
data - the data model.
Returns:
the filled layout.
Throws:
LogException - on errors.

process

public ReportLayout process(Reader reader,
                            Map<String,Object> params,
                            TableModel data)
                     throws LogException
Description copied from interface: ReportEngine
Processes a report layout from the specified source reader.

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

process

public ReportLayout process(InputStream input,
                            String encoding,
                            Map<String,Object> params,
                            TableModel data)
                     throws LogException
Description copied from interface: ReportEngine
Processes a report layout from the specified source stream.

Specified by:
process in interface ReportEngine
Parameters:
input - the source stream.
encoding - the encoding.
params - the parameters.
data - the data model.
Returns:
the filled layout.
Throws:
LogException - on errors.

getExporterClassName

public String getExporterClassName(String extension)
Description copied from interface: ReportEngine
Gets the class name of the specified exporter.

Specified by:
getExporterClassName in interface ReportEngine
Parameters:
extension - the file name or extension.
Returns:
the class name of the exporter or null.

setExporterClassName

public void setExporterClassName(String extension,
                                 String className)
Description copied from interface: ReportEngine
Sets the class name of the specified exporter.

Specified by:
setExporterClassName in interface ReportEngine
Parameters:
extension - the file name or extension.
className - the class name of the exporter.

removeExporterClassName

public void removeExporterClassName(String extension)
Description copied from interface: ReportEngine
Removes the class name of the specified exporter.

Specified by:
removeExporterClassName in interface ReportEngine
Parameters:
extension - the file name or extension.

createExporter

public Exporter createExporter(String extension)
                        throws LogException
Description copied from interface: ReportEngine
Creates a new exporter.

Specified by:
createExporter in interface ReportEngine
Parameters:
extension - the file name or extension.
Returns:
the exporter instance.
Throws:
LogException - on errors.


Copyright © 2004 The Norther Organization. All rights reserved.