|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An IValidator
that supports batch-mode validation of
EObject
s.
This interface is not intended to be implemented by clients.
ModelValidationService.newValidator(EvaluationMode)
,
EvaluationMode.BATCH
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. |
org.eclipse.core.runtime.IStatus |
validate(java.util.Collection objects)
Validates multiple EMF elements without using any
progress monitor. |
org.eclipse.core.runtime.IStatus |
validate(java.util.Collection eObjects,
org.eclipse.core.runtime.IProgressMonitor monitor)
Validates the specified EMF elements , using the specified
progress monitor to monitor progress of validation. |
org.eclipse.core.runtime.IStatus |
validate(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.core.runtime.IProgressMonitor monitor)
Validates the specified EMF element , using the specified
progress monitor to monitor progress of validation (which
is especially useful for recursive validation). |
org.eclipse.core.runtime.IStatus |
validate(java.lang.Object object)
Validates a single EMF element without using any
progress monitor. |
Methods inherited from interface org.eclipse.emf.validation.service.IValidator |
---|
getClientData, getEvaluationMode, isReportSuccesses, putClientData, setReportSuccesses |
Method Detail |
public 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).
true
if I apply both batch and live constraints;
false
if I apply only batch constraints (the default)public void setIncludeLiveConstraints(boolean includeLiveConstraints)
includeLiveConstraints
- whether to include live constraintsIBatchValidator.isIncludeLiveConstraints()
public ITraversalStrategy getTraversalStrategy()
public void setTraversalStrategy(ITraversalStrategy strategy)
strategy
- the new traversal strategy. Must not be
null
java.lang.IllegalArgumentException
- on null
strategiesIBatchValidator.getTraversalStrategy()
public ITraversalStrategy 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.
IBatchValidator.setTraversalStrategy(org.eclipse.emf.validation.service.ITraversalStrategy)
public org.eclipse.core.runtime.IStatus validate(org.eclipse.emf.ecore.EObject eObject, org.eclipse.core.runtime.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)
public org.eclipse.core.runtime.IStatus validate(java.util.Collection eObjects, org.eclipse.core.runtime.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)
public org.eclipse.core.runtime.IStatus validate(java.lang.Object object)
EMF element
without using any
progress monitor.
validate
in interface IValidator
object
- must be an EObject
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 evaluations
java.lang.ClassCastException
- if object
is not an
EObject
public org.eclipse.core.runtime.IStatus validate(java.util.Collection objects)
EMF elements
without using any
progress monitor.
validate
in interface IValidator
objects
- must all be EObject
s
multi-status
of individual results
java.lang.ClassCastException
- if any of the objects
is
not an EObject
IValidator.validate(Object)
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |