|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xtools.emf.validation.AbstractModelConstraint
Abstract superclass of all constraint implementations provided via the constraintProviders extension point in the plug-in manifest XML whose language is "Java".
The same constraint implementation class may be supplied for multiple
constraints (distinguished by their IDs in the extension XML). In such
cases, the validation system will only create a single instance of the
AbstractModelConstraint
, shared by all of the constraint IDs.
Therefore, this instance should not cache or otherwise retain any state
related to a particular constraint or validation operation. If it is
necessary to retain any state, then this information should be indexed by
the constraint ID provided by the
IValidationContext.getCurrentConstraintId()
method of the validation
context.
Constructor Summary | |
AbstractModelConstraint()
Initializes me. |
Method Summary | |
abstract IStatus |
validate(IValidationContext ctx)
Validates an object in the specified context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractModelConstraint()
Method Detail |
public abstract IStatus validate(IValidationContext ctx)
Validates an object in the specified context. The
target
of the validation operation
is available from the context object.
Note that it is best to use the
IValidationContext.createSuccessStatus()
and
IValidationContext.createFailureStatus(java.lang.Object[])
methods of the context
object to create the status object returned from this method, to ensure
that the status object returned is correctly handled by the validation
system.
ctx
- the validation context that provides access to the current
constraint evaluation environment. The framework will never
pass a null
value
IStatus.getSeverity()
of the record is either
IStatus.OK
to indicate success,
or some other value to indicate that validation failed.
Must not return null
IValidationContext.createSuccessStatus()
,
IValidationContext.createFailureStatus(Object[])
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.