fr.ifremer.echobase.ui.actions.export
Class DownloadExportSqlResult

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by org.nuiton.web.struts2.BaseAction
          extended by fr.ifremer.echobase.ui.actions.EchoBaseActionSupport
              extended by fr.ifremer.echobase.ui.actions.export.DownloadExportSqlResult
All Implemented Interfaces:
com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable, org.nuiton.topia.framework.TopiaTransactionAware

public class DownloadExportSqlResult
extends EchoBaseActionSupport

Download the result of sql request in csv format.

Since:
0.1
Author:
tchemit
See Also:
Serialized Form

Field Summary
protected  int contentLength
          Length of the file to download.
protected  String contentType
          Content type of the file to download.
protected  String fileName
          File name of the download.
protected  InputStream inputStream
          Input stream of the file to download.
protected  String sql
          Sql request to execute.
 
Fields inherited from class fr.ifremer.echobase.ui.actions.EchoBaseActionSupport
APPLICATION_CONTEXT_PARAMETER, serviceContext, serviceFactory, SESSION_PARAMETER, transaction
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
DownloadExportSqlResult()
           
 
Method Summary
 String execute()
           
 int getContentLength()
           
 String getContentType()
           
 String getFileName()
           
 InputStream getInputStream()
           
 void setFileName(String fileName)
           
 void setSql(String sql)
           
 
Methods inherited from class fr.ifremer.echobase.ui.actions.EchoBaseActionSupport
decorate, formatDate, formatMonth, getActionContext, getApplicationVersion, getConfiguration, getDateFormat, getDecoratorService, getEchoBaseApplicationContext, getEchoBaseSession, getMonthFormat, getServiceContext, getServiceFactory, getTransaction, newService, setTransaction, sortAndDecorate
 
Methods inherited from class org.nuiton.web.struts2.BaseAction
_
 
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sql

protected String sql
Sql request to execute.


inputStream

protected transient InputStream inputStream
Input stream of the file to download.


fileName

protected String fileName
File name of the download.


contentLength

protected int contentLength
Length of the file to download.


contentType

protected String contentType
Content type of the file to download.

Constructor Detail

DownloadExportSqlResult

public DownloadExportSqlResult()
Method Detail

setSql

public void setSql(String sql)

setFileName

public void setFileName(String fileName)

getInputStream

public InputStream getInputStream()

getFileName

public String getFileName()

getContentLength

public int getContentLength()

getContentType

public String getContentType()

execute

public String execute()
               throws Exception
Specified by:
execute in interface com.opensymphony.xwork2.Action
Overrides:
execute in class com.opensymphony.xwork2.ActionSupport
Throws:
Exception


Copyright © 2011 Ifremer. All Rights Reserved.