viper.api.impl
Class AbstractMajorNodeChangeEvent

java.lang.Object
  extended byviper.api.impl.AbstractViperChangeEvent
      extended byviper.api.impl.AbstractMajorNodeChangeEvent
All Implemented Interfaces:
MajorNodeChangeEvent, ViperChangeEvent

public abstract class AbstractMajorNodeChangeEvent
extends AbstractViperChangeEvent
implements MajorNodeChangeEvent

An implementation of some of the more common forms of major node change event methods.


Field Summary
protected  java.util.List events
           
 
Constructor Summary
AbstractMajorNodeChangeEvent(java.lang.String uri)
          Creates a new major node change event with the given class URI.
 
Method Summary
 void addEvent(ViperChangeEvent vce)
          Adds the new subevent to the list of events included in this major event.
 void die()
          Removes all children of the events, and performs any required cleanup.
 java.util.Iterator getSubEvents()
          Gets the subevents that make up this event.
 java.lang.String getUri()
          Gets a unique id for the type of change. Note that different instances of the same kind of change will all return the same URI.
 
Methods inherited from class viper.api.impl.AbstractViperChangeEvent
addProperty, getProperty, listProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface viper.api.extensions.ViperChangeEvent
getIndexes, getParent, getProperty, getSource, listProperties
 

Field Detail

events

protected java.util.List events
Constructor Detail

AbstractMajorNodeChangeEvent

public AbstractMajorNodeChangeEvent(java.lang.String uri)
Creates a new major node change event with the given class URI.

Parameters:
uri - the class of change event
Method Detail

addEvent

public void addEvent(ViperChangeEvent vce)
Adds the new subevent to the list of events included in this major event.

Parameters:
vce - the event to add

getUri

public java.lang.String getUri()
Gets a unique id for the type of change. Note that different instances of the same kind of change will all return the same URI.

Specified by:
getUri in interface ViperChangeEvent
Returns:

getSubEvents

public java.util.Iterator getSubEvents()
Gets the subevents that make up this event.

Specified by:
getSubEvents in interface MajorNodeChangeEvent
Returns:
an iterator of ViperChangeEvents

die

public void die()
Removes all children of the events, and performs any required cleanup.