org.apache.jackrabbit.core.state
Class StateChangeDispatcher

java.lang.Object
  extended by 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
StateChangeDispatcher()
           
 
Method Summary
 void addListener(ItemStateListener listener)
          Add an ItemStateListener.
 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 an ItemStateListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateChangeDispatcher

public StateChangeDispatcher()
Method Detail

addListener

public void addListener(ItemStateListener listener)
Add an ItemStateListener.

Parameters:
listener - the new listener to be informed on modifications

removeListener

public void removeListener(ItemStateListener listener)
Remove an ItemStateListener

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 changed
name - name of node that was added
index - index of new node
id - 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

notifyNodeRemoved

public void notifyNodeRemoved(NodeState state,
                              Name name,
                              int index,
                              NodeId id)
Notify listeners about changes to some state.

Parameters:
state - node state that changed
name - name of node that was added
index - index of new node
id - id of new node


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.