Interface IValidationEngine
-
- All Known Implementing Classes:
ValidationEngine
public interface IValidationEngineA validation engine is responsible for managing the constraints existing in the scope of a VIATRA Query Engine (e.g. resource set) for a set of constraint specifications added to the validation engine.The validation engine provides capabilities for:
- adding and removing constraint specifications
- listing the set of constraints
- registering listeners for notifications on the changes in the constraint set and other events related to the life cycle of the validation engine.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IConstraintaddConstraintSpecification(IConstraintSpecification constraintSpecification)Adds the given constraint specification to the validation engine and returns the created constraint.booleanaddListener(ValidationEngineListener listener)Adds the given listener to the list of listeners to be notified on specific events regarding the validation engine.voiddispose()Disposes the validation engine.java.util.Collection<IConstraint>getConstraints()Returns the constraints to the registered constraint specifications.java.util.Collection<ValidationEngineListener>getListeners()Returns the listeners registered for the validation engine.voidinitialize()Initializes the validation engine.IConstraintremoveConstraintSpecification(IConstraintSpecification constraintSpecification)Removes the given constraint specification from the validation engine and returns the corresponding constraint.booleanremoveListener(ValidationEngineListener listener)Removes the given listener from the list of listeners to be notified on specific events regarding the validation engine.
-
-
-
Method Detail
-
initialize
void initialize()
Initializes the validation engine.
-
dispose
void dispose()
Disposes the validation engine.
-
getConstraints
java.util.Collection<IConstraint> getConstraints()
Returns the constraints to the registered constraint specifications.- Returns:
- The Collection of constraints in the validation engine.
-
addConstraintSpecification
IConstraint addConstraintSpecification(IConstraintSpecification constraintSpecification)
Adds the given constraint specification to the validation engine and returns the created constraint.- Parameters:
constraintSpecification- The constraint specification instance to be registered.- Returns:
- The created corresponding constraint instance.
-
removeConstraintSpecification
IConstraint removeConstraintSpecification(IConstraintSpecification constraintSpecification)
Removes the given constraint specification from the validation engine and returns the corresponding constraint.- Parameters:
constraintSpecification- The constraint specification to be deregistered.- Returns:
- The removed corresponding constraint instance.
-
getListeners
java.util.Collection<ValidationEngineListener> getListeners()
Returns the listeners registered for the validation engine.- Returns:
- The Collection of listeners registered for the validation engine.
-
addListener
boolean addListener(ValidationEngineListener listener)
Adds the given listener to the list of listeners to be notified on specific events regarding the validation engine.- Parameters:
listener- The listener to be registered.- Returns:
trueif the listener was not registered before.
-
removeListener
boolean removeListener(ValidationEngineListener listener)
Removes the given listener from the list of listeners to be notified on specific events regarding the validation engine.- Parameters:
listener- The listener to be deregistered.- Returns:
trueif the listener was in fact registered.
-
-