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
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe current user providerprotected ObservationManagerThe observation manager.protected SiteManagerThe site managerFields inherited from class org.ametys.plugins.core.userpref.SetUserPreferencesAction
_disableConditionsEvaluator, _userPrefEP, _userPrefManagerFields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP -
Constructor Summary
Constructors -
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 voidnotifyUserPrefChanged(String siteName, String context) Notify observers that user preferences has changedvoidservice(ServiceManager serviceManager) Methods inherited from class org.ametys.plugins.core.userpref.SetUserPreferencesAction
_getTypedValues, _preValidateRawValues, _valuesToString, getStorageContext, getUser, setUserPreferences, setUserPreferencesMethods inherited from class org.ametys.core.util.cocoon.AbstractCurrentUserProviderServiceableAction
_getCurrentUserMethods 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:
servicein interfaceServiceable- Overrides:
servicein classSetUserPreferencesAction- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Specified by:
actin interfaceAction- Overrides:
actin 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:SetUserPreferencesActionGet the preferences to set.- Overrides:
getPreferenceIdsin classSetUserPreferencesAction- Parameters:
request- the request.parentContext- the parent context.- Returns:
- a collection of the IDs of preferences to set.
-
getContextVars
Description copied from class:SetUserPreferencesActionGet the preferences context variables.- Overrides:
getContextVarsin classSetUserPreferencesAction- Parameters:
request- the request.- Returns:
- the preferences context as a Map.
-