Class SaveUserPrefsSearchComponent
- java.lang.Object
-
- org.ametys.web.frontoffice.search.requesttime.impl.SaveUserPrefsSearchComponent
-
- All Implemented Interfaces:
SearchComponent
,Serviceable
public class SaveUserPrefsSearchComponent extends Object implements SearchComponent, Serviceable
SearchComponent
to save the selected user filters in the user preferences if the user is authenticated.
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider
_currentUserProvider
The current user providerprotected JSONUtils
_jsonUtils
The JSON utilsprotected UserPreferencesManager
_userPrefsManager
The user preferences manager-
Fields inherited from interface org.ametys.web.frontoffice.search.requesttime.SearchComponent
DISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description SaveUserPrefsSearchComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(SearchComponentArguments args)
Executes the component.int
priority()
Get the priority of the component.void
service(ServiceManager manager)
boolean
supports(SearchComponentArguments args)
Returnstrue
if the component must beexecuted
.
-
-
-
Field Detail
-
_jsonUtils
protected JSONUtils _jsonUtils
The JSON utils
-
_userPrefsManager
protected UserPreferencesManager _userPrefsManager
The user preferences manager
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
-
Constructor Detail
-
SaveUserPrefsSearchComponent
public SaveUserPrefsSearchComponent()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
priority
public int priority()
Description copied from interface:SearchComponent
Get the priority of the component. The lowest one will be executed first, and so on.- Specified by:
priority
in interfaceSearchComponent
- Returns:
- the priority of the component
-
supports
public boolean supports(SearchComponentArguments args)
Description copied from interface:SearchComponent
Returnstrue
if the component must beexecuted
.- Specified by:
supports
in interfaceSearchComponent
- Parameters:
args
- the arguments- Returns:
true
if the component must beexecuted
.
-
execute
public void execute(SearchComponentArguments args) throws Exception
Description copied from interface:SearchComponent
Executes the component.- Specified by:
execute
in interfaceSearchComponent
- Parameters:
args
- the arguments- Throws:
Exception
- if an exception occurs. Other search components will be attempted to be executed
-
-