Class FacetSearchComponent
- java.lang.Object
-
- org.ametys.web.frontoffice.search.requesttime.impl.FacetSearchComponent
-
- All Implemented Interfaces:
SearchComponent
public class FacetSearchComponent extends Object implements SearchComponent
SearchComponentfor executing the search with facets.
-
-
Field Summary
-
Fields inherited from interface org.ametys.web.frontoffice.search.requesttime.SearchComponent
DISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description FacetSearchComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckValidInputs(Collection<FacetDefinition> serviceFacets, Map<String,List<String>> userFacets)Checks the user inputs are validvoidexecute(SearchComponentArguments args)Executes the component.intpriority()Get the priority of the component.booleansupports(SearchComponentArguments args)Returnstrueif the component must beexecuted.
-
-
-
Constructor Detail
-
FacetSearchComponent
public FacetSearchComponent()
-
-
Method Detail
-
priority
public int priority()
Description copied from interface:SearchComponentGet the priority of the component. The lowest one will be executed first, and so on.- Specified by:
priorityin interfaceSearchComponent- Returns:
- the priority of the component
-
supports
public boolean supports(SearchComponentArguments args)
Description copied from interface:SearchComponentReturnstrueif the component must beexecuted.- Specified by:
supportsin interfaceSearchComponent- Parameters:
args- the arguments- Returns:
trueif the component must beexecuted.
-
execute
public void execute(SearchComponentArguments args) throws Exception
Description copied from interface:SearchComponentExecutes the component.- Specified by:
executein interfaceSearchComponent- Parameters:
args- the arguments- Throws:
Exception- if an exception occurs. Other search components will be attempted to be executed
-
checkValidInputs
protected void checkValidInputs(Collection<FacetDefinition> serviceFacets, Map<String,List<String>> userFacets) throws org.ametys.web.frontoffice.search.requesttime.impl.InvalidUserInputException
Checks the user inputs are valid- Parameters:
serviceFacets- The facets of the service instanceuserFacets- The user input facets- Throws:
org.ametys.web.frontoffice.search.requesttime.impl.InvalidUserInputException- if at least user one input is invalid
-
-