Class CmsRestrictionRule
java.lang.Object
org.opencms.jsp.search.config.parser.simplesearch.preconfiguredrestrictions.CmsRestrictionRule
A single restriction rule, telling for which field and type what kind of restriction should be enforced.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Match type of the restriction, i.e., how the values should be treated. -
Constructor Summary
ConstructorsConstructorDescriptionCmsRestrictionRule
(String field) Constructs a restriction rule for the provided field that has no type restriction and default combination mode and match type.CmsRestrictionRule
(String field, String type, CmsRestrictionRule.MatchType matchType, CmsConfigurationBean.CombinationMode combinationModeBetweenFields, CmsConfigurationBean.CombinationMode combinationModeInField) Constructs restriction rule with the provided settings. -
Method Summary
Modifier and TypeMethodDescriptionReturns the way values of different input fields are combined (match any or all).Returns the way values of different input fields are combined (match any or all).Returns the name of the solr field, the restrictions should be enforced on for, dependent on the provided locale.Returns the match type for values, e.g., exact, as-is, prefix, ....Returns the name of the solr field, the restrictions should be enforced on, but without resolving the locale placeholder.getType()
Returns the name of the resource type, the restriction should be enforced for.
-
Constructor Details
-
CmsRestrictionRule
Constructs a restriction rule for the provided field that has no type restriction and default combination mode and match type.- Parameters:
field
- the field to put the restriction on.
-
CmsRestrictionRule
public CmsRestrictionRule(String field, String type, CmsRestrictionRule.MatchType matchType, CmsConfigurationBean.CombinationMode combinationModeBetweenFields, CmsConfigurationBean.CombinationMode combinationModeInField) Constructs restriction rule with the provided settings.- Parameters:
field
- the field the restriction has to be enforced on.type
- the resource type the restriction should be enforced on.matchType
- the way how values should be treated.combinationModeBetweenFields
- the way how values in different fields should be combined.combinationModeInField
- the way how values in different fields in one field should be combined.
-
-
Method Details
-
getCombinationModeBetweenFields
Returns the way values of different input fields are combined (match any or all).- Returns:
- the way values of different input fields are combined (match any or all).
-
getCombinationModeInField
Returns the way values of different input fields are combined (match any or all).- Returns:
- the way values of different input fields are combined (match any or all).
-
getFieldForLocale
Returns the name of the solr field, the restrictions should be enforced on for, dependent on the provided locale.- Parameters:
l
- the search locale.- Returns:
- the name of the solr field, the restrictions should be enforced on for, dependent on the provided locale.
-
getMatchType
Returns the match type for values, e.g., exact, as-is, prefix, ....- Returns:
- the match type for values, e.g., exact, as-is, prefix, ....
-
getRawField
Returns the name of the solr field, the restrictions should be enforced on, but without resolving the locale placeholder.- Returns:
- the name of the solr field, the restrictions should be enforced on, but without resolving the locale placeholder.
-
getType
Returns the name of the resource type, the restriction should be enforced for.- Returns:
- the resource type, the restriction should be enforced for.
null
is returned iff the restriction should hold for all resource types.
-