Class ConstraintEngine
java.lang.Object
com.aquima.interactions.rule.constraint.ConstraintEngine
The constraint engine contains the logic to narrow domains of attributes by applying constraints to them.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionConstraintEngine
(IRuleGraph graph) Constructs a constraint engine using an initialized rule graph. -
Method Summary
Modifier and TypeMethodDescriptionevaluateDomain
(IProfile profile, ValueReference attribute, IDomainDefinition domain) This method will determine the set of valid values for the specified attribute.
-
Constructor Details
-
ConstraintEngine
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 Details
-
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.
-