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 theEvent
and theJackrabbitEvent
interface.
-
-
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 boolean
equals(Object obj)
Returnstrue
if thisEvent
is equal to another object.NodeId
getChildId()
Returns the id of a child node operation.long
getDate()
String
getIdentifier()
Map<String,String>
getInfo()
Set<Name>
getMixinTypeNames()
NodeId
getParentId()
Returns the uuid of the parent node.String
getPath()
Name
getPrimaryNodeTypeName()
Path
getQPath()
Returns thePath
of this event.Object
getSessionAttribute(String name)
int
getType()
String
getUserData()
String
getUserID()
int
hashCode()
boolean
isExternal()
Return a flag indicating whether this is an externally generated event.boolean
isShareableChildNode()
Returns a flag indicating whether the child node of this event is a shareable node.String
toString()
Returns a String representation of thisEvent
.
-
-
-
Method Detail
-
getPath
public String getPath() throws RepositoryException
- Specified by:
getPath
in interfaceEvent
- Throws:
RepositoryException
-
getUserData
public String getUserData()
- Specified by:
getUserData
in interfaceEvent
-
getIdentifier
public String getIdentifier() throws RepositoryException
- Specified by:
getIdentifier
in interfaceEvent
- Throws:
RepositoryException
-
getInfo
public Map<String,String> getInfo() throws RepositoryException
- Specified by:
getInfo
in interfaceEvent
- Throws:
RepositoryException
-
getQPath
public Path getQPath() throws RepositoryException
Returns thePath
of this event.- Returns:
- path or
null
when 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 thisEvent
was 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:
true
for a shareable child node,false
otherwise.
-
isExternal
public boolean isExternal()
Return a flag indicating whether this is an externally generated event.- Specified by:
isExternal
in interfaceJackrabbitEvent
- Returns:
true
if this is an external event;false
otherwise- See Also:
JackrabbitEvent.isExternal()
-
getPrimaryNodeTypeName
public Name getPrimaryNodeTypeName()
- Specified by:
getPrimaryNodeTypeName
in interfaceAdditionalEventInfo
- Returns:
- the primary node type of the node associated with the event
- See Also:
AdditionalEventInfo.getPrimaryNodeTypeName()
-
getMixinTypeNames
public Set<Name> getMixinTypeNames()
- Specified by:
getMixinTypeNames
in 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:
getSessionAttribute
in interfaceAdditionalEventInfo
- Returns:
- the specified session attribute
-
toString
public String toString()
Returns a String representation of thisEvent
.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
Returnstrue
if thisEvent
is equal to another object.Two
Event
instances are equal if their respectiveEventState
instances are equal and bothEvent
instances are intended for the sameSession
that registerd theEventListener
.
-
-