Class ConstraintEngine
- java.lang.Object
-
- com.aquima.interactions.rule.constraint.ConstraintEngine
-
public class ConstraintEngine extends Object
The constraint engine contains the logic to narrow domains of attributes by applying constraints to them.- Since:
- 5.0
- Author:
- O. Kerpershoek
-
-
Constructor Summary
Constructors Constructor Description ConstraintEngine(IRuleGraph graph)
Constructs a constraint engine using an initialized rule graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPrimitiveValue[]
evaluateDomain(IProfile profile, ValueReference attribute, IDomainDefinition domain)
This method will determine the set of valid values for the specified attribute.
-
-
-
Constructor Detail
-
ConstraintEngine
public ConstraintEngine(IRuleGraph graph)
Constructs a constraint engine using an initialized rule graph.- Parameters:
graph
- The rule graph that should be used to initialize the constraint engine with.
-
-
Method Detail
-
evaluateDomain
public IPrimitiveValue[] evaluateDomain(IProfile profile, ValueReference attribute, IDomainDefinition domain) throws MetaModelException, RuleEngineException, ProfileException
This method will determine the set of valid values for the specified attribute.- Parameters:
profile
- The profile containing the current state.attribute
- Reference to the attribute for which the valid set of values should be determined.domain
- The definition of the domain of which the valid values should be determined.- Returns:
- Array containing all the valid values for the specified attribute.
- Throws:
MetaModelException
- This exception is thrown when the reference does not contain a valid entity or attribute name.RuleEngineException
- This exception is thrown when the constraint(s) failed evaluation.ProfileException
- This exception is thrown when the reference refers to an unknown or invalid instance.
-
-