|
 |
|
|
org.eclipse.emf.validation.service
Class ValidationEvent
java.lang.Object
java.util.EventObject
org.eclipse.emf.validation.service.ValidationEvent
-
All Implemented Interfaces:
-
Serializable
-
public final class ValidationEvent
- extends
EventObject
Event notifying
IValidationListener s that a validation operation
has occurred.
-
See Also:
-
Serialized Form
Constructor Summary
|
ValidationEvent
(
EvaluationMode<T> mode,
Map<
String,?> clientData,
Collection<? extends T> targets,
IStatus status)
Initializes me with the evaluation mode, client data, elements or
notifications validated, and validation results that I will pass along
to listeners. |
ValidationEvent
(
EvaluationMode<T> mode,
Map<
String,?> clientData,
Collection<? extends T> targets,
IStatus status,
Collection<
String> clientContextIds)
Initializes me with the evaluation mode, client data, elements or
notifications validated, and validation results that I will pass along
to listeners. |
ValidationEvent
public ValidationEvent(
EvaluationMode<T> mode,
Map<
String,?> clientData,
Collection<? extends T> targets,
IStatus status)
- Initializes me with the evaluation mode, client data, elements or
notifications validated, and validation results that I will pass along
to listeners.
-
Type Parameters:
-
T - the kind of objects that were validated -
Parameters:
-
mode - the evaluation mode -
clientData - data specific to the particular validation client
that performed the validation wishes to make available to listeners -
targets - the elements or notifications (according to the evaluation
mode) that were validated -
status - the validation results
ValidationEvent
public ValidationEvent(
EvaluationMode<T> mode,
Map<
String,?> clientData,
Collection<? extends T> targets,
IStatus status,
Collection<
String> clientContextIds)
- Initializes me with the evaluation mode, client data, elements or
notifications validated, and validation results that I will pass along
to listeners. Also, I will be initialized with the client context IDs
that were involved in the validation.
-
Type Parameters:
-
T - the kind of objects that were validated -
Parameters:
-
mode - the evaluation mode -
clientData - data specific to the particular validation client
that performed the validation wishes to make available to listeners -
targets - the elements or notifications (according to the evaluation
mode) that were validated -
status - the validation results -
clientContextIds - the client context Ids that were involved in the
validation.
getClientContextIds
public
Collection<
String> getClientContextIds()
- Retrieves the client context ids that were involved in the validation
that lead to this event.
-
-
Returns:
- A collection of the client context ids in String form. These
ids should not be modified in any way as they may affect other listeners.
getEvaluationMode
public
EvaluationMode<?> getEvaluationMode()
- Queries the mode in which the validation operation occurred.
-
-
Returns:
- the evaluation mode; never
null or
even
EvaluationMode.NULL
getClientData
public
Map<
String,
Object> getClientData()
- Retrieves the client-specific data that the client that initiated the
validation operation publishes to listeners. It is up to listeners to
make what they will of the information that they do or do not find in
this map. Two things the caller may be assured of:
- the map is never
null
- its keys are
String
s
-
-
Returns:
- an unmodifiable mapping of client data
getValidationTargets
public
Collection<?> getValidationTargets()
- Obtains the collection of
EObject s (in the
batch mode case) or
Notification s
(in the live mode case) that were validated.
-
-
Returns:
- an unmodifiable collection of the validation targets
-
See Also:
-
getValidationResults()
getSeverity
public int getSeverity()
- Queries the overall severity of the validation
results.
-
-
Returns:
- the severity, enumerated by the
IStatus interface -
See Also:
-
IStatus.getSeverity()
matches
public boolean matches(int severityMask)
- Queries whether the overall severity of the validation
results matches the specified
severity mask.
-
-
Parameters:
-
severityMask - the severity mask to match
-
Returns:
- whether the overall severity matches
-
See Also:
-
IStatus.matches(int)
getValidationResults
public
List<
IConstraintStatus> getValidationResults()
- Obtains the results of the validation operation.
-
-
Returns:
- the validation results, as an unmodifiable list of
IConstraintStatus es -
See Also:
-
getValidationTargets()
|
|
|