Class OdfProgramRestriction
java.lang.Object
org.ametys.plugins.odfweb.restrictions.OdfProgramRestriction
A restriction on the ODF programs of a site.
-
Constructor Summary
ConstructorDescriptionOdfProgramRestriction
(String id, I18nizableText label, List<OdfRestrictionRule> rules) Odf restriction constructorOdfProgramRestriction
(String id, I18nizableText label, OdfRestrictionRule rule) Odf restriction constructor -
Method Summary
-
Constructor Details
-
OdfProgramRestriction
Odf restriction constructor- Parameters:
id
- Unique id of the restrictionlabel
- The restriction labelrule
- The rule of this restriction
-
OdfProgramRestriction
Odf restriction constructor- Parameters:
id
- Unique id of the restrictionlabel
- The restriction labelrules
- The set of rule of this restriction
-
-
Method Details
-
getId
Id getter- Returns:
- The id
-
getLabel
Label getter- Returns:
- The label
-
contains
Determines if the current restriction contains the program- Parameters:
program
- The program to check- Returns:
true
if the program is part of the restrictions
-
getExpression
Translate the restriction into an expression that can be used for repository query.- Returns:
- The restriction expression
-
hasOrgunitRestrictions
Indicate if this restriction is related to orgunit- Returns:
- true if it is the case
-