Class EventImpl
- java.lang.Object
-
- org.apache.jackrabbit.core.observation.EventImpl
-
- All Implemented Interfaces:
Event,JackrabbitEvent,AdditionalEventInfo
public final class EventImpl extends Object implements JackrabbitEvent, AdditionalEventInfo, Event
Implementation of theEventand theJackrabbitEventinterface.
-
-
Field Summary
-
Fields inherited from interface javax.jcr.observation.Event
NODE_ADDED, NODE_MOVED, NODE_REMOVED, PERSIST, PROPERTY_ADDED, PROPERTY_CHANGED, PROPERTY_REMOVED
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Returnstrueif thisEventis equal to another object.NodeIdgetChildId()Returns the id of a child node operation.longgetDate()StringgetIdentifier()Map<String,String>getInfo()Set<Name>getMixinTypeNames()NodeIdgetParentId()Returns the uuid of the parent node.StringgetPath()NamegetPrimaryNodeTypeName()PathgetQPath()Returns thePathof this event.ObjectgetSessionAttribute(String name)intgetType()StringgetUserData()StringgetUserID()inthashCode()booleanisExternal()Return a flag indicating whether this is an externally generated event.booleanisShareableChildNode()Returns a flag indicating whether the child node of this event is a shareable node.StringtoString()Returns a String representation of thisEvent.
-
-
-
Method Detail
-
getPath
public String getPath() throws RepositoryException
- Specified by:
getPathin interfaceEvent- Throws:
RepositoryException
-
getUserData
public String getUserData()
- Specified by:
getUserDatain interfaceEvent
-
getIdentifier
public String getIdentifier() throws RepositoryException
- Specified by:
getIdentifierin interfaceEvent- Throws:
RepositoryException
-
getInfo
public Map<String,String> getInfo() throws RepositoryException
- Specified by:
getInfoin interfaceEvent- Throws:
RepositoryException
-
getQPath
public Path getQPath() throws RepositoryException
Returns thePathof this event.- Returns:
- path or
nullwhen no path is associated with the event - 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 thisEventwas generated for a property operation this method returnsnull.- Returns:
- the id of a child node operation.
-
isShareableChildNode
public boolean isShareableChildNode()
Returns a flag indicating whether the child node of this event is a shareable node. Only applies to node added/removed events.- Returns:
truefor a shareable child node,falseotherwise.
-
isExternal
public boolean isExternal()
Return a flag indicating whether this is an externally generated event.- Specified by:
isExternalin interfaceJackrabbitEvent- Returns:
trueif this is an external event;falseotherwise- See Also:
JackrabbitEvent.isExternal()
-
getPrimaryNodeTypeName
public Name getPrimaryNodeTypeName()
- Specified by:
getPrimaryNodeTypeNamein interfaceAdditionalEventInfo- Returns:
- the primary node type of the node associated with the event
- See Also:
AdditionalEventInfo.getPrimaryNodeTypeName()
-
getMixinTypeNames
public Set<Name> getMixinTypeNames()
- Specified by:
getMixinTypeNamesin interfaceAdditionalEventInfo- Returns:
- the mixin node types of the node associated with the event
- See Also:
AdditionalEventInfo.getMixinTypeNames()
-
getSessionAttribute
public Object getSessionAttribute(String name)
- Specified by:
getSessionAttributein interfaceAdditionalEventInfo- Returns:
- the specified session attribute
-
toString
public String toString()
Returns a String representation of thisEvent.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObject- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
Returnstrueif thisEventis equal to another object.Two
Eventinstances are equal if their respectiveEventStateinstances are equal and bothEventinstances are intended for the sameSessionthat registerd theEventListener.
-
-