org.tigris.scarab.screens
Class ReportExport

java.lang.Object
  extended byorg.apache.turbine.modules.Module
      extended byorg.apache.turbine.modules.SecureModule
          extended byorg.apache.turbine.modules.screens.TemplateSecureScreen
              extended byorg.apache.turbine.TemplateSecureScreen
                  extended byorg.tigris.scarab.screens.Default
                      extended byorg.tigris.scarab.screens.DataExport
                          extended byorg.tigris.scarab.screens.ReportExport

public class ReportExport
extends DataExport

Handles export of a report to non-web formats.

Since:
Scarab 1.0
Version:
$Id: ReportExport.java 8704 2003-10-17 10:02:07Z dep4b $
Author:
Daniel Rall
See Also:
DataExport

Nested Class Summary
protected  class DataExport.TSVPrinter
          Uses a PrintWriter internally to do actual writing.
 
Field Summary
protected static java.lang.String NO_CONTENT
          What to show if a cell is empty.
 
Constructor Summary
ReportExport()
           
 
Method Summary
protected  boolean containsElements(java.util.List l)
           
 void doBuildTemplate(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
          Writes the response.
protected  java.lang.String escapeCommas(java.lang.String s)
          Escape any commas in passed string.
protected  java.lang.String getEncodingForExport(org.apache.turbine.RunData data)
          This function encapsulates the logic of determining which encoding to use.
protected  java.io.Writer getWriter(org.apache.turbine.RunData data)
          This function is available to subclasses -- it is used to provide a Writer based on the current request and the site configuration, taking encoding issues into consideration.
 
Methods inherited from class org.tigris.scarab.screens.Default
checkAuthorized, doBuild, getLocalizationTool, getScarabRequestTool, getTitle, isAuthorized, setTargetLogin, setTargetSelectModule
 
Methods inherited from class org.apache.turbine.modules.SecureModule
doBuildTemplate
 
Methods inherited from class org.apache.turbine.modules.Module
build, evaluate, execute, getPullService, getTemplateContext, getTemplateService, getTool, handleRequest, handleRequest, requestFinished, setTarget, setTemplate, templateExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CONTENT

protected static final java.lang.String NO_CONTENT
What to show if a cell is empty. The empty string is dealt with best by spreadsheet applications.

See Also:
Constant Field Values
Constructor Detail

ReportExport

public ReportExport()
Method Detail

doBuildTemplate

public void doBuildTemplate(org.apache.turbine.RunData data,
                            org.apache.turbine.TemplateContext context)
                     throws java.lang.Exception
Writes the response. Modelled after the #reportTable() Velocimacro.

Overrides:
doBuildTemplate in class DataExport
Throws:
java.lang.Exception

getEncodingForExport

protected java.lang.String getEncodingForExport(org.apache.turbine.RunData data)
This function encapsulates the logic of determining which encoding to use. Right now, the encoding isn't per-request, but that should be changed.


getWriter

protected java.io.Writer getWriter(org.apache.turbine.RunData data)
                            throws java.io.IOException
This function is available to subclasses -- it is used to provide a Writer based on the current request and the site configuration, taking encoding issues into consideration.

Throws:
java.io.IOException

escapeCommas

protected java.lang.String escapeCommas(java.lang.String s)
Escape any commas in passed string.

Parameters:
s - String to check.
Returns:
Passed string with commas escaped.

containsElements

protected final boolean containsElements(java.util.List l)


Copyright © 2000-2004 Tigris.org. All Rights Reserved.