Class SearchServiceCriterion<T>
java.lang.Object
org.ametys.web.frontoffice.search.instance.model.SearchServiceCriterion<T>
- Type Parameters:
T- Type of the criterion value
A search service criterion, representing a criterion valued by the webmaster when creating its
SearchServiceInstance,
i.e. a filled line in the 'Criterion' page (third page) on the creation/edition dialog box of a search service.-
Constructor Summary
ConstructorsConstructorDescriptionSearchServiceCriterion(String id, SearchServiceCriterionDefinition<T> criterionDefinition, String operator, SearchServiceCriterionMode mode, RestrictedEnumerator.RestrictedValues<T> restrictedValues, Object staticValue) Creates a criterion for Front-Office search service -
Method Summary
-
Constructor Details
-
SearchServiceCriterion
public SearchServiceCriterion(String id, SearchServiceCriterionDefinition<T> criterionDefinition, String operator, SearchServiceCriterionMode mode, RestrictedEnumerator.RestrictedValues<T> restrictedValues, Object staticValue) Creates a criterion for Front-Office search service- Parameters:
id- the id of the criterioncriterionDefinition- the definition of the criterionoperator- the operator (as string)mode- the moderestrictedValues- the restricted values. Must be non-empty if mode isSearchServiceCriterionMode.RESTRICTED_USER_INPUT, must be empty otherwise.staticValue- the static value. Must be non-empty if mode isSearchServiceCriterionMode.STATIC, must be empty otherwise.
-
-
Method Details
-
getName
Gets the id of the criterion- Returns:
- the id of the criterion
-
getCriterionDefinition
Gets the definition of the criterion- Returns:
- the definition of the criterion
-
getOperator
Gets the operator (as string)- Returns:
- the operator (as string)
-
getMode
Gets the mode- Returns:
- the mode
-
getRestrictedValues
Gets the restricted values. Must be non-empty ifgetMode()returnsSearchServiceCriterionMode.RESTRICTED_USER_INPUT, must be empty otherwise.- Returns:
- the restricted values
-
getStaticValue
Gets the static value. Must be non-empty ifgetMode()returnsSearchServiceCriterionMode.STATIC, must be empty otherwise.- Returns:
- the static value
-