public class OdfOrgunitRestrictionRule extends Object implements OdfRestrictionRule
OdfRestrictionRule restricts ODF to a orgunit and their child orgunits| Modifier 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()
OdfRestrictionRulegetExpression in interface OdfRestrictionRulepublic boolean contains(Program program)
OdfRestrictionRulecontains in interface OdfRestrictionRuleprogram - The programtrue If the program is part of this restrictionpublic boolean hasOrgunitRestrictions()
OdfRestrictionRulehasOrgunitRestrictions in interface OdfRestrictionRule