org.norther.tammi.sprig.report
Interface ReportFilter

All Superinterfaces:
Filter
All Known Implementing Classes:
DefaultReportFilter

public interface ReportFilter
extends Filter

An interface to report filters.

Author:
Ilkka Priha

Method Summary
 Variable createVariable(String type)
          Creates a new variable MBean instance of the specified type.
 CharSequence evaluate(ReportLayout[] layouts, String extension, ServletRequest request, ServletResponse response, FilterChain chain)
          Evaluates the specified reports and returns them as a char sequence.
 void export(ReportLayout[] layouts, String extension, ServletRequest request, ServletResponse response, FilterChain chain)
          Exports the specified reports directly to the response.
 ObjectName getReportEngineName()
          Gets the report engine of this filter.
 ObjectName getVariableRegistryName()
          Gets the the variable registry of this filter.
 boolean isLocalizedReports()
          Gets the localized forms flag.
 ReportLayout process(CharSequence source, Map params, TableModel data, ServletRequest request, ServletResponse response, FilterChain chain)
          Processes a report layout from the specified char sequence.
 ReportLayout process(String path, Map params, TableModel data, ServletRequest request, ServletResponse response, FilterChain chain)
          Processes a report layout from the specified source path.
 void setLocalizedReports(boolean flag)
          Sets the localized forms flag.
 void setReportEngineName(ObjectName engine)
          Sets the report engine of this filter.
 void setVariableRegistryName(ObjectName registry)
          Sets the variable registry of this filter.
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 

Method Detail

isLocalizedReports

boolean isLocalizedReports()
Gets the localized forms flag.

Returns:
the localized forms flag.

setLocalizedReports

void setLocalizedReports(boolean flag)
Sets the localized forms flag.

Parameters:
flag - the localized forms flag.

getReportEngineName

ObjectName getReportEngineName()
Gets the report engine of this filter.

Returns:
the object name of the report engine or a query.

setReportEngineName

void setReportEngineName(ObjectName engine)
Sets the report engine of this filter. If it is not set, the default one will be used.

Parameters:
engine - the object name of the report engine or a query.

getVariableRegistryName

ObjectName getVariableRegistryName()
Gets the the variable registry of this filter.

Returns:
the object name of the variable registry or a query.

setVariableRegistryName

void setVariableRegistryName(ObjectName registry)
Sets the variable registry of this filter. If it is not set, the default one will be used.

Parameters:
registry - the object name of the variable registry or a query.

process

ReportLayout process(CharSequence source,
                     Map params,
                     TableModel data,
                     ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
                     throws LogException
Processes a report layout from the specified char sequence.

Parameters:
source - the source sequence.
params - the parameters.
data - the data model.
request - the request.
response - the response.
chain - the filter chain.
Returns:
the filled layout.
Throws:
LogException - on errors.

process

ReportLayout process(String path,
                     Map params,
                     TableModel data,
                     ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
                     throws LogException
Processes a report layout from the specified source path.

Parameters:
path - the source path.
params - the parameters.
data - the data model.
request - the request.
response - the response.
chain - the filter chain.
Returns:
the filled layout.
Throws:
LogException - on errors.

evaluate

CharSequence evaluate(ReportLayout[] layouts,
                      String extension,
                      ServletRequest request,
                      ServletResponse response,
                      FilterChain chain)
                      throws LogException
Evaluates the specified reports and returns them as a char sequence.

Parameters:
layouts - the layouts.
extension - the type.
request - the request.
response - the response.
chain - the filter chain.
Returns:
the evaluated report.
Throws:
LogException - on errors.

export

void export(ReportLayout[] layouts,
            String extension,
            ServletRequest request,
            ServletResponse response,
            FilterChain chain)
            throws LogException
Exports the specified reports directly to the response.

Parameters:
layouts - the layouts.
extension - the extension.
request - the request.
response - the response.
chain - the filter chain.
Throws:
LogException - on errors.

createVariable

Variable createVariable(String type)
                        throws ConstructionException
Creates a new variable MBean instance of the specified type.

Parameters:
type - the type of the variable.
Returns:
the variable MBean instance.
Throws:
ConstructionException - if construction fails.


Copyright © 2004 The Norther Organization. All rights reserved.