public class ValidationEngine extends java.lang.Object implements IValidationEngine
IncQueryEngine for tracking violations of ConstraintSpecifications.
Use the builder() method for setting up a new instance through the ValidationEngineBuilder.| Constructor and Description |
|---|
ValidationEngine(org.eclipse.emf.common.notify.Notifier notifier,
org.apache.log4j.Logger logger)
Deprecated.
use
ValidationEngineBuilder instead. |
| Modifier and Type | Method and Description |
|---|---|
IConstraint |
addConstraintSpecification(IConstraintSpecification constraintSpecification)
Adds the given constraint specification to the validation engine and returns the created constraint.
|
boolean |
addListener(ValidationEngineListener listener)
Adds the given listener to the list of listeners to be notified on specific events regarding the validation
engine.
|
static ValidationEngineBuilder |
builder() |
void |
dispose()
Disposes the validation engine.
|
java.util.Set<IConstraint> |
getConstraints()
Returns the constraints to the registered constraint specifications.
|
java.util.Set<ValidationEngineListener> |
getListeners()
Returns the listeners registered for the validation engine.
|
void |
initialize()
Initializes the validation engine.
|
IConstraint |
removeConstraintSpecification(IConstraintSpecification constraintSpecification)
Removes the given constraint specification from the validation engine and returns the corresponding constraint.
|
boolean |
removeListener(ValidationEngineListener listener)
Removes the given listener from the list of listeners to be notified on specific events regarding the validation
engine.
|
public ValidationEngine(org.eclipse.emf.common.notify.Notifier notifier,
org.apache.log4j.Logger logger)
ValidationEngineBuilder instead.IncQueryEngine
with the given Notifier as scope and with the given Logger.notifier - logger - java.lang.IllegalArgumentException - if either argument is nullpublic static ValidationEngineBuilder builder()
public void initialize()
IValidationEngineinitialize in interface IValidationEnginepublic void dispose()
IValidationEnginedispose in interface IValidationEnginepublic java.util.Set<IConstraint> getConstraints()
IValidationEnginegetConstraints in interface IValidationEnginepublic IConstraint addConstraintSpecification(IConstraintSpecification constraintSpecification)
IValidationEngineaddConstraintSpecification in interface IValidationEngineconstraintSpecification - The constraint specification instance to be registered.public IConstraint removeConstraintSpecification(IConstraintSpecification constraintSpecification)
IValidationEngineremoveConstraintSpecification in interface IValidationEngineconstraintSpecification - The constraint specification to be deregistered.public java.util.Set<ValidationEngineListener> getListeners()
IValidationEnginegetListeners in interface IValidationEnginepublic boolean addListener(ValidationEngineListener listener)
IValidationEngineaddListener in interface IValidationEnginelistener - The listener to be registered.true if the listener was not registered before.public boolean removeListener(ValidationEngineListener listener)
IValidationEngineremoveListener in interface IValidationEnginelistener - The listener to be deregistered.true if the listener was in fact registered.