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
Action which saves the user preferences values into the database.
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerprotected ObservationManager
The observation manager.protected SiteManager
The site managerFields 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
-
Method Summary
Modifier and TypeMethodDescriptionact
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) getContextVars
(Request request) Get the preferences context variables.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 Details
-
_observationManager
The observation manager. -
_siteManager
The site manager -
_currentUserProvider
The current user provider
-
-
Constructor Details
-
SetFOUserPreferencesAction
public SetFOUserPreferencesAction()
-
-
Method Details
-
service
- 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
Notify observers that user preferences has changed- Parameters:
siteName
- The site namecontext
- The user's preferences context
-
getPreferenceIds
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
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.
-