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
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerprotected JSONUtils
The JSON utilsprotected UserPreferencesManager
The user preferences managerstatic final String
The avalon role -
Constructor Summary
-
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.void
service
(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:
service
in 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
-true
if 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
SearchUserInputs
object if the user is authenticated and have saved filters for this service. Otherwise, it returnsnull
.
-