Class SearchComponentArguments
java.lang.Object
org.ametys.web.frontoffice.search.requesttime.SearchComponentArguments
Wrapper of arguments passed to
SearchComponent#execute
-
Constructor Summary
ModifierConstructorDescriptionprotected
SearchComponentArguments
(ContentHandler contentHandler, Parameters generatorParameters, SearchServiceInstance serviceInstance, SearchService service, SearchUserInputs userInputs, Request request, Response response, Pagination pagination, Site currentSite, Page currentPage, String currentLang, boolean launchSearch, SearcherFactory.Searcher searcher, Logger logger, SearchServiceDebugModeHelper.DebugMode debugMode) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the content handlerGets the current langGets the current pageGets the current siteGets the debug modeGets the enumerated results of the search.Gets the parameters of the generator, allowing to change some behaviors depending on the URL the request comes fromboolean
isDebug()
Returnstrue
if debug is activatedboolean
Returnstrue
if the search has to be launchlogger()
Gets the loggerGets the paginationrequest()
Gets the current requestresponse()
Gets the responseresults()
Gets the results of the search.searcher()
Gets the searcherservice()
Gets the search serviceGets the search service instancevoid
setEnumeratedResults
(SearchResults<AmetysObject> enumeratedResults) Sets the enumerated resultsvoid
setResults
(SearchResults<AmetysObject> results) Sets the resultsvoid
updateUserInputs
(SearchUserInputs userInputs) Update the user inputsGets the user inputs
-
Constructor Details
-
SearchComponentArguments
protected SearchComponentArguments(ContentHandler contentHandler, Parameters generatorParameters, SearchServiceInstance serviceInstance, SearchService service, SearchUserInputs userInputs, Request request, Response response, Pagination pagination, Site currentSite, Page currentPage, String currentLang, boolean launchSearch, SearcherFactory.Searcher searcher, Logger logger, SearchServiceDebugModeHelper.DebugMode debugMode) Constructor- Parameters:
contentHandler
- the content handlergeneratorParameters
- the parameters of the generatorserviceInstance
- the search service instanceservice
- the search serviceuserInputs
- the user inputsrequest
- the current requestresponse
- the responsepagination
- the paginationcurrentSite
- the current sitecurrentPage
- the current pagecurrentLang
- the current langlaunchSearch
-true
if the search has to be launchsearcher
- the searcherlogger
- the loggerdebugMode
- the debug mode. Can be null
-
-
Method Details
-
contentHandler
Gets the content handler- Returns:
- the content handler
-
generatorParameters
Gets the parameters of the generator, allowing to change some behaviors depending on the URL the request comes from- Returns:
- the parameters of the generator
-
serviceInstance
Gets the search service instance- Returns:
- the search service instance
-
service
Gets the search service- Returns:
- the search service
-
userInputs
Gets the user inputs- Returns:
- the user inputs
-
updateUserInputs
Update the user inputs- Parameters:
userInputs
- the user inputs
-
request
Gets the current request- Returns:
- the current request
-
response
Gets the response- Returns:
- the response
-
pagination
Gets the pagination- Returns:
- the pagination
-
currentSite
Gets the current site- Returns:
- the current site
-
currentPage
Gets the current page- Returns:
- the current page
-
currentLang
Gets the current lang- Returns:
- the current lang
-
launchSearch
Returnstrue
if the search has to be launch- Returns:
true
if the search has to be launch
-
setResults
Sets the results- Parameters:
results
- the results
-
results
Gets the results of the search. Can be empty if search has not been executed yet- Returns:
- the results of the search, or an empty optional if search has not been executed yet
-
setEnumeratedResults
Sets the enumerated results- Parameters:
enumeratedResults
- the enumerated results
-
enumeratedResults
Gets the enumerated results of the search. Can be empty if enumerated search has not been executed yet or computeCriteriaCounts parameter isfalse
- Returns:
- the enumerated results of the search, or an empty optional if enumerated search has not been executed yet or computeCriteriaCounts parameter is
false
-
searcher
Gets the searcher- Returns:
- the searcher
-
logger
Gets the logger- Returns:
- the logger
-
isDebug
Returnstrue
if debug is activated- Returns:
true
if debug is activated
-
debugMode
Gets the debug mode- Returns:
- the debug mode
-