Package org.apache.jackrabbit.spi
Interface Event
- 
- All Known Implementing Classes:
 EventImpl
public interface EventEventis similar to the regular JCR Event and adds additional information about the affected item. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static intALL_TYPESConstant for observation listener interested in all types of events.static intNODE_ADDEDAn event of this type is generated when a node is added.static intNODE_MOVEDAn event of this type is generated when a node is moved.static intNODE_REMOVEDAn event of this type is generated when a node is removed.static intPERSISTIf event bundling is supported, this event is used to indicate a bundle boundary within the event journal.static intPROPERTY_ADDEDAn event of this type is generated when a property is added.static intPROPERTY_CHANGEDAn event of this type is generated when a property is changed.static intPROPERTY_REMOVEDAn event of this type is generated when a property is removed. 
- 
Method Summary
All Methods Instance Methods Abstract 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. 
 - 
 
- 
- 
Field Detail
- 
NODE_ADDED
static final int NODE_ADDED
An event of this type is generated when a node is added.- See Also:
 - Constant Field Values
 
 
- 
NODE_REMOVED
static final int NODE_REMOVED
An event of this type is generated when a node is removed.- See Also:
 - Constant Field Values
 
 
- 
PROPERTY_ADDED
static final int PROPERTY_ADDED
An event of this type is generated when a property is added.- See Also:
 - Constant Field Values
 
 
- 
PROPERTY_REMOVED
static final int PROPERTY_REMOVED
An event of this type is generated when a property is removed.- See Also:
 - Constant Field Values
 
 
- 
PROPERTY_CHANGED
static final int PROPERTY_CHANGED
An event of this type is generated when a property is changed.- See Also:
 - Constant Field Values
 
 
- 
NODE_MOVED
static final int NODE_MOVED
An event of this type is generated when a node is moved.- Since:
 - JCR 2.0
 - See Also:
 - Constant Field Values
 
 
- 
PERSIST
static final int PERSIST
If event bundling is supported, this event is used to indicate a bundle boundary within the event journal.- Since:
 - JCR 2.0
 - See Also:
 - Constant Field Values
 
 
- 
ALL_TYPES
static final int ALL_TYPES
Constant for observation listener interested in all types of events.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getType
int getType()
Returns the type of this event: a constant defined by this interface. One of:- Returns:
 - the type of this event.
 
 
- 
getPath
Path getPath()
- Returns:
 - the path of the affected item. E.g. the added/removed node or the property that was added/removed/changed.
 
 
- 
getItemId
ItemId getItemId()
- Returns:
 - the id of the affected item.
 
 
- 
getParentId
NodeId getParentId()
- Returns:
 - the id of the parent node of the affected item.
 
 
- 
getPrimaryNodeTypeName
Name getPrimaryNodeTypeName()
- 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
Name[] getMixinTypeNames()
- 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
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.- Returns:
 - a 
String. 
 
- 
getInfo
java.util.Map<Name,QValue> getInfo() throws javax.jcr.RepositoryException
Returns the information map associated with this event.- Returns:
 - A 
Mapcontaining parameter information. - Throws:
 javax.jcr.RepositoryException- if an error occurs.- Since:
 - JCR 2.0
 - See Also:
 Event.getInfo()
 
- 
getUserData
java.lang.String getUserData()
Returns the user data.- Returns:
 - the user data
 - Since:
 - JCR 2.0
 - See Also:
 Event.getUserData()
 
- 
getDate
long getDate() throws javax.jcr.RepositoryExceptionReturns the date when the change was persisted that caused this event.- Returns:
 - the date when the change was persisted that caused this event.
 - Throws:
 javax.jcr.RepositoryException- if an error occurs.- Since:
 - JCR 2.0
 - See Also:
 Event.getDate()
 
 - 
 
 -