Class DefaultEventHandler
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.observation.DefaultEventHandler
-
- All Implemented Interfaces:
EventHandler
- Direct Known Subclasses:
FilteredHandler
public class DefaultEventHandler extends java.lang.Object implements EventHandler
Default implementation ofEventHandler
that does nothing.
-
-
Field Summary
Fields Modifier and Type Field Description static EventHandler
INSTANCE
-
Constructor Summary
Constructors Constructor Description DefaultEventHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enter(NodeState before, NodeState after)
Called before the given before and after states are compared.EventHandler
getChildHandler(java.lang.String name, NodeState before, NodeState after)
Returns a handler of events within the given child node, ornull
if changes within that child are not to be processed.void
leave(NodeState before, NodeState after)
Called after the given before and after states are compared.void
nodeAdded(java.lang.String name, NodeState after)
Notification for an added nodevoid
nodeDeleted(java.lang.String name, NodeState before)
Notification for a deleted nodevoid
nodeMoved(java.lang.String sourcePath, java.lang.String name, NodeState moved)
Notification for a moved nodevoid
nodeReordered(java.lang.String destName, java.lang.String name, NodeState reordered)
Notification for a reordered nodevoid
propertyAdded(PropertyState after)
Notification for an added propertyvoid
propertyChanged(PropertyState before, PropertyState after)
Notification for a changed propertyvoid
propertyDeleted(PropertyState before)
Notification for a deleted property
-
-
-
Field Detail
-
INSTANCE
public static EventHandler INSTANCE
-
-
Method Detail
-
enter
public void enter(NodeState before, NodeState after)
Description copied from interface:EventHandler
Called before the given before and after states are compared. The implementation can use this method to initialize any internal state needed for processing the results of the comparison.- Specified by:
enter
in interfaceEventHandler
- Parameters:
before
- before state, non-existent if this node was addedafter
- after state, non-existent if this node was removed
-
leave
public void leave(NodeState before, NodeState after)
Description copied from interface:EventHandler
Called after the given before and after states are compared. The implementation can use this method to post-process information collected during the content diff.- Specified by:
leave
in interfaceEventHandler
- Parameters:
before
- before state, non-existent if this node was addedafter
- after state, non-existent if this node was removed
-
getChildHandler
public EventHandler getChildHandler(java.lang.String name, NodeState before, NodeState after)
Description copied from interface:EventHandler
Returns a handler of events within the given child node, ornull
if changes within that child are not to be processed.- Specified by:
getChildHandler
in interfaceEventHandler
- Parameters:
name
- name of the child nodebefore
- before state of the child node, possibly non-existentafter
- after state of the child node, possibly non-existent- Returns:
this
-
propertyAdded
public void propertyAdded(PropertyState after)
Description copied from interface:EventHandler
Notification for an added property- Specified by:
propertyAdded
in interfaceEventHandler
- Parameters:
after
- added property
-
propertyChanged
public void propertyChanged(PropertyState before, PropertyState after)
Description copied from interface:EventHandler
Notification for a changed property- Specified by:
propertyChanged
in interfaceEventHandler
- Parameters:
before
- property before the changeafter
- property after the change
-
propertyDeleted
public void propertyDeleted(PropertyState before)
Description copied from interface:EventHandler
Notification for a deleted property- Specified by:
propertyDeleted
in interfaceEventHandler
- Parameters:
before
- deleted property
-
nodeAdded
public void nodeAdded(java.lang.String name, NodeState after)
Description copied from interface:EventHandler
Notification for an added node- Specified by:
nodeAdded
in interfaceEventHandler
- Parameters:
name
- name of the nodeafter
- added node
-
nodeDeleted
public void nodeDeleted(java.lang.String name, NodeState before)
Description copied from interface:EventHandler
Notification for a deleted node- Specified by:
nodeDeleted
in interfaceEventHandler
- Parameters:
name
- name of the deleted nodebefore
- deleted node
-
nodeMoved
public void nodeMoved(java.lang.String sourcePath, java.lang.String name, NodeState moved)
Description copied from interface:EventHandler
Notification for a moved node- Specified by:
nodeMoved
in interfaceEventHandler
- Parameters:
sourcePath
- source of the moved nodename
- name of the moved nodemoved
- moved node
-
nodeReordered
public void nodeReordered(java.lang.String destName, java.lang.String name, NodeState reordered)
Description copied from interface:EventHandler
Notification for a reordered node- Specified by:
nodeReordered
in interfaceEventHandler
- Parameters:
destName
- name of theorderBefore()
destination nodename
- name of the moved nodereordered
- moved node
-
-