public class OdfProgramRestriction extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
_id |
private I18nizableText |
_label |
private OdfRestrictionRule |
_rule |
| Constructor and Description |
|---|
OdfProgramRestriction(String id,
I18nizableText label,
List<OdfRestrictionRule> rules)
Odf restriction constructor
|
OdfProgramRestriction(String id,
I18nizableText label,
OdfRestrictionRule rule)
Odf restriction constructor
|
| Modifier and Type | Method and Description |
|---|---|
private static OdfRestrictionRule |
_extractMainRule(List<OdfRestrictionRule> rules) |
boolean |
contains(Program program)
Determines if the current restriction contains the program
|
Expression |
getExpression()
Translate the restriction into an expression that can be used for repository query.
|
String |
getId()
Id getter
|
I18nizableText |
getLabel()
Label getter
|
boolean |
hasOrgunitRestrictions()
Indicate if this restriction is related to orgunit
|
private final I18nizableText _label
private final OdfRestrictionRule _rule
public OdfProgramRestriction(String id, I18nizableText label, OdfRestrictionRule rule)
id - Unique id of the restrictionlabel - The restriction labelrule - The rule of this restrictionpublic OdfProgramRestriction(String id, I18nizableText label, List<OdfRestrictionRule> rules)
id - Unique id of the restrictionlabel - The restriction labelrules - The set of rule of this restrictionprivate static OdfRestrictionRule _extractMainRule(List<OdfRestrictionRule> rules)
public I18nizableText getLabel()
public boolean contains(Program program)
program - The program to checktrue if the program is part of the restrictionspublic Expression getExpression()
public boolean hasOrgunitRestrictions()