Class FOSearchCriterion
java.lang.Object
org.ametys.web.frontoffice.search.instance.model.FOSearchCriterion
A FO search 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
ConstructorDescriptionFOSearchCriterion
(String id, SearchCriterionDefinition criterionDefinition, String operator, FOSearchCriterionMode mode, EnumeratedValues.RestrictedValues restrictedValues, Object staticValue) Creates a SearchCriterion for Front-Office search service -
Method Summary
-
Constructor Details
-
FOSearchCriterion
public FOSearchCriterion(String id, SearchCriterionDefinition criterionDefinition, String operator, FOSearchCriterionMode mode, EnumeratedValues.RestrictedValues restrictedValues, Object staticValue) Creates a SearchCriterion 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 isFOSearchCriterionMode.RESTRICTED_USER_INPUT
, must be empty otherwise.staticValue
- the static value. Must be non-empty if mode isFOSearchCriterionMode.STATIC
, must be empty otherwise.
-
-
Method Details
-
getId
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()
returnsFOSearchCriterionMode.RESTRICTED_USER_INPUT
, must be empty otherwise.- Returns:
- the restricted values
-
getStaticValue
Gets the static value. Must be non-empty ifgetMode()
returnsFOSearchCriterionMode.STATIC
, must be empty otherwise.- Returns:
- the static value
-
isMandatory
True if the criterion is linked to mandatory data- Returns:
true
if the criterion is linked to mandatory data
-