|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.data.impl.DefaultNodeController
Represents the internal node that a
com.sdm.quasar.client.core.data.internal.impl.DataCore
uses to manage the data structure defined by
Nodes.
A com.sdm.quasar.client.core.data.internal.impl.NodeController
in the com.sdm.quasar.client.core.data.internal.impl.DataCore
corresponds to a Node
in the DataConfiguration.
TODO Für JSF Rel.: Implementation should be made threadsafe
| Method Summary | |
void |
addValueHandler(ValueHandler valueHandler)
Adds a ValueHandler to the list of value handlers in this
node.
|
void |
allowNotification()
Allows notification of changes. |
boolean |
canModifyValue(Context context)
Calls the chain of value handlers to test whether the value of this node can be modified |
void |
collectSystemInfo(SystemInfoNode root,
SystemInfoOptions options)
Builds the system information tree upon local information of the implementor. |
void |
continueNodeValueChangedNotification()
Continues the notification across the node graph that this node's value has been changed. |
protected void |
dispose()
|
DataCore |
getDataCore()
|
java.util.List |
getDependentNodes()
|
java.util.Set |
getIndexSet(Context context)
Calls the chain of value handlers to return a Set of the index values for the node.
|
java.lang.String |
getKey()
Shortcut für getNode(). |
java.lang.Object |
getMetadata(java.lang.Class storingClass,
java.lang.String key)
Returns a stored data object for a plug in or a value handler |
Node |
getNode()
|
java.lang.Object |
getValue(Context context)
Calls the chain of value handlers to return the indexed value of the node |
boolean |
hasValue(Context context)
Calls the chain of value handlers to test whether this node has a value |
void |
notifyChildrenOfSourceValueChange()
This method notifies all of this node's children that their source value has changed. |
protected void |
notifyChildValueChanged(java.lang.String childKey)
Called by a node that depends on this node that its value has changed. |
void |
notifySourcesOfChildValueChange()
This method notifies all of this node's sources that this node's value has changed. |
protected void |
notifySourceValueChanged(java.lang.String sourceKey)
Called by a source node when it's value has changed. |
java.lang.Object |
removeMetadata(java.lang.Class storingClass,
java.lang.String key)
Removes a data object for a plug in or a value handler. |
void |
setMetadata(java.lang.Class storingClass,
java.lang.String key,
java.lang.Object value)
Stores a data object for a plug in or a value handler. |
void |
setValue(Context context,
java.lang.Object value)
Calls the chain of value handlers to set the (indexed) value of the node |
void |
startNodeValueChangedNotification()
Starts the notification across the node graph that this node's value has been changed. |
void |
stopNotification()
Temporary stops the notification of changes. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public java.lang.String getKey()
NodeControllerNodeController.getNode().Node.getKey().
getKey in interface NodeControllerNodeController.getKey()public Node getNode()
getNode in interface NodeControllerNodeController.NodeController.getNode()public DataCore getDataCore()
getDataCore in interface NodeControllerNodeController.getDataCore()
public java.lang.Object getMetadata(java.lang.Class storingClass,
java.lang.String key)
NodeController
getMetadata in interface NodeControllerstoringClass - the class that the data object has been stored forkey - the key under which the data object has been stored
NodeController.getMetadata(java.lang.Class, java.lang.String)
public void setMetadata(java.lang.Class storingClass,
java.lang.String key,
java.lang.Object value)
NodeController
setMetadata in interface NodeControllerstoringClass - the class that the data object has been stored forkey - the key under which the data object should be storedvalue - the data objectNodeController.setMetadata(java.lang.Class, java.lang.String, java.lang.Object)
public java.lang.Object removeMetadata(java.lang.Class storingClass,
java.lang.String key)
NodeController
removeMetadata in interface NodeControllerstoringClass - the class that the data object has been stored forkey - the key under which the data object has been stored
NodeController.removeMetadata(java.lang.Class, java.lang.String)public void addValueHandler(ValueHandler valueHandler)
NodeControllerValueHandler to the list of value handlers in this
node.
These value handlers will be called in the reverse order they have been registered.
Node that a value handler may only be added while the node is being registered.
Important
: The first value handler to be added, which is the last value handler to be called, must take responsibility for storing and retrieving the value in accordance to the structure description defined byNode.
addValueHandler in interface NodeControllerNodeController.addValueHandler(com.sdm.quasar.client.core.data.plugin.ValueHandler)public java.lang.Object getValue(Context context)
NodeController
getValue in interface NodeControllercontext - the context to resolve the indices
NodeController.getValue(com.sdm.quasar.client.core.data.Context)
public void setValue(Context context,
java.lang.Object value)
NodeController
setValue in interface NodeControllercontext - the context to resolve the indicesvalue - the value of the nodeNodeController.setValue(com.sdm.quasar.client.core.data.Context, java.lang.Object)public java.util.Set getIndexSet(Context context)
NodeControllerSet of the index values for the node.
The method returns null for not indexed nodes.
getIndexSet in interface NodeControllercontext - the context to resolve the indices
Set of the index values for the node or null.NodeController.getIndexSet(com.sdm.quasar.client.core.data.Context)public boolean hasValue(Context context)
NodeController
hasValue in interface NodeControllercontext - the context to resolve the indices
NodeController.hasValue(com.sdm.quasar.client.core.data.Context)public boolean canModifyValue(Context context)
NodeController
canModifyValue in interface NodeControllerNodeController.canModifyValue(com.sdm.quasar.client.core.data.Context)protected void notifySourceValueChanged(java.lang.String sourceKey)
ValueHandler.notifySourceValueChanged(NodeController,String),
then all nodes that depend on this node are notified that their source
has changed.
sourceKey - the key of the source node whose value has changedprotected void notifyChildValueChanged(java.lang.String childKey)
ValueHandler.notifyChildValueChanged(NodeController,String).
This notification is propagated further "up" the dependency graph to
the nodes that this node depends on.
childKey - the key of the child node whose value has changedpublic void continueNodeValueChangedNotification()
NodeController
continueNodeValueChangedNotification in interface NodeControllerNodeController.continueNodeValueChangedNotification()public void notifySourcesOfChildValueChange()
NodeController
notifySourcesOfChildValueChange in interface NodeControllerNodeController.notifySourcesOfChildValueChange()public void notifyChildrenOfSourceValueChange()
NodeController
notifyChildrenOfSourceValueChange in interface NodeControllerNodeController.notifyChildrenOfSourceValueChange()public void stopNotification()
NodeController
Important: When calling this method you must ensure that the
corresponding NodeController.allowNotification() will be called even
in case of an error by using try ... finally.
stopNotification in interface NodeControllerNodeController.stopNotification()public void allowNotification()
NodeControllerImportant: After calling this method the caller must start an appropriate notification.
allowNotification in interface NodeControllerNodeController.allowNotification()public void startNodeValueChangedNotification()
NodeControllerThis notification may also be used to notify the node that the value has been changed by means outside the control of the data store.
startNodeValueChangedNotification in interface NodeControllerNodeController.startNodeValueChangedNotification()public java.util.List getDependentNodes()
getDependentNodes in interface NodeControllerNodeController.getDependentNodes()protected void dispose()
public java.lang.String toString()
public void collectSystemInfo(SystemInfoNode root,
SystemInfoOptions options)
SystemInfoProviderSystemInfoOptions).
The information can be appended to the tree by adding new child
SystemInformationNodes to the root node given using the
SystemInfoNode.createChild(String) method and by setting information
attributes the these nodes or the given root node.
collectSystemInfo in interface SystemInfoProviderroot - the SystemInfoNode to add information to (guaranteed to be not null)options - contains additional options, that might influence the amount of
information added to the tree (guaranteed to be not null)SystemInfoProvider.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||