Class FacetSearchComponent
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.frontoffice.search.requesttime.AbstractSearchComponent
org.ametys.web.frontoffice.search.requesttime.impl.FacetSearchComponent
- All Implemented Interfaces:
LogEnabled,PluginAware,Prioritizable,Supporter<SearchComponentArguments>,SearchComponent
SearchComponent for 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 -
Method Summary
Modifier and TypeMethodDescriptioncheckValidInputs(Collection<SearchServiceFacetDefinition> serviceFacets, Map<String, List<String>> userFacets, boolean isFromUserPref, org.slf4j.Logger logger) Checks the user inputs are validvoidExecutes the component.intGet the priority for the component.booleanCheck if an element is supportedMethods inherited from class org.ametys.web.frontoffice.search.requesttime.AbstractSearchComponent
getId, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
FacetSearchComponent
public FacetSearchComponent()
-
-
Method Details
-
getPriority
Description copied from interface:PrioritizableGet the priority for the component. On components usingPrioritizableinterface, each implementation define the order. In most cases, less is the number, more prior is the component.- Returns:
- the priority
-
supports
Description copied from interface:SupporterCheck if an element is supported- Parameters:
args- The element- Returns:
trueif the element is supported,falseotherwise
-
execute
Description copied from interface:SearchComponentExecutes 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, org.slf4j.Logger logger) throws org.ametys.web.frontoffice.search.requesttime.impl.InvalidUserInputExceptionChecks the user inputs are valid- Parameters:
serviceFacets- The facets of the service instanceuserFacets- The user input facetsisFromUserPref-trueif the facets are from user pref. Then return only the valid input, otherwise throw an exceptionlogger- The logger- Returns:
- the filtered user facets
- Throws:
org.ametys.web.frontoffice.search.requesttime.impl.InvalidUserInputException- if at least user one input is invalid
-