|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.emf.validation.service.AbstractConstraintProvider
For situations in which the
XmlConstraintProvider class
does not suffice (i.e., where a plug-in provides constraints dynamically,
rather than statically registered in XML), this is a useful class to extend
as it provides a partial implementation of the
IModelConstraintProvider interface. In particular, it extracts the
URI namespace prefix information from the extension point XML and provides
no-op implementations of the provider methods (redefine only those which
need an implementation).
This class may be subclassed by clients of the validation framework.
XmlConstraintProvider| Constructor Summary | |
|---|---|
protected |
AbstractConstraintProvider()
Initializes me. |
| Method Summary | |
|---|---|
java.util.Collection |
getBatchConstraints(org.eclipse.emf.ecore.EObject eObject,
java.util.Collection constraints)
This is a no-op implementation. |
java.util.Collection |
getLiveConstraints(org.eclipse.emf.common.notify.Notification notification,
java.util.Collection constraints)
This is a no-op implementation. |
java.lang.String[] |
getNamespaceUris()
Obtains the namespace URIs of the EMF packages that I provide constraints for. |
void |
setInitializationData(org.eclipse.core.runtime.IConfigurationElement config,
java.lang.String propertyName,
java.lang.Object data)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected AbstractConstraintProvider()
| Method Detail |
public final java.lang.String[] getNamespaceUris()
public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config,
java.lang.String propertyName,
java.lang.Object data)
throws org.eclipse.core.runtime.CoreException
setInitializationData in interface org.eclipse.core.runtime.IExecutableExtensionorg.eclipse.core.runtime.CoreException - if the subclass implementation of this
method throws on an error in accessing the config or for
any other reason (see the subclass documentation)
public java.util.Collection getBatchConstraints(org.eclipse.emf.ecore.EObject eObject,
java.util.Collection constraints)
super.
getBatchConstraints in interface IModelConstraintProvidereObject - the EObject for which constraints are to be
obtained that can be applied to itconstraints - a collector parameter to which I will add
any constraints that I provide. If this argument is
null, then I create and return a new collection
constraints parameter (with additions), or a new
collection if constraints == null
public java.util.Collection getLiveConstraints(org.eclipse.emf.common.notify.Notification notification,
java.util.Collection constraints)
super.
getLiveConstraints in interface IModelConstraintProvidernotification - the EMF notification that is to be validated.
Encapsulates the object and the particular changeconstraints - a collector parameter to which I will add
any constraints that I provide. If this argument is
null, then I create and return a new collection
constraints parameter (with additions), or a new
collection if constraints == 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 | |||||||||||