org.purl.xnode
Class XNodeStoreEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.purl.xnode.XNodeStoreEvent
All Implemented Interfaces:
Serializable

public class XNodeStoreEvent
extends EventObject

XNodeStoreEvent is used to notify interested parties that state has changed in the XNodeStore.

The XNode API (the package org.purl.xnode.*, both its source code and documentation), are released under the Apache 2.0 License. For more details, check the LICENSE file contained with the distribution, or see The Ceryle Project for more information. It is distributed with no warranty.

Since:
XNode 1.1
Version:
$Id: XNodeStoreEvent.java,v 3.5 2007-06-15 12:10:37 altheim Exp $
Author:
Murray Altheim
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
XNodeStoreEvent(Object source, XNodeState state)
          Constructs an XNodeStoreEvent object with no collection or node ID.
XNodeStoreEvent(Object source, XNodeState state, String cid, String nid)
          Constructs an XNodeStoreEvent object, with optional Collection and XNode IDs.
 
Method Summary
 String getCID()
          Returns the Collection ID associated with this event.
 String getNID()
          Returns the XNode ID associated with this event.
 XNodeState getState()
          Returns the state of the XNodeStore upon generating this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XNodeStoreEvent

public XNodeStoreEvent(Object source,
                       XNodeState state)
Constructs an XNodeStoreEvent object with no collection or node ID. These are generally for state change events that do not affect stored database content.

Parameters:
source - the Object that is the source of the event (typically this)
state - the database state at the time of the event (see XNodeState).

XNodeStoreEvent

public XNodeStoreEvent(Object source,
                       XNodeState state,
                       String cid,
                       String nid)
Constructs an XNodeStoreEvent object, with optional Collection and XNode IDs. These are used to indicate specific changes to Collections and XNodes.

Parameters:
source - the Object that is the source of the event (typically this)
state - the database state at the time of the event (see XNodeState).
cid - the optional Collection ID String.
nid - the optional XNode ID String.
Method Detail

getState

public XNodeState getState()
Returns the state of the XNodeStore upon generating this event.

Returns:
the XNodeState associated with this XNodeStoreEvent.

getCID

public String getCID()
Returns the Collection ID associated with this event. This will be non-null on events that make a change to either a Collection or XNode.

Returns:
the Collection ID String.

getNID

public String getNID()
Returns the XNode ID associated with this event. This will be non-null on events that make a change to an XNode.

Returns:
the XNode ID String.


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.