|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.data.plugin.AbstractDataManagerPlugIn
com.sdm.quasar.client.core.data.plugins.impl.DefaultValueChangedPlugIn
Note: this is a first draft! - it probably compares the values way too often - does not work if an indexed nodes is asked or it is in the recursion - is comparator the right thing? We need only an equals, not an order (int)
| Constructor Summary | |
DefaultValueChangedPlugIn()
|
|
| Method Summary | |
protected java.util.Comparator |
getComparator(NodeController node)
Returns the Comparator set in the node or null if none has been set. |
protected java.lang.Object |
getReferenceValue(NodeController node)
Returns the reference value |
BooleanState |
getValueChangedState(java.lang.String key)
Returns the state that is true if the value of the given node has changed (according to the comparator) from the time saveReferenceValues(String) was called last for the node. |
protected MutableBooleanState |
getValueChangedStateInternal(NodeController node)
Returns the MutableBooleanState
stored in the metadata of the node
that is true
if this node's value has changed according to the comparator. |
BooleanState |
getValuesChangedState(java.lang.String startKey)
Returns the state that is true if any value in the subtree starting at the given node has changed (according to the comparator) from the time saveReferenceValues(String) was called
last for the nodes. |
protected ORBooleanState |
getValuesChangedStateInternal(NodeController node)
Returns the ORBooleanState
stored in the metadata of the node
that is true
if this node's value has changed according to the comparator
or any of its children in the tree. |
void |
notifyExternalChange(java.lang.String key)
Notify the node that its value has been changed by means outside the control of the data store. |
protected void |
notifyNodeAdded(NodeController node)
Called by the DataCore when a node has been added.
|
protected void |
notifyNodeWillBeRemoved(NodeController node)
Called by the DataCore before a node will be removed. |
void |
saveReferenceValues(java.lang.String startKey)
Saves the reference values for the subtree starting at the given node. |
void |
setComparator(java.lang.String key,
java.util.Comparator comparator)
Sets the comparator to be used |
void |
setDefaultComparator(java.util.Comparator defaultComparator)
Sets the default comparator to be used, if no comparator has been specified for the node. |
| Methods inherited from class com.sdm.quasar.client.core.data.plugin.AbstractDataManagerPlugIn |
dispose, getDataCore, install |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sdm.quasar.client.core.data.DataManagerPlugIn |
install |
| Methods inherited from interface com.sdm.quasar.client.core.common.Disposable |
dispose |
| Constructor Detail |
public DefaultValueChangedPlugIn()
| Method Detail |
protected void notifyNodeAdded(NodeController node)
AbstractDataManagerPlugInDataCore when a node has been added.
The implementation may register value handlers for the new node.
notifyNodeAdded in class AbstractDataManagerPlugInnode - the node that has been addedprotected void notifyNodeWillBeRemoved(NodeController node)
AbstractDataManagerPlugInDataCore before a node will be removed.
notifyNodeWillBeRemoved in class AbstractDataManagerPlugInnode - the key of the node that will be removed.public BooleanState getValueChangedState(java.lang.String key)
ValueChangedPlugInValueChangedPlugIn.saveReferenceValues(String) was called last for the node.
getValueChangedState in interface ValueChangedPlugInkey -
public BooleanState getValuesChangedState(java.lang.String startKey)
ValueChangedPlugInValueChangedPlugIn.saveReferenceValues(String) was called
last for the nodes.
getValuesChangedState in interface ValueChangedPlugInstartKey -
public void saveReferenceValues(java.lang.String startKey)
ValueChangedPlugIn
saveReferenceValues in interface ValueChangedPlugInstartKey -
public void setComparator(java.lang.String key,
java.util.Comparator comparator)
ValueChangedPlugIn
setComparator in interface ValueChangedPlugInkey - public void setDefaultComparator(java.util.Comparator defaultComparator)
ValueChangedPlugIn
setDefaultComparator in interface ValueChangedPlugIndefaultComparator - protected MutableBooleanState getValueChangedStateInternal(NodeController node)
MutableBooleanState
stored in the metadata of the node
that is true
if this node's value has changed according to the comparator.
node - the node
protected ORBooleanState getValuesChangedStateInternal(NodeController node)
ORBooleanState
stored in the metadata of the node
that is true
if this node's value has changed according to the comparator
or any of its children in the tree.
node - the node
protected java.util.Comparator getComparator(NodeController node)
Comparator set in the node or null if none has been set.
node - the node
protected java.lang.Object getReferenceValue(NodeController node)
node - the node
public void notifyExternalChange(java.lang.String key)
ValueChangedPlugIn
notifyExternalChange in interface ValueChangedPlugIn
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||