org.apache.jackrabbit.core.observation
Class EventImpl

java.lang.Object
  extended by org.apache.jackrabbit.core.observation.EventImpl
All Implemented Interfaces:
Event

public final class EventImpl
extends Object
implements Event

Implementation of the Event interface.


Field Summary
 
Fields inherited from interface javax.jcr.observation.Event
NODE_ADDED, NODE_REMOVED, PROPERTY_ADDED, PROPERTY_CHANGED, PROPERTY_REMOVED
 
Method Summary
 boolean equals(Object obj)
          Returns true if this Event is equal to another object.
 NodeId getChildId()
          Returns the id of a child node operation.
 NodeId getParentId()
          Returns the uuid of the parent node.
 String getPath()
          
 Path getQPath()
          Returns the qualified path of this event.
 int getType()
          
 String getUserID()
          
 int hashCode()
           
 boolean isExternal()
          Return a flag indicating whether this is an externally generated event.
 String toString()
          Returns a String representation of this Event.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getType

public int getType()

Specified by:
getType in interface Event

getPath

public String getPath()
               throws RepositoryException

Specified by:
getPath in interface Event
Throws:
RepositoryException

getUserID

public String getUserID()

Specified by:
getUserID in interface Event

getQPath

public Path getQPath()
              throws RepositoryException
Returns the qualified path of this event.

Returns:
qualified path
Throws:
RepositoryException - if the path can't be constructed

getParentId

public NodeId getParentId()
Returns the uuid of the parent node.

Returns:
the uuid of the parent node.

getChildId

public NodeId getChildId()
Returns the id of a child node operation. If this Event was generated for a property operation this method returns null.

Returns:
the id of a child node operation.

isExternal

public boolean isExternal()
Return a flag indicating whether this is an externally generated event.

Returns:
true if this is an external event; false otherwise

toString

public String toString()
Returns a String representation of this Event.

Overrides:
toString in class Object
Returns:
a String representation of this Event.

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Returns true if this Event is equal to another object.

Two Event instances are equal if their respective EventState instances are equal and both Event instances are intended for the same Session that registerd the EventListener.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this Event is equal to another object.


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