Package org.ametys.web.userpref
Class SetFOUserPreferencesAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.core.util.cocoon.AbstractCurrentUserProviderServiceableAction
-
- org.ametys.plugins.core.userpref.SetUserPreferencesAction
-
- org.ametys.web.userpref.SetFOUserPreferencesAction
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,ThreadSafe
,Action
public class SetFOUserPreferencesAction extends SetUserPreferencesAction
Action which saves the user preferences values into the database.
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider
_currentUserProvider
The current user providerprotected ObservationManager
_observationManager
The observation manager.protected SiteManager
_siteManager
The site manager-
Fields inherited from class org.ametys.plugins.core.userpref.SetUserPreferencesAction
_INPUT_DATE_FORMATS, _userPrefEP, _userPrefManager
-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description SetFOUserPreferencesAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map
act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
protected Map<String,String>
getContextVars(Request request)
Get the preferences context variables.protected List<String>
getPreferenceIds(Request request, Map<String,Object> parentContext)
Get the preferences to set.protected void
notifyUserPrefChanged(String siteName, String context)
Notify observers that user preferences has changedvoid
service(ServiceManager serviceManager)
-
Methods inherited from class org.ametys.plugins.core.userpref.SetUserPreferencesAction
_getValues, _parseDate, getStorageContext, getUser, setUserPreferences, setUserPreferences
-
Methods inherited from class org.ametys.core.util.cocoon.AbstractCurrentUserProviderServiceableAction
_getCurrentUser
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_observationManager
protected ObservationManager _observationManager
The observation manager.
-
_siteManager
protected SiteManager _siteManager
The site manager
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
-
Constructor Detail
-
SetFOUserPreferencesAction
public SetFOUserPreferencesAction()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classSetUserPreferencesAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
- Specified by:
act
in interfaceAction
- Overrides:
act
in classSetUserPreferencesAction
- Throws:
Exception
-
notifyUserPrefChanged
protected void notifyUserPrefChanged(String siteName, String context)
Notify observers that user preferences has changed- Parameters:
siteName
- The site namecontext
- The user's preferences context
-
getPreferenceIds
protected List<String> getPreferenceIds(Request request, Map<String,Object> parentContext)
Description copied from class:SetUserPreferencesAction
Get the preferences to set.- Overrides:
getPreferenceIds
in classSetUserPreferencesAction
- Parameters:
request
- the request.parentContext
- the parent context.- Returns:
- a collection of the IDs of preferences to set.
-
getContextVars
protected Map<String,String> getContextVars(Request request)
Description copied from class:SetUserPreferencesAction
Get the preferences context variables.- Overrides:
getContextVars
in classSetUserPreferencesAction
- Parameters:
request
- the request.- Returns:
- the preferences context as a Map.
-
-