org.norther.tammi.sprig.chart
Interface ChartFilter

All Superinterfaces:
Filter
All Known Implementing Classes:
DefaultChartFilter

public interface ChartFilter
extends Filter

An interface to chart filters.

Author:
Ilkka Priha

Method Summary
 String encode(ChartLayout layout, String extension, int quality, ServletRequest request, ServletResponse response, FilterChain chain)
          Encodes the specified layout with the specified quality and returns a temporary path to it.
 String encode(ChartLayout layout, String extension, ServletRequest request, ServletResponse response, FilterChain chain)
          Encodes the specified layout and returns a temporary path to it.
 ChartLayout generate(ChartModel[] data, int type, int orientation, int order, int index, ServletRequest request, ServletResponse response, FilterChain chain)
          Generates an ordered layout from the specified models.
 ChartLayout generate(ChartModel[] data, int type, int orientation, ServletRequest request, ServletResponse response, FilterChain chain)
          Generates a layout from the specified models.
 ChartLayout generate(ChartModel data, int type, int orientation, int order, int index, ServletRequest request, ServletResponse response, FilterChain chain)
          Generates an ordered layout from the specified model.
 ChartLayout generate(ChartModel data, int type, int orientation, ServletRequest request, ServletResponse response, FilterChain chain)
          Generates a layout from the specified model.
 ObjectName getChartGeneratorName()
          Gets the chart generator of this filter.
 void setChartGeneratorName(ObjectName generator)
          Sets the chart generator of this filter.
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 

Method Detail

getChartGeneratorName

ObjectName getChartGeneratorName()
Gets the chart generator of this filter.

Returns:
the object name of the chart generator or a query.

setChartGeneratorName

void setChartGeneratorName(ObjectName generator)
Sets the chart generator of this filter. If it is not set, the default one will be used.

Parameters:
generator - the object name of the chart generator or a query.

generate

ChartLayout generate(ChartModel data,
                     int type,
                     int orientation,
                     ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
                     throws LogException
Generates a layout from the specified model.

Parameters:
data - the data model.
type - the chart type.
orientation - the orientation.
request - the request.
response - the response.
chain - the filter chain.
Returns:
the generated layout.
Throws:
LogException - on errors.

generate

ChartLayout generate(ChartModel[] data,
                     int type,
                     int orientation,
                     ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
                     throws LogException
Generates a layout from the specified models.

Parameters:
data - the data models.
type - the chart type.
orientation - the orientation.
request - the request.
response - the response.
chain - the filter chain.
Returns:
the generated layout.
Throws:
LogException - on errors.

generate

ChartLayout generate(ChartModel data,
                     int type,
                     int orientation,
                     int order,
                     int index,
                     ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
                     throws LogException
Generates an ordered layout from the specified model.

Parameters:
data - the data model.
type - the chart type.
orientation - the orientation.
order - the model order.
index - the model index.
request - the request.
response - the response.
chain - the filter chain.
Returns:
the generated layout.
Throws:
LogException - on errors.

generate

ChartLayout generate(ChartModel[] data,
                     int type,
                     int orientation,
                     int order,
                     int index,
                     ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
                     throws LogException
Generates an ordered layout from the specified models.

Parameters:
data - the data models.
type - the chart type.
orientation - the orientation.
order - the model order.
index - the model index.
request - the request.
response - the response.
chain - the filter chain.
Returns:
the generated layout.
Throws:
LogException - on errors.

encode

String encode(ChartLayout layout,
              String extension,
              ServletRequest request,
              ServletResponse response,
              FilterChain chain)
              throws LogException
Encodes the specified layout and returns a temporary path to it.

Parameters:
layout - the layout.
extension - the encode type.
request - the request.
response - the response.
chain - the filter chain.
Returns:
a path to the encoded chart.
Throws:
LogException - on errors.

encode

String encode(ChartLayout layout,
              String extension,
              int quality,
              ServletRequest request,
              ServletResponse response,
              FilterChain chain)
              throws LogException
Encodes the specified layout with the specified quality and returns a temporary path to it.

Parameters:
layout - the layout.
extension - the encode type.
quality - the quality (0 - 100 %).
request - the request.
response - the response.
chain - the filter chain.
Returns:
a path to the encoded chart.
Throws:
LogException - on errors.


Copyright © 2004 The Norther Organization. All rights reserved.