org.norther.tammi.sprig.report.tool
Class ReportTool

java.lang.Object
  extended by org.norther.tammi.core.rt.Introspector
      extended by org.norther.tammi.spray.engine.tool.BeanTool
          extended by org.norther.tammi.sprig.report.tool.ReportTool
All Implemented Interfaces:
Serializable, EventListener, Poolable, Recyclable, ContextBindingListener

public class ReportTool
extends BeanTool

A request context tool for report processing.

Author:
Ilkka Priha
See Also:
Serialized Form

Constructor Summary
ReportTool()
          Constructs a new tool.
 
Method Summary
protected  Variable createVariable(String type)
          Creates a variable MBean instance.
 void dispose()
          Disposes the object after use.
 CharSequence evaluate(List layouts, String extension)
          Evaluates the specified layouts.
 CharSequence evaluate(ReportLayout layout, String extension)
          Evaluates the specified layout.
 void export(List layouts, String extension)
          Exports the specified layouts.
 void export(ReportLayout layout, String extension)
          Exports the specified layout.
protected  ReportFilter getReportFilter()
          Gets the report filter from the filter stack.
 boolean isLocalizedVariables()
          Checks whether variables are localized.
 ReportLayout process(CharSequence source, Map params, TableModel data)
          Processes a char sequence layout.
 ReportLayout process(String path, Map params, TableModel data)
          Processes a file layout.
 
Methods inherited from class org.norther.tammi.spray.engine.tool.BeanTool
addValue, addValue, create, create, create, create, disposed, getContext, getContextToolFilter, getDefaultLocale, getDescription, getDetail, getEnumeration, getFilter, getFilterChain, getFilterKey, getGroup, getKeyValue, getMBeanServer, getName, getPrincipal, getRequest, getResourceMap, getResponse, getValue, getValue, getVariableRegistry, isBound, isDisposed, isFilterChanged, length, recycle, recycled, removeValue, removeValue, setValue, setValue, setValue, toString, toStrings, valueBound, valueUnbound
 
Methods inherited from class org.norther.tammi.core.rt.Introspector
clearResourceCache, contains, exportTo, exportTo, getComparator, getConverter, getInfo, getInfo, getList, getList, getLocale, getMax, getMin, getPattern, getResource, getResourceBundle, getResourceBundle, getResourceBundleName, getResourceBundleName, hasConverter, importFrom, importFrom, isArray, isBlankAccepted, isCloneable, isCorrelative, isDisabled, isEmptyAccepted, isEnumerated, isInteractive, isLocal, isLocalized, isMandatory, isOrdered, isReadable, isSerialized, isSorted, isTraceable, isTransient, isTrimmed, isVisible, isWritable, setLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportTool

public ReportTool()
Constructs a new tool.

Method Detail

dispose

public void dispose()
Description copied from interface: Recyclable
Disposes the object after use. The method is called when the object is returned to its pool. The dispose method must call its super.

Specified by:
dispose in interface Recyclable
Overrides:
dispose in class BeanTool

process

public ReportLayout process(CharSequence source,
                            Map params,
                            TableModel data)
Processes a char sequence layout.

Parameters:
source - the source sequence.
params - the parameters.
data - the data source.
Returns:
the filled layout.

process

public ReportLayout process(String path,
                            Map params,
                            TableModel data)
Processes a file layout.

Parameters:
path - the source path.
params - the parameters.
data - the data source.
Returns:
the filled layout.

evaluate

public CharSequence evaluate(ReportLayout layout,
                             String extension)
Evaluates the specified layout.

Parameters:
layout - the layout.
extension - the extension.
Returns:
the rendered report.

evaluate

public CharSequence evaluate(List layouts,
                             String extension)
Evaluates the specified layouts.

Parameters:
layouts - a list of layouts.
extension - the extension.
Returns:
the rendered report.

export

public void export(ReportLayout layout,
                   String extension)
Exports the specified layout.

Parameters:
layout - the layout.
extension - the extension.

export

public void export(List layouts,
                   String extension)
Exports the specified layouts.

Parameters:
layouts - a list of layouts.
extension - the extension.

isLocalizedVariables

public boolean isLocalizedVariables()
Description copied from class: Introspector
Checks whether variables are localized.

Overrides:
isLocalizedVariables in class BeanTool
Returns:
true if localized, false otherwise.

createVariable

protected Variable createVariable(String type)
                           throws ConstructionException
Description copied from class: Introspector
Creates a variable MBean instance.

Overrides:
createVariable in class Introspector
Parameters:
type - the variable type.
Returns:
the created variable.
Throws:
ConstructionException - if construction fails.

getReportFilter

protected ReportFilter getReportFilter()
Gets the report filter from the filter stack.

Returns:
the report filter or null.


Copyright © 2004 The Norther Organization. All rights reserved.