org.mmbase.storage.util
Class ChangeManager

java.lang.Object
  extended byorg.mmbase.storage.util.ChangeManager

public final class ChangeManager
extends java.lang.Object

Version:
$Id: ChangeManager.java,v 1.2 2003/08/29 12:12:26 keesj Exp $
Author:
Pierre van Rooden

Constructor Summary
ChangeManager(MMBase mmbase)
          Constructor.
 
Method Summary
 void commit(java.util.Map changes)
          Commit all changes stored in a Changes map.
 void commit(MMObjectNode node, java.lang.String change)
          Commits the change to a node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeManager

public ChangeManager(MMBase mmbase)
Constructor.

Parameters:
mmbase - the MMbase instance on which the changes are made
Method Detail

commit

public void commit(java.util.Map changes)
Commit all changes stored in a Changes map. Clears the change status of all changed nodes, then broadcasts changes to the nodes' builders.

Parameters:
changes - a map wityh node/change value pairs

commit

public void commit(MMObjectNode node,
                   java.lang.String change)
Commits the change to a node. Clears the change status of a node, then broadcasts changes to the node's parent builder. If the node is a relation, it also updates the relationcache and broadcasts these changes to the relation' s source and destination.

Parameters:
node - the node to commit the change of
change - the type of change: "n": new, "c": commit, "d": delete, "r" : relation changed


MMBase build 1.7.4.20050922