fr.ifremer.echobase.ui.actions
Class EchoBaseActionSupport
java.lang.Object
com.opensymphony.xwork2.ActionSupport
org.nuiton.web.struts2.BaseAction
fr.ifremer.echobase.ui.actions.EchoBaseActionSupport
- 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
- Direct Known Subclasses:
- AbstractConfigureImport, AbstractJSONPaginedAction, AbstractLoadPage, AbstractWaitAndExecAction, Configure, Configure, Configure, ConnectToDbInformations, Create, CreateMission, Delete, Download, Download, DownloadExportQueryResult, ExportQueryResult, ExportTable, GetDataProcessingsForVoyage, GetEntity, GetForeignEntities, GetVesselsForVoyage, LoginAction, ManageExportQuery, NewLibreOfficeQuery, SaveEntity, SelectImportType, Update
public class EchoBaseActionSupport
- extends org.nuiton.web.struts2.BaseAction
- implements org.nuiton.topia.framework.TopiaTransactionAware
EchoBase action support.
Note : All actions must implement this class to have a better i18n
support, when a i18n key is not translated it has a empty translation and
we do NOT want this behaviour in gui, prefer to return the marked
untranslated key.
- Since:
- 0.1
- Author:
- tchemit
- See Also:
- Serialized Form
| Fields inherited from class com.opensymphony.xwork2.ActionSupport |
LOG |
| Fields inherited from interface com.opensymphony.xwork2.Action |
ERROR, INPUT, LOGIN, NONE, SUCCESS |
| 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, execute, 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 |
SESSION_PARAMETER
protected static final String SESSION_PARAMETER
- Key to store the
EchoBaseSession instance in the session's map.
- See Also:
- Constant Field Values
APPLICATION_CONTEXT_PARAMETER
public static final String APPLICATION_CONTEXT_PARAMETER
- Key to store the single instance of the application context
- See Also:
- Constant Field Values
serviceFactory
protected transient EchoBaseServiceFactory serviceFactory
- Provides a way to get a service.
Actions may not call it directly by use
newService(Class) instead.
serviceContext
protected transient EchoBaseServiceContext serviceContext
transaction
protected transient org.nuiton.topia.TopiaContext transaction
EchoBaseActionSupport
public EchoBaseActionSupport()
getEchoBaseApplicationContext
public static EchoBaseApplicationContext getEchoBaseApplicationContext()
getConfiguration
protected EchoBaseConfiguration getConfiguration()
getEchoBaseSession
public EchoBaseSession getEchoBaseSession()
isAdmin
public boolean isAdmin()
getApplicationVersion
public static String getApplicationVersion()
getServiceContext
protected EchoBaseServiceContext getServiceContext()
- Fabrique pour récupérer le ServiceContext tel qu'il devrait être fourni
à la fabrication d'un service.
- Returns:
- service context
getServiceFactory
public EchoBaseServiceFactory getServiceFactory()
newService
public <E extends EchoBaseService> E newService(Class<E> serviceClass)
- Sub-classes should use this method to easily get a service instance.
- Parameters:
serviceClass - The type of service to instantiate
- Returns:
- A newly created service of the expected type with necessary data set
getTransaction
public org.nuiton.topia.TopiaContext getTransaction()
- Specified by:
getTransaction in interface org.nuiton.topia.framework.TopiaTransactionAware
setTransaction
public void setTransaction(org.nuiton.topia.TopiaContext transaction)
- Specified by:
setTransaction in interface org.nuiton.topia.framework.TopiaTransactionAware
formatDate
public String formatDate(Date date)
formatMonth
public String formatMonth(Date date)
sortAndDecorate
public <E extends org.nuiton.topia.persistence.TopiaEntity> Map<String,String> sortAndDecorate(Collection<E> beans,
String context)
decorate
public String decorate(Object o,
String context)
getDateFormat
protected SimpleDateFormat getDateFormat()
getMonthFormat
protected SimpleDateFormat getMonthFormat()
getDecoratorService
protected DecoratorService getDecoratorService()
getActionContext
protected static com.opensymphony.xwork2.ActionContext getActionContext()
copyFile
protected void copyFile(InputFile inputFile,
File dataDirectory)
throws IOException
- Throws:
IOException
decorateEnums
protected <E extends Enum<E> & I18nAble> Map<String,String> decorateEnums(E... enumValues)
Copyright © 2011-2012 Ifremer. All Rights Reserved.