Class EventImpl
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.EventImpl
-
- All Implemented Interfaces:
java.io.Serializable,Event
public class EventImpl extends java.lang.Object implements Event, java.io.Serializable
EventImplimplements a serializable SPIEvent.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.spi.Event
ALL_TYPES, NODE_ADDED, NODE_MOVED, NODE_REMOVED, PERSIST, PROPERTY_ADDED, PROPERTY_CHANGED, PROPERTY_REMOVED
-
-
Constructor Summary
Constructors Constructor Description EventImpl(int type, Path path, ItemId itemId, NodeId parentId, Name primaryNodeTypeName, Name[] mixinTypeNames, java.lang.String userId)Deprecated.EventImpl(int type, Path path, ItemId itemId, NodeId parentId, Name primaryNodeTypeName, Name[] mixinTypeNames, java.lang.String userId, java.lang.String userData, long timestamp, java.util.Map<Name,QValue> info)Creates a new serializable event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDate()Returns the date when the change was persisted that caused this event.java.util.Map<Name,QValue>getInfo()Returns the information map associated with this event.ItemIdgetItemId()Name[]getMixinTypeNames()NodeIdgetParentId()PathgetPath()NamegetPrimaryNodeTypeName()intgetType()Returns the type of this event: a constant defined by this interface.java.lang.StringgetUserData()Returns the user data.java.lang.StringgetUserID()Returns the user ID connected with this event.java.lang.StringtoString()
-
-
-
Method Detail
-
getType
public int getType()
Returns the type of this event: a constant defined by this interface. One of:
-
getPath
public Path getPath()
-
getItemId
public ItemId getItemId()
-
getParentId
public NodeId getParentId()
- Specified by:
getParentIdin interfaceEvent- Returns:
- the id of the parent node of the affected item.
-
getPrimaryNodeTypeName
public Name getPrimaryNodeTypeName()
- Specified by:
getPrimaryNodeTypeNamein interfaceEvent- Returns:
- the name of the primary node type of the 'associated' node of this event.
- See Also:
ObservationManager.addEventListener(javax.jcr.observation.EventListener, int, java.lang.String, boolean, java.lang.String[], java.lang.String[], boolean)
-
getMixinTypeNames
public Name[] getMixinTypeNames()
- Specified by:
getMixinTypeNamesin interfaceEvent- Returns:
- the names of the mixin types of the 'associated' node of this event.
- See Also:
ObservationManager.addEventListener(javax.jcr.observation.EventListener, int, java.lang.String, boolean, java.lang.String[], java.lang.String[], boolean)
-
getUserID
public java.lang.String getUserID()
Returns the user ID connected with this event. This is the string returned by getUserID of the session that caused the event.
-
getInfo
public java.util.Map<Name,QValue> getInfo() throws javax.jcr.RepositoryException
Returns the information map associated with this event.
-
getUserData
public java.lang.String getUserData()
Returns the user data.- Specified by:
getUserDatain interfaceEvent- Returns:
- the user data
- See Also:
Event.getUserData()
-
getDate
public long getDate() throws javax.jcr.RepositoryExceptionReturns the date when the change was persisted that caused this event.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-