Class OdfMetadataRestrictionRule
- java.lang.Object
-
- org.ametys.plugins.odfweb.restrictions.rules.OdfMetadataRestrictionRule
-
- All Implemented Interfaces:
OdfRestrictionRule
public class OdfMetadataRestrictionRule extends Object implements OdfRestrictionRule
Metadata restriction rule
-
-
Field Summary
Fields Modifier and Type Field Description private String_metadataPathprivate String_value
-
Constructor Summary
Constructors Constructor Description OdfMetadataRestrictionRule(String metadataPath, String value)Constructor for rule relating to the value of a metadata
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Program program)Determines if this program is part of this restrictionExpressiongetExpression()Translate the restriction into an expression that can be used for repository query.booleanhasOrgunitRestrictions()Indicate if this restriction is related to orgunit
-
-
-
Field Detail
-
_metadataPath
private final String _metadataPath
-
-
Constructor Detail
-
OdfMetadataRestrictionRule
public OdfMetadataRestrictionRule(String metadataPath, String value)
Constructor for rule relating to the value of a metadata- Parameters:
metadataPath- The path of metadatavalue- The metadata value
-
-
Method Detail
-
getExpression
public Expression 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
-
contains
public boolean contains(Program program)
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
public boolean hasOrgunitRestrictions()
Description copied from interface:OdfRestrictionRuleIndicate if this restriction is related to orgunit- Specified by:
hasOrgunitRestrictionsin interfaceOdfRestrictionRule- Returns:
- true if it is the case
-
-