Class OdfProgramRestriction
- java.lang.Object
-
- org.ametys.plugins.odfweb.restrictions.OdfProgramRestriction
-
public class OdfProgramRestriction extends Object
A restriction on the ODF programs of a site.
-
-
Constructor Summary
Constructors Constructor Description OdfProgramRestriction(String id, I18nizableText label, List<OdfRestrictionRule> rules)
Odf restriction constructorOdfProgramRestriction(String id, I18nizableText label, OdfRestrictionRule rule)
Odf restriction constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(Program program)
Determines if the current restriction contains the programExpression
getExpression()
Translate the restriction into an expression that can be used for repository query.String
getId()
Id getterI18nizableText
getLabel()
Label getterboolean
hasOrgunitRestrictions()
Indicate if this restriction is related to orgunit
-
-
-
Constructor Detail
-
OdfProgramRestriction
public OdfProgramRestriction(String id, I18nizableText label, OdfRestrictionRule rule)
Odf restriction constructor- Parameters:
id
- Unique id of the restrictionlabel
- The restriction labelrule
- The rule of this restriction
-
OdfProgramRestriction
public OdfProgramRestriction(String id, I18nizableText label, List<OdfRestrictionRule> rules)
Odf restriction constructor- Parameters:
id
- Unique id of the restrictionlabel
- The restriction labelrules
- The set of rule of this restriction
-
-
Method Detail
-
getLabel
public I18nizableText getLabel()
Label getter- Returns:
- The label
-
contains
public boolean contains(Program program)
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
public Expression getExpression()
Translate the restriction into an expression that can be used for repository query.- Returns:
- The restriction expression
-
hasOrgunitRestrictions
public boolean hasOrgunitRestrictions()
Indicate if this restriction is related to orgunit- Returns:
- true if it is the case
-
-