Class SaveUserPrefsSearchComponent
java.lang.Object
org.ametys.plugins.calendar.search.SaveUserPrefsSearchComponent
- All Implemented Interfaces:
SearchComponent,Serviceable
SearchComponent to save the selected user calendar's filters in the user preferences if the user is authenticated.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe current user providerprotected JSONUtilsThe JSON utilsprotected UserPreferencesManagerThe user preferences managerFields inherited from interface org.ametys.web.frontoffice.search.requesttime.SearchComponent
DISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidExecutes the component.intpriority()Get the priority of the component.voidservice(ServiceManager manager) booleanReturnstrueif the component must beexecuted.
-
Field Details
-
_jsonUtils
The JSON utils -
_userPrefsManager
The user preferences manager -
_currentUserProvider
The current user provider
-
-
Constructor Details
-
SaveUserPrefsSearchComponent
public SaveUserPrefsSearchComponent()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
priority
Description copied from interface:SearchComponentGet the priority of the component. The lowest one will be executed first, and so on.- Specified by:
priorityin interfaceSearchComponent- Returns:
- the priority of the component
-
supports
Description copied from interface:SearchComponentReturnstrueif the component must beexecuted.- Specified by:
supportsin interfaceSearchComponent- Parameters:
args- the arguments- Returns:
trueif the component must beexecuted.
-
execute
Description copied from interface:SearchComponentExecutes the component.- Specified by:
executein interfaceSearchComponent- Parameters:
args- the arguments- Throws:
Exception- if an exception occurs. Other search components will be attempted to be executed
-