public class OdfOrgunitRestrictionRule extends Object implements OdfRestrictionRule
OdfRestrictionRule
restricts ODF to a orgunit and their child orgunitsModifier and Type | Field and Description |
---|---|
private RootOrgUnitProvider |
_ouProvider |
private String |
_rootOrgUnitId |
Constructor and Description |
---|
OdfOrgunitRestrictionRule(RootOrgUnitProvider ouProvider,
String orgUnitId)
Constructor for ODF rule restriction on a orgunit
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Program program)
Determines if this program is part of this restriction
|
Expression |
getExpression()
Translate the restriction into an expression that can be used for repository query.
|
boolean |
hasOrgunitRestrictions()
Indicate if this restriction is related to orgunit
|
private final RootOrgUnitProvider _ouProvider
private final String _rootOrgUnitId
public OdfOrgunitRestrictionRule(RootOrgUnitProvider ouProvider, String orgUnitId)
ouProvider
- The orgunits providerorgUnitId
- The id of orgunitpublic Expression getExpression()
OdfRestrictionRule
getExpression
in interface OdfRestrictionRule
public boolean contains(Program program)
OdfRestrictionRule
contains
in interface OdfRestrictionRule
program
- The programtrue
If the program is part of this restrictionpublic boolean hasOrgunitRestrictions()
OdfRestrictionRule
hasOrgunitRestrictions
in interface OdfRestrictionRule