org.chorem.pollen.ui.actions
Class PollenActionSupport
java.lang.Object
com.opensymphony.xwork2.ActionSupport
org.nuiton.web.struts2.BaseAction
org.chorem.pollen.ui.actions.PollenActionSupport
- 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:
- AbstractDisplayChoice, AbstractJSONPaginedAction, AbstractPollForm, AbstractPollUriIdAction, Confirm, Confirm, CreatedList, DeleteFavoriteList, DeletePollAccount, DeleteUser, DisplayPersonToList, DisplayVotingList, Edit, GenerateChart, GetFavoriteList, GetFavoriteListPollAccount, GetPollFeed, GetPollImageChoice, GetUser, ImportPersonListToVotingList, InvitedList, Login, Logout, LostPassword, ManageFavoriteList, ManageFavoriteLists, ManagePolls, ManageUsers, ParticipatedList, Register, SelectPersonListToVotingList, Show
public class PollenActionSupport
- extends org.nuiton.web.struts2.BaseAction
- implements org.nuiton.topia.framework.TopiaTransactionAware
Pollen 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:
- 1.3
- 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 |
serviceFactory
protected transient org.chorem.pollen.services.PollenServiceFactory serviceFactory
- Provides a way to get a service.
Actions may not call it directly by use
newService(Class) instead.
serviceContext
protected transient org.chorem.pollen.services.PollenServiceContext serviceContext
transaction
protected transient org.nuiton.topia.TopiaContext transaction
SAFE_LANGUAGES
public static final List<String> SAFE_LANGUAGES
PollenActionSupport
public PollenActionSupport()
getPollenApplicationContext
public static PollenApplicationContext getPollenApplicationContext()
getConfiguration
public org.chorem.pollen.PollenConfiguration getConfiguration()
getSkin
public PageSkin getSkin()
getPageLogo
public String getPageLogo()
getJqueryTheme
public String getJqueryTheme()
getPollenSession
public PollenSession getPollenSession()
getPollenUserAccount
public org.chorem.pollen.business.persistence.UserAccount getPollenUserAccount()
isUserLoggued
public boolean isUserLoggued()
isUserAdmin
public boolean isUserAdmin()
getApplicationVersion
public static String getApplicationVersion()
getApplicationUrl
public URL getApplicationUrl()
getServiceContext
protected org.chorem.pollen.services.PollenServiceContext getServiceContext()
- Fabrique pour récupérer le ServiceContext tel qu'il devrait être fourni
à la fabrication d'un service.
- Returns:
- service context
getServiceFactory
public org.chorem.pollen.services.PollenServiceFactory getServiceFactory()
newService
public <E extends org.chorem.pollen.services.PollenService> 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
getSafeLanguage
public String getSafeLanguage()
getActionContext
protected static com.opensymphony.xwork2.ActionContext getActionContext()
getCurrentDateTime
public static Date getCurrentDateTime()
getVoteCountingTypeHelp
public String getVoteCountingTypeHelp(org.chorem.pollen.common.VoteCountingType voteCountingType)
getCurrentUrl
public String getCurrentUrl()
addFlashMessage
public void addFlashMessage(String message)
addFlashError
public void addFlashError(String message)
getFlashMessages
public Collection<String> getFlashMessages()
getFlashErrors
public Collection<String> getFlashErrors()
hasFlashMessages
public boolean hasFlashMessages()
hasFlashErrors
public boolean hasFlashErrors()
clearFlashMessages
public void clearFlashMessages()
clearFlashErrors
public void clearFlashErrors()
hasAnyErrors
public boolean hasAnyErrors()
Copyright © 2009-2012 CodeLutin. All Rights Reserved.