Package org.apache.jackrabbit.core.state
Class StateChangeDispatcher
- java.lang.Object
-
- org.apache.jackrabbit.core.state.StateChangeDispatcher
-
public class StateChangeDispatcher extends Object
Component that holds references to listeners interested in changes to item states and dispatches notifications.
-
-
Constructor Summary
Constructors Constructor Description StateChangeDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(ItemStateListener listener)
Add anItemStateListener
.void
notifyNodeAdded(NodeState state, Name name, int index, NodeId id)
Notify listeners about changes to some state.void
notifyNodeModified(NodeState state)
Notify listeners about changes to some state.void
notifyNodeRemoved(NodeState state, Name name, int index, NodeId id)
Notify listeners about changes to some state.void
notifyNodesReplaced(NodeState state)
Notify listeners about changes to some state.void
notifyStateCreated(ItemState created)
Notify listeners about changes to some state.void
notifyStateDestroyed(ItemState destroyed)
Notify listeners about changes to some state.void
notifyStateDiscarded(ItemState discarded)
Notify listeners about changes to some state.void
notifyStateModified(ItemState modified)
Notify listeners about changes to some state.void
removeListener(ItemStateListener listener)
Remove anItemStateListener
-
-
-
Method Detail
-
addListener
public void addListener(ItemStateListener listener)
Add anItemStateListener
.- Parameters:
listener
- the new listener to be informed on modifications
-
removeListener
public void removeListener(ItemStateListener listener)
Remove anItemStateListener
- Parameters:
listener
- an existing listener
-
notifyStateCreated
public void notifyStateCreated(ItemState created)
Notify listeners about changes to some state.- Parameters:
created
- created state.
-
notifyStateModified
public void notifyStateModified(ItemState modified)
Notify listeners about changes to some state.- Parameters:
modified
- modified state.
-
notifyStateDestroyed
public void notifyStateDestroyed(ItemState destroyed)
Notify listeners about changes to some state.- Parameters:
destroyed
- destroyed state.
-
notifyStateDiscarded
public void notifyStateDiscarded(ItemState discarded)
Notify listeners about changes to some state.- Parameters:
discarded
- discarded state.
-
notifyNodeAdded
public void notifyNodeAdded(NodeState state, Name name, int index, NodeId id)
Notify listeners about changes to some state.- Parameters:
state
- node state that changedname
- name of node that was addedindex
- index of new nodeid
- id of new node
-
notifyNodesReplaced
public void notifyNodesReplaced(NodeState state)
Notify listeners about changes to some state.- Parameters:
state
- node state that changed
-
notifyNodeModified
public void notifyNodeModified(NodeState state)
Notify listeners about changes to some state.- Parameters:
state
- node state that changed
-
-