Class SearchComponentArguments
- java.lang.Object
-
- org.ametys.web.frontoffice.search.requesttime.SearchComponentArguments
-
public class SearchComponentArguments extends Object
Wrapper of arguments passed toSearchComponent#execute
-
-
Field Summary
Fields Modifier and Type Field Description private ContentHandler
_contentHandler
private String
_currentLang
private Page
_currentPage
private Site
_currentSite
private SearchServiceDebugModeHelper.DebugMode
_debugMode
private Parameters
_generatorParameters
private boolean
_launchSearch
private org.slf4j.Logger
_logger
private Pagination
_pagination
private Request
_request
private Response
_response
private SearchResults<AmetysObject>
_results
private SearcherFactory.Searcher
_searcher
private SearchService
_service
private SearchServiceInstance
_serviceInstance
private SearchUserInputs
_userInputs
-
Constructor Summary
Constructors Modifier Constructor Description 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, org.slf4j.Logger logger, SearchServiceDebugModeHelper.DebugMode debugMode)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentHandler
contentHandler()
Gets the content handlerString
currentLang()
Gets the current langPage
currentPage()
Gets the current pageSite
currentSite()
Gets the current siteOptional<SearchServiceDebugModeHelper.DebugMode>
debugMode()
Gets the debug modeParameters
generatorParameters()
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
launchSearch()
Returnstrue
if the search has to be launchorg.slf4j.Logger
logger()
Gets the loggerPagination
pagination()
Gets the paginationRequest
request()
Gets the current requestResponse
response()
Gets the responseOptional<SearchResults<AmetysObject>>
results()
Gets the results of the search.SearcherFactory.Searcher
searcher()
Gets the searcherSearchService
service()
Gets the search serviceSearchServiceInstance
serviceInstance()
Gets the search service instancevoid
setResults(SearchResults<AmetysObject> results)
Sets the resultsSearchUserInputs
userInputs()
Gets the user inputs
-
-
-
Field Detail
-
_contentHandler
private ContentHandler _contentHandler
-
_generatorParameters
private Parameters _generatorParameters
-
_serviceInstance
private SearchServiceInstance _serviceInstance
-
_service
private SearchService _service
-
_userInputs
private SearchUserInputs _userInputs
-
_pagination
private Pagination _pagination
-
_currentSite
private Site _currentSite
-
_currentPage
private Page _currentPage
-
_currentLang
private String _currentLang
-
_launchSearch
private boolean _launchSearch
-
_results
private SearchResults<AmetysObject> _results
-
_searcher
private SearcherFactory.Searcher _searcher
-
_logger
private org.slf4j.Logger _logger
-
_debugMode
private SearchServiceDebugModeHelper.DebugMode _debugMode
-
-
Constructor Detail
-
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, org.slf4j.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 Detail
-
contentHandler
public ContentHandler contentHandler()
Gets the content handler- Returns:
- the content handler
-
generatorParameters
public Parameters 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
public SearchServiceInstance serviceInstance()
Gets the search service instance- Returns:
- the search service instance
-
service
public SearchService service()
Gets the search service- Returns:
- the search service
-
userInputs
public SearchUserInputs userInputs()
Gets the user inputs- Returns:
- the user inputs
-
pagination
public Pagination pagination()
Gets the pagination- Returns:
- the pagination
-
currentSite
public Site currentSite()
Gets the current site- Returns:
- the current site
-
currentPage
public Page currentPage()
Gets the current page- Returns:
- the current page
-
currentLang
public String currentLang()
Gets the current lang- Returns:
- the current lang
-
launchSearch
public boolean launchSearch()
Returnstrue
if the search has to be launch- Returns:
true
if the search has to be launch
-
setResults
public void setResults(SearchResults<AmetysObject> results)
Sets the results- Parameters:
results
- the results
-
results
public Optional<SearchResults<AmetysObject>> 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
-
searcher
public SearcherFactory.Searcher searcher()
Gets the searcher- Returns:
- the searcher
-
logger
public org.slf4j.Logger logger()
Gets the logger- Returns:
- the logger
-
isDebug
public boolean isDebug()
Returnstrue
if debug is activated- Returns:
true
if debug is activated
-
debugMode
public Optional<SearchServiceDebugModeHelper.DebugMode> debugMode()
Gets the debug mode- Returns:
- the debug mode
-
-