|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.validation.service.ConstraintRegistry
A centralized registry of descriptors
for
the constraints that are available in the validation system. Clients can
use this registry to look up the meta-data for constraints (given the
constraint IDs), and constraint providers can register the constraints that
they provide in the registry.
Note for dynamic constraint providers: registering constraints in the registry is not absolutely necessary if none of the following capabilities of the system is required for your constraints:
Method Summary | |
---|---|
java.util.Collection |
getAllDescriptors()
Obtains the descriptors for all registered constraints, in no particular order. |
IConstraintDescriptor |
getDescriptor(java.lang.String id)
Obtains the unique constraint descriptor having the specified ID. |
IConstraintDescriptor |
getDescriptor(java.lang.String pluginId,
java.lang.String id)
Obtains the unique constraint descriptor having the specified ID. |
static ConstraintRegistry |
getInstance()
Obtains the instance of the constraint registry. |
void |
register(IConstraintDescriptor descriptor)
Registers a new constraint descriptor. |
void |
unregister(IConstraintDescriptor descriptor)
Unregisters an existing constraint descriptor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ConstraintRegistry getInstance()
public IConstraintDescriptor getDescriptor(java.lang.String id)
id
- the ID of the constraint descriptor to retrieve
(not null
)
null
if it
does not existpublic IConstraintDescriptor getDescriptor(java.lang.String pluginId, java.lang.String id)
pluginId
- the ID of the plug-in that contributes the constraintid
- the constraint's ID, relative to the plug-in ID
null
if it
does not existpublic java.util.Collection getAllDescriptors()
public void register(IConstraintDescriptor descriptor) throws ConstraintExistsException
descriptor
- a new constraint descriptor, which must have a
unique ID (not null
)
ConstraintExistsException
- if the descriptor
's ID
already exists in the registrypublic void unregister(IConstraintDescriptor descriptor)
descriptor
's ID will subsequently be available for re-use.
descriptor
- a constraint descriptor (not 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 |