Class SiteSearchCriterionDefinition
java.lang.Object
org.ametys.runtime.parameter.Parameter<MetadataType>
org.ametys.web.frontoffice.search.metamodel.impl.AbstractDefaultSearchCriterionDefinition
org.ametys.web.frontoffice.search.metamodel.impl.SiteSearchCriterionDefinition
- All Implemented Interfaces:
SearchCriterionDefinition
SearchCriterionDefinition
proposing a search criterion on the site of the indexed document.-
Constructor Summary
ConstructorDescriptionSiteSearchCriterionDefinition
(String id, String pluginName, I18nizableText label, SiteEnumerator siteEnumerator, SiteQueryHelper siteQueryHelper, Optional<Searchable> searchable) Default constructor -
Method Summary
Modifier and TypeMethodDescriptiongetEmptyValueQuery
(String language, Map<String, Object> contextualParameters) Gets the query for testing the value is emptygetQuery
(Object value, Query.Operator operator, String language, Map<String, Object> contextualParameters) Gets the query associated to the given valueMethods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractDefaultSearchCriterionDefinition
dispose, getEnumeratedValues, getSearchable, isEnumerated, isTooBigForStaticEnumerator, toJSON
Methods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.web.frontoffice.search.metamodel.SearchCriterionDefinition
getContextPrefixLabels, getId, getLabel, getType, getValidator, getWidget, getWidgetParameters
-
Constructor Details
-
SiteSearchCriterionDefinition
public SiteSearchCriterionDefinition(String id, String pluginName, I18nizableText label, SiteEnumerator siteEnumerator, SiteQueryHelper siteQueryHelper, Optional<Searchable> searchable) Default constructor- Parameters:
id
- The idpluginName
- The plugin namelabel
- The labelsiteEnumerator
- TheSiteEnumerator
siteQueryHelper
- TheSiteQueryHelper
searchable
- TheSearchable
-
-
Method Details
-
getQuery
public Query getQuery(Object value, Query.Operator operator, String language, Map<String, Object> contextualParameters) Description copied from interface:SearchCriterionDefinition
Gets the query associated to the given value- Parameters:
value
- the valueoperator
- the operatorlanguage
- The current search language.contextualParameters
- the search contextual parameters.- Returns:
- the query associated to the given value
-
getEmptyValueQuery
Description copied from interface:SearchCriterionDefinition
Gets the query for testing the value is empty- Parameters:
language
- The current search language.contextualParameters
- the search contextual parameters.- Returns:
- the query for testing the value is empty
-