Class CmsRestrictionsBean
java.lang.Object
org.opencms.jsp.search.config.parser.simplesearch.preconfiguredrestrictions.CmsRestrictionsBean
Wraps the preconfigured restrictions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe values in one input field. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRestriction(String ruleString, Collection<String> values) Add a preconfigured restriction.getRestrictionsForType(String type) Returns the restrictions for the provided type.booleanhasRestrictionForType(String type) Returns a flag, indicating if there are restrictions for the provided type.booleanReturns a flag, indicating if there are restrictions at all.
-
Constructor Details
-
CmsRestrictionsBean
public CmsRestrictionsBean()
-
-
Method Details
-
addRestriction
Add a preconfigured restriction.- Parameters:
ruleString- the rule for the restriction.values- the values for the restriction.
-
getRestrictionsForType
public Map<CmsRestrictionRule,Collection<CmsRestrictionsBean.FieldValues>> getRestrictionsForType(String type) Returns the restrictions for the provided type.- Parameters:
type- the type to get the restrictions for.- Returns:
- the restrictions for the provided type.
-
hasRestrictionForType
Returns a flag, indicating if there are restrictions for the provided type.- Parameters:
type- the type to check.- Returns:
trueiff there are restrictions for the provided type,false.
-
hasRestrictions
Returns a flag, indicating if there are restrictions at all.- Returns:
trueiff there are restrictions,false.
-