Class SearchUserInputsRetriever
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.frontoffice.search.requesttime.input.SearchUserInputsRetriever
-
- All Implemented Interfaces:
LogEnabled,Component,Serviceable
public class SearchUserInputsRetriever extends AbstractLogEnabled implements Component, Serviceable
TheSearchUserInputsretriever.
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider_currentUserProviderThe current user providerprotected JSONUtils_jsonUtilsThe JSON utilsprotected UserPreferencesManager_userPrefsManagerThe user preferences managerstatic StringROLEThe avalon role
-
Constructor Summary
Constructors Constructor Description SearchUserInputsRetriever()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SearchUserInputs_getCurrentSearchUserInputs(String serviceId)Get the current search user inputs for the given service.SearchUserInputsgetUserInputs(Request request, boolean isFormSubmitted, SearchServiceInstance serviceInstance)Get the user inputs.voidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
_userPrefsManager
protected UserPreferencesManager _userPrefsManager
The user preferences manager
-
_jsonUtils
protected JSONUtils _jsonUtils
The JSON utils
-
-
Constructor Detail
-
SearchUserInputsRetriever
public SearchUserInputsRetriever()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getUserInputs
public SearchUserInputs getUserInputs(Request request, boolean isFormSubmitted, SearchServiceInstance serviceInstance)
Get the user inputs. Implementation depends on the search parameters.- Parameters:
request- The requestisFormSubmitted-trueif the form has been submittedserviceInstance- The search service instance- Returns:
- The search user inputs (criteria, facets, sorts)
-
_getCurrentSearchUserInputs
protected SearchUserInputs _getCurrentSearchUserInputs(String serviceId)
Get the current search user inputs for the given service.- Parameters:
serviceId- The service ID- Returns:
- A
SearchUserInputsobject if the user is authenticated and have saved filters for this service. Otherwise, it returnsnull.
-
-