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
The
SearchUserInputs retriever.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe current user providerprotected JSONUtilsThe JSON utilsprotected UserPreferencesManagerThe user preferences managerstatic final StringThe avalon role -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SearchUserInputs_getCurrentSearchUserInputs(String serviceId) Get the current search user inputs for the given service.getUserInputs(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 Details
-
ROLE
The avalon role -
_currentUserProvider
The current user provider -
_userPrefsManager
The user preferences manager -
_jsonUtils
The JSON utils
-
-
Constructor Details
-
SearchUserInputsRetriever
public SearchUserInputsRetriever()
-
-
Method Details
-
service
- 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
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.
-