com.vividsolutions.jump.workbench.registry
Class Registry
java.lang.Object
com.vividsolutions.jump.workbench.registry.Registry
public class Registry
- extends java.lang.Object
While a Registry is similar to a Blackboard in that they are both flexible
repositories of information, there are some subtle differences:
- The Registry is a bit more structured (values are Lists as opposed to
general Objects).
- There is only one Registry, whereas there are Blackboards on several
different levels (the Workbench Blackboard, the Task Blackboard, the Layer
Blackboard, the LayerViewPanel Blackboard), thus representing varying degrees
of scope.
- Registry keys are in general "well known" to a greater degree than
Blackboard keys, which plugins tend to create as needed. Thus the Registry
can be thought of as being more static, and the Blackboard more fluid.
- Registry entries are intended to be much more static than Blackboard
entries. You might well think about persisting a Registry, but probably never
a Blackboard
- In the bigger world, Registries have all kinds of security,
classification and lifecyle features that probably would not appear on a
Blackboard.
- Author:
- jaquino, dzwiers
|
Method Summary |
Registry |
createClassification(java.lang.Object classification,
java.lang.Class type)
Sets up the registry to be type-safe for a particular classification. |
Registry |
createEntries(java.lang.Object classification,
java.util.Collection entries)
|
Registry |
createEntry(java.lang.Object classification,
java.lang.Object entry)
|
java.util.List |
getEntries(java.lang.Object classification)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Registry
public Registry()
createEntry
public Registry createEntry(java.lang.Object classification,
java.lang.Object entry)
throws java.lang.ClassCastException
- Parameters:
classification - entry -
- Returns:
- The current Registry
- Throws:
java.lang.ClassCastException - When the entry does not match a registered Classification Type- See Also:
createClassification(Object, Class)
createEntries
public Registry createEntries(java.lang.Object classification,
java.util.Collection entries)
throws java.lang.ClassCastException
- Parameters:
classification - entries -
- Returns:
- The current Registry
- Throws:
java.lang.ClassCastException - When the entries do not match a registered Classification Type- See Also:
createClassification(Object, Class)
getEntries
public java.util.List getEntries(java.lang.Object classification)
createClassification
public Registry createClassification(java.lang.Object classification,
java.lang.Class type)
throws java.lang.ClassCastException
- Sets up the registry to be type-safe for a particular classification.
Should the user not specify a type mappingthrough this method, no
checks will be performed.
- Parameters:
classification - type -
- Returns:
- The current Registry
- Throws:
java.lang.ClassCastException - When the existing entries do not match Classification Type being registered.