Package de.bmiag.tapir.variant.service
Class FeatureCheckService
- java.lang.Object
-
- de.bmiag.tapir.variant.service.FeatureCheckService
-
@Component("tapirFeatureCheckService") public class FeatureCheckService extends java.lang.Object
TheFeatureCheckService
is responsible for providing information about active/inactive features.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description FeatureCheckService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
_evaluate(ActivatedFeatureExpression activatedFeatureExpression)
Evaluates the given expression.protected boolean
_evaluate(AllOfFeatureExpression allOfFeatureExpression)
Evaluates the given expression.protected boolean
_evaluate(AnyOfFeatureExpression anyOfFeatureExpression)
Evaluates the given expression.protected boolean
_evaluate(NotFeatureExpression notFeatureExpression)
Evaluates the given expression.boolean
evaluate(FeatureExpression activatedFeatureExpression)
boolean
isActive(java.lang.Class<? extends Feature> feature)
Returns true if the givenFeature
is active.
-
-
-
Method Detail
-
isActive
public boolean isActive(java.lang.Class<? extends Feature> feature)
Returns true if the givenFeature
is active.- Parameters:
feature
- The feature which should be checked- Returns:
- true if the given
Feature
is active, otherwise false - Since:
- 2.0.0
-
_evaluate
protected boolean _evaluate(ActivatedFeatureExpression activatedFeatureExpression)
Evaluates the given expression.- Parameters:
activatedFeatureExpression
- The expression to evaluate.- Returns:
- true if and only if the expression evaluates to
true
. - Since:
- 3.3.0
-
_evaluate
protected boolean _evaluate(NotFeatureExpression notFeatureExpression)
Evaluates the given expression.- Parameters:
notFeatureExpression
- The expression to evaluate.- Returns:
- true if and only if the expression evaluates to
true
. - Since:
- 3.3.0
-
_evaluate
protected boolean _evaluate(AnyOfFeatureExpression anyOfFeatureExpression)
Evaluates the given expression.- Parameters:
anyOfFeatureExpression
- The expression to evaluate.- Returns:
- true if and only if the expression evaluates to
true
. - Since:
- 3.3.0
-
_evaluate
protected boolean _evaluate(AllOfFeatureExpression allOfFeatureExpression)
Evaluates the given expression.- Parameters:
allOfFeatureExpression
- The expression to evaluate.- Returns:
- true if and only if the expression evaluates to
true
. - Since:
- 3.3.0
-
evaluate
public boolean evaluate(FeatureExpression activatedFeatureExpression)
-
-