|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IBatchValidator
An IValidator that supports batch-mode validation of
EObjects.
This interface is not intended to be implemented by clients.
ModelValidationService.newValidator(EvaluationMode),
EvaluationMode.BATCH| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.emf.validation.service.IValidator |
|---|
IValidator.Option<V> |
| Field Summary | |
|---|---|
static IValidator.Option<Boolean> |
OPTION_INCLUDE_LIVE_CONSTRAINTS
A boolean-valued option indicating whether to include live constraints in a batch validation. |
static IValidator.Option<Boolean> |
OPTION_TRACK_RESOURCES
A boolean-valued option indicating whether to include include, in the validation result, marker statuses for the resources covered by the validation operation. |
static IValidator.Option<ITraversalStrategy> |
OPTION_TRAVERSAL_STRATEGY
An option specifying an implementation of the ITraversalStrategy
interface to be used to walk the model being validated. |
| Fields inherited from interface org.eclipse.emf.validation.service.IValidator |
|---|
OPTION_REPORT_SUCCESSES |
| Method Summary | |
|---|---|
ITraversalStrategy |
getDefaultTraversalStrategy()
Obtains the default traversal strategy, which can be assigned to me to restore the default behavior of recursive
validation. |
ITraversalStrategy |
getTraversalStrategy()
Obtains the traversal strategy that I employ to walk the model starting from the elements selected by the client. |
boolean |
isIncludeLiveConstraints()
Queries whether I also evaluate applicable live constraints on each object that I validate. |
void |
setIncludeLiveConstraints(boolean includeLiveConstraints)
Sets whether live constraints are to be included in validation. |
void |
setTraversalStrategy(ITraversalStrategy strategy)
Sets my traversal strategy. |
IStatus |
validate(Collection<? extends EObject> objects)
Validates multiple EMF elements without using any
progress monitor. |
IStatus |
validate(Collection<? extends EObject> eObjects,
IProgressMonitor monitor)
Validates the specified EMF elements, using the specified
progress monitor to monitor progress of validation. |
IStatus |
validate(EObject eobject)
Validates a single EMF element without using any
progress monitor. |
IStatus |
validate(EObject eObject,
IProgressMonitor monitor)
Validates the specified EMF element, using the specified
progress monitor to monitor progress of validation (which
is especially useful for recursive validation). |
| Methods inherited from interface org.eclipse.emf.validation.service.IValidator |
|---|
addConstraintFilter, getClientData, getConstraintFilters, getEvaluationMode, getOption, getOptions, isReportSuccesses, putClientData, removeConstraintFilter, setOption, setOptions, setReportSuccesses |
| Field Detail |
|---|
static final IValidator.Option<Boolean> OPTION_INCLUDE_LIVE_CONSTRAINTS
false.
IValidator.setOptions(Map)static final IValidator.Option<ITraversalStrategy> OPTION_TRAVERSAL_STRATEGY
ITraversalStrategy
interface to be used to walk the model being validated. The default value
of this option is a traversal
strategy that delegates to strategy objects registered on the
org.eclipse.emf.validation.traversal extension point.
IValidator.setOptions(Map)static final IValidator.Option<Boolean> OPTION_TRACK_RESOURCES
MarkerUtil to update
the problem markers attached to resources. This is optional because of
the increased cost (in time efficiency) of determining the resources.
The default value of this option is false.
IValidator.setOptions(Map)| Method Detail |
|---|
boolean isIncludeLiveConstraints()
Queries whether I also evaluate applicable live constraints on each object that I validate. This supports those clients that do not implement a transaction model for which live validation would be appropriate, but which still need to ensure that vital data integrity and other live constraints are satisfied by their models.
By default, I only apply batch constraints (not live constraints).
Since the 1.3 release, this method is equivalent to checking whether the
OPTION_INCLUDE_LIVE_CONSTRAINTS validation option is applied.
true if I apply both batch and live constraints;
false if I apply only batch constraints (the default)IValidator.getOptions(),
OPTION_INCLUDE_LIVE_CONSTRAINTSvoid setIncludeLiveConstraints(boolean includeLiveConstraints)
Sets whether live constraints are to be included in validation.
Since the 1.3 release, this method is equivalent to applying the
IValidator.OPTION_REPORT_SUCCESSES validation option.
includeLiveConstraints - whether to include live constraintsisIncludeLiveConstraints(),
IValidator.setOptions(java.util.Map),
OPTION_INCLUDE_LIVE_CONSTRAINTSITraversalStrategy getTraversalStrategy()
Obtains the traversal strategy that I employ to walk the model starting from the elements selected by the client.
Since the 1.3 release, this method is equivalent to obtaining the value
of the OPTION_TRAVERSAL_STRATEGY validation option.
IValidator.getOptions(),
OPTION_TRAVERSAL_STRATEGYvoid setTraversalStrategy(ITraversalStrategy strategy)
Sets my traversal strategy.
Since the 1.3 release, this method is equivalent to applying the
OPTION_TRAVERSAL_STRATEGY validation option.
strategy - the new traversal strategy. Must not be
null
IllegalArgumentException - on null strategiesgetTraversalStrategy(),
IValidator.setOptions(java.util.Map),
OPTION_TRAVERSAL_STRATEGYITraversalStrategy getDefaultTraversalStrategy()
restore the default behavior of recursive
validation. The default strategy makes use of all available customized
ITraversalStrategy implementations contributed by plug-ins for
iteration of the model sub-trees selected for recursive validation.
This is different from the ITraversalStrategy.Recursive strategy,
which simply iterates the entire contents of a model subtree.
setTraversalStrategy(org.eclipse.emf.validation.service.ITraversalStrategy)
IStatus validate(EObject eObject,
IProgressMonitor monitor)
EMF element, using the specified
progress monitor to monitor progress of validation (which
is especially useful for recursive validation).
eObject - the EMF element to validatemonitor - the progress monitor to track validation progress, or
null if no progress monitoring is required
IValidator.validate(Object)
IStatus validate(Collection<? extends EObject> eObjects,
IProgressMonitor monitor)
EMF elements, using the specified
progress monitor to monitor progress of validation.
eObjects - the EMF elements to validatemonitor - the progress monitor to track validation progress, or
null if no progress monitoring is required
IValidator.validate(Object)IStatus validate(EObject eobject)
EMF element without using any
progress monitor.
validate in interface IValidator<EObject>object - the object to validate
severity of the result indicates whether
validation passed or (how badly it) failed. Normally, the result is
a multi-status whose children are
the results of individual constraint evaluationsIStatus validate(Collection<? extends EObject> objects)
EMF elements without using any
progress monitor.
validate in interface IValidator<EObject>objects - must all be EObjects
multi-status of individual results
ClassCastException - if any of the objects is
not an EObjectIValidator.validate(Object)
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||