public class ValidationEngine extends java.lang.Object implements IValidationEngine
IncQueryEngine
for tracking violations of ConstraintSpecification
s.
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()
IValidationEngine
initialize
in interface IValidationEngine
public void dispose()
IValidationEngine
dispose
in interface IValidationEngine
public java.util.Set<IConstraint> getConstraints()
IValidationEngine
getConstraints
in interface IValidationEngine
public IConstraint addConstraintSpecification(IConstraintSpecification constraintSpecification)
IValidationEngine
addConstraintSpecification
in interface IValidationEngine
constraintSpecification
- The constraint specification instance to be registered.public IConstraint removeConstraintSpecification(IConstraintSpecification constraintSpecification)
IValidationEngine
removeConstraintSpecification
in interface IValidationEngine
constraintSpecification
- The constraint specification to be deregistered.public java.util.Set<ValidationEngineListener> getListeners()
IValidationEngine
getListeners
in interface IValidationEngine
public boolean addListener(ValidationEngineListener listener)
IValidationEngine
addListener
in interface IValidationEngine
listener
- The listener to be registered.true
if the listener was not registered before.public boolean removeListener(ValidationEngineListener listener)
IValidationEngine
removeListener
in interface IValidationEngine
listener
- The listener to be deregistered.true
if the listener was in fact registered.