Class OdfOrgunitRestrictionRule
java.lang.Object
org.ametys.plugins.odfweb.restrictions.rules.OdfOrgunitRestrictionRule
- All Implemented Interfaces:
OdfRestrictionRule
This implementation of
OdfRestrictionRule restricts ODF to a orgunit and their child orgunits-
Constructor Summary
ConstructorsConstructorDescriptionOdfOrgunitRestrictionRule(RootOrgUnitProvider ouProvider, String orgUnitId) Constructor for ODF rule restriction on a orgunit -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if this program is part of this restrictionTranslate the restriction into an expression that can be used for repository query.getQuery()Translate the restriction into a Solr query that can be used for search.booleanIndicate if this restriction is related to orgunit
-
Constructor Details
-
OdfOrgunitRestrictionRule
Constructor for ODF rule restriction on a orgunit- Parameters:
ouProvider- The orgunits providerorgUnitId- The id of orgunit
-
-
Method Details
-
getExpression
Description copied from interface:OdfRestrictionRuleTranslate the restriction into an expression that can be used for repository query.- Specified by:
getExpressionin interfaceOdfRestrictionRule- Returns:
- The restriction expression
-
getQuery
Description copied from interface:OdfRestrictionRuleTranslate the restriction into a Solr query that can be used for search.- Specified by:
getQueryin interfaceOdfRestrictionRule- Returns:
- The restriction query
-
contains
Description copied from interface:OdfRestrictionRuleDetermines if this program is part of this restriction- Specified by:
containsin interfaceOdfRestrictionRule- Parameters:
program- The program- Returns:
trueIf the program is part of this restriction
-
hasOrgunitRestrictions
Description copied from interface:OdfRestrictionRuleIndicate if this restriction is related to orgunit- Specified by:
hasOrgunitRestrictionsin interfaceOdfRestrictionRule- Returns:
- true if it is the case
-