Class SearchComponentArguments

java.lang.Object
org.ametys.web.frontoffice.search.requesttime.SearchComponentArguments

public class SearchComponentArguments extends Object
Wrapper of arguments passed to SearchComponent#execute
  • 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, org.slf4j.Logger logger, SearchServiceDebugModeHelper.DebugMode debugMode)
      Constructor
      Parameters:
      contentHandler - the content handler
      generatorParameters - the parameters of the generator
      serviceInstance - the search service instance
      service - the search service
      userInputs - the user inputs
      request - the current request
      response - the response
      pagination - the pagination
      currentSite - the current site
      currentPage - the current page
      currentLang - the current lang
      launchSearch - true if the search has to be launch
      searcher - the searcher
      logger - the logger
      debugMode - 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

      public void updateUserInputs(SearchUserInputs userInputs)
      Update the user inputs
      Parameters:
      userInputs - the user inputs
    • request

      public Request request()
      Gets the current request
      Returns:
      the current request
    • response

      public Response response()
      Gets the response
      Returns:
      the response
    • 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()
      Returns true 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

      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

      public void setEnumeratedResults(SearchResults<AmetysObject> enumeratedResults)
      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 is false
      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

      public org.slf4j.Logger logger()
      Gets the logger
      Returns:
      the logger
    • isDebug

      public boolean isDebug()
      Returns true if debug is activated
      Returns:
      true if debug is activated
    • debugMode

      Gets the debug mode
      Returns:
      the debug mode