fr.ifremer.echobase.ui.actions.dbeditor
Class ImportTable

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.dbeditor.AbstractLoadPage
                  extended by fr.ifremer.echobase.ui.actions.dbeditor.ImportTable
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 ImportTable
extends AbstractLoadPage

To import datas from import file.

FIXME 20111117 sletellier : extends LoadEntities find a better way to redirect to dbeditor page on validation error UPDATE 20111118 sletellier : with @InputConfig probleme is solve ? dbeditor root page is prepared only on validation error...

Since:
0.1
Author:
sletellier
See Also:
Serialized Form

Field Summary
protected  boolean createIfNotFound
          Flag to authorize to create an entity if not found in db.
protected  File importFile
          WTF ?
protected  String importFileContentType
          WTF ?
protected  String importFileFileName
          WTF ?
 
Fields inherited from class fr.ifremer.echobase.ui.actions.dbeditor.AbstractLoadPage
entityType, entityTypes, tableMeta
 
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
ImportTable()
           
 
Method Summary
 String execute()
           
 Exception getError()
           
 String getErrorStack()
           
 File getImportFile()
           
 String getImportFileContentType()
           
 String getImportFileFileName()
           
 CsvImportResult getResult()
           
 String input()
           
 boolean isCreateIfNotFound()
           
 void setCreateIfNotFound(boolean createIfNotFound)
           
 void setImportFile(File importFile)
           
 void setImportFileContentType(String importFileContentType)
           
 void setImportFileFileName(String importFileFileName)
           
 
Methods inherited from class fr.ifremer.echobase.ui.actions.dbeditor.AbstractLoadPage
getColumnMetas, getEntityType, getEntityTypes, load, setEntityType
 
Methods inherited from class fr.ifremer.echobase.ui.actions.EchoBaseActionSupport
copyFile, decorate, decorateEnums, formatDate, formatMonth, getActionContext, getApplicationVersion, getConfiguration, getDateFormat, getDecoratorService, getEchoBaseApplicationContext, getEchoBaseSession, getMonthFormat, getServiceContext, getServiceFactory, getTransaction, isAdmin, 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, 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

importFile

protected File importFile
WTF ?


createIfNotFound

protected boolean createIfNotFound
Flag to authorize to create an entity if not found in db.


importFileContentType

protected String importFileContentType
WTF ?


importFileFileName

protected String importFileFileName
WTF ?

Constructor Detail

ImportTable

public ImportTable()
Method Detail

getResult

public CsvImportResult getResult()

getImportFile

public File getImportFile()

setImportFile

public void setImportFile(File importFile)

getImportFileContentType

public String getImportFileContentType()

setImportFileContentType

public void setImportFileContentType(String importFileContentType)

getImportFileFileName

public String getImportFileFileName()

setImportFileFileName

public void setImportFileFileName(String importFileFileName)

isCreateIfNotFound

public boolean isCreateIfNotFound()

setCreateIfNotFound

public void setCreateIfNotFound(boolean createIfNotFound)

getError

public Exception getError()

getErrorStack

public String getErrorStack()

input

public String input()
             throws Exception
Overrides:
input in class com.opensymphony.xwork2.ActionSupport
Throws:
Exception

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-2012 Ifremer. All Rights Reserved.