|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.Status
org.eclipse.emf.validation.model.ConstraintStatus
Indicates the result of evaluating a constraint on a model object. Any
constraint which is met by the object results in an IStatus.OK
status. Failure of a constraint results in a status severity matching the
severity
defined for the constraint.
As a special case of constraint failure, if the validation framework
receives an uncaught exception from the constraint, then the constraint is
disabled and the resulting ConstraintStatus
is an
IStatus.INFO
indicating this fact and containing the exception that
caused the failure. Once disabled, the constraint will not be evaluated
again.
This class should not be extended outside of the validation framework.
IModelConstraint.validate(org.eclipse.emf.validation.IValidationContext)
Field Summary |
---|
Fields inherited from class org.eclipse.core.runtime.Status |
---|
CANCEL_STATUS, OK_STATUS |
Fields inherited from interface org.eclipse.core.runtime.IStatus |
---|
CANCEL, ERROR, INFO, OK, WARNING |
Constructor Summary | |
---|---|
ConstraintStatus(IModelConstraint constraint,
org.eclipse.emf.ecore.EObject target)
Initializes me as a successful execution of the specified constraint . |
|
ConstraintStatus(IModelConstraint constraint,
org.eclipse.emf.ecore.EObject target,
int status,
int code,
java.lang.String message,
java.util.Set resultLocus)
Constructor that explicitly initializes all of my parts. |
|
ConstraintStatus(IModelConstraint constraint,
org.eclipse.emf.ecore.EObject target,
java.lang.String message,
java.util.Set resultLocus)
Initializes me as a failure of the specified constraint
with a message to be displayed somehow to the user. |
Method Summary | |
---|---|
IModelConstraint |
getConstraint()
Obtains the constraint which either succeeded or failed, according to what I have to say. |
java.util.Set |
getResultLocus()
Obtains the objects which are involved in the failure of the constraint. |
org.eclipse.emf.ecore.EObject |
getTarget()
Obtains the target object, on which the constraint was evaluated. |
Methods inherited from class org.eclipse.core.runtime.Status |
---|
getChildren, getCode, getException, getMessage, getPlugin, getSeverity, isMultiStatus, isOK, matches, setCode, setException, setMessage, setPlugin, setSeverity, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.core.runtime.IStatus |
---|
getChildren, getCode, getException, getMessage, getPlugin, getSeverity, isMultiStatus, isOK, matches |
Constructor Detail |
public ConstraintStatus(IModelConstraint constraint, org.eclipse.emf.ecore.EObject target, java.lang.String message, java.util.Set resultLocus)
constraint
with a message
to be displayed somehow to the user.
constraint
- the constraint that failedtarget
- the target of the failed validationmessage
- the message describing the failureresultLocus
- the objects which caused the constraint to fail (at
least the original target should be among these). May be
null
if there really is no result locuspublic ConstraintStatus(IModelConstraint constraint, org.eclipse.emf.ecore.EObject target)
constraint
.
constraint
- the constraint that succeededtarget
- the target of the successful validationpublic ConstraintStatus(IModelConstraint constraint, org.eclipse.emf.ecore.EObject target, int status, int code, java.lang.String message, java.util.Set resultLocus)
Constructor that explicitly initializes all of my parts.
This constructor should not be used outside of the validation framework.
constraint
- the constraint that was evaluatedtarget
- the object on which validation was performedstatus
- the status of the constraint evaluationcode
- the error code (if the constraint failed)message
- the error message (if the constraint failed)resultLocus
- the result locus (if the constraint failed)Method Detail |
public final IModelConstraint getConstraint()
getConstraint
in interface IConstraintStatus
public final org.eclipse.emf.ecore.EObject getTarget()
getTarget
in interface IConstraintStatus
public final java.util.Set getResultLocus()
getResultLocus
in interface IConstraintStatus
null
|
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 |