Class CmsRestrictionsBean
- java.lang.Object
-
- org.opencms.jsp.search.config.parser.simplesearch.preconfiguredrestrictions.CmsRestrictionsBean
-
public class CmsRestrictionsBean extends java.lang.Object
Wraps the preconfigured restrictions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsRestrictionsBean.FieldValues
The values in one input field.
-
Constructor Summary
Constructors Constructor Description CmsRestrictionsBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRestriction(java.lang.String ruleString, java.util.Collection<java.lang.String> values)
Add a preconfigured restriction.java.util.Map<CmsRestrictionRule,java.util.Collection<CmsRestrictionsBean.FieldValues>>
getRestrictionsForType(java.lang.String type)
Returns the restrictions for the provided type.boolean
hasRestrictionForType(java.lang.String type)
Returns a flag, indicating if there are restrictions for the provided type.boolean
hasRestrictions()
Returns a flag, indicating if there are restrictions at all.
-
-
-
Constructor Detail
-
CmsRestrictionsBean
public CmsRestrictionsBean()
-
-
Method Detail
-
addRestriction
public void addRestriction(java.lang.String ruleString, java.util.Collection<java.lang.String> values)
Add a preconfigured restriction.- Parameters:
ruleString
- the rule for the restriction.values
- the values for the restriction.
-
getRestrictionsForType
public java.util.Map<CmsRestrictionRule,java.util.Collection<CmsRestrictionsBean.FieldValues>> getRestrictionsForType(java.lang.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
public boolean hasRestrictionForType(java.lang.String type)
Returns a flag, indicating if there are restrictions for the provided type.- Parameters:
type
- the type to check.- Returns:
true
iff there are restrictions for the provided type,false.
-
hasRestrictions
public boolean hasRestrictions()
Returns a flag, indicating if there are restrictions at all.- Returns:
true
iff there are restrictions,false.
-
-