fr.ifremer.wao.ui.data
Class ExportStreamResponse

java.lang.Object
  extended by fr.ifremer.wao.ui.data.ExportStreamResponse
All Implemented Interfaces:
org.apache.tapestry5.StreamResponse

public abstract class ExportStreamResponse
extends Object
implements org.apache.tapestry5.StreamResponse

Used to render CSV file from data export. Created: 2 févr. 2010

Version:
$Revision: 355 $ Mise a jour: $Date: 2010-02-16 14:56:07 +0100 (mar., 16 févr. 2010) $ par : $Author$
Author:
fdesbois

Field Summary
protected  String filename
           
 
Constructor Summary
ExportStreamResponse(String filename)
          Constructor with filename prefix for resulting file in response.
 
Method Summary
 String getContentType()
          Export only for CSV file with UTF-8 encoding.
 void prepareResponse(org.apache.tapestry5.services.Response response)
          Prepare response for rendering result file with date in filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry5.StreamResponse
getStream
 

Field Detail

filename

protected String filename
Constructor Detail

ExportStreamResponse

public ExportStreamResponse(String filename)
Constructor with filename prefix for resulting file in response.

Parameters:
filename - prefix
Method Detail

getContentType

public String getContentType()
Export only for CSV file with UTF-8 encoding.

Specified by:
getContentType in interface org.apache.tapestry5.StreamResponse
Returns:
the contentType string

prepareResponse

public void prepareResponse(org.apache.tapestry5.services.Response response)
Prepare response for rendering result file with date in filename.

Specified by:
prepareResponse in interface org.apache.tapestry5.StreamResponse
Parameters:
response - to prepare


Copyright © 2009-2010 Ifremer. All Rights Reserved.