Class FacetSearchComponent

All Implemented Interfaces:
LogEnabled, PluginAware, Prioritizable, Supporter<SearchComponentArguments>, SearchComponent

SearchComponent for executing the search with facets.
  • Constructor Details

  • Method Details

    • getPriority

      public int getPriority()
      Description copied from interface: Prioritizable
      Get the priority for the component. On components using Prioritizable interface, each implementation define the order. In most cases, less is the number, more prior is the component.
      Returns:
      the priority
    • supports

      public boolean supports(SearchComponentArguments args)
      Description copied from interface: Supporter
      Check if an element is supported
      Parameters:
      args - The element
      Returns:
      true if the element is supported, false otherwise
    • execute

      public void execute(SearchComponentArguments args) throws Exception
      Description copied from interface: SearchComponent
      Executes the component.
      Parameters:
      args - the arguments
      Throws:
      Exception - if an exception occurs. Other search components will be attempted to be executed
    • checkValidInputs

      protected Map<String,List<String>> checkValidInputs(Collection<SearchServiceFacetDefinition> serviceFacets, Map<String,List<String>> userFacets, boolean isFromUserPref, Logger logger) throws org.ametys.web.frontoffice.search.requesttime.impl.InvalidUserInputException
      Checks the user inputs are valid
      Parameters:
      serviceFacets - The facets of the service instance
      userFacets - The user input facets
      isFromUserPref - true if the facets are from user pref. Then return only the valid input, otherwise throw an exception
      logger - The logger
      Returns:
      the filtered user facets
      Throws:
      org.ametys.web.frontoffice.search.requesttime.impl.InvalidUserInputException - if at least user one input is invalid