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 ofEventHandlerthat does nothing.
-
-
Field Summary
Fields Modifier and Type Field Description static EventHandlerINSTANCE
-
Constructor Summary
Constructors Constructor Description DefaultEventHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenter(NodeState before, NodeState after)Called before the given before and after states are compared.EventHandlergetChildHandler(java.lang.String name, NodeState before, NodeState after)Returns a handler of events within the given child node, ornullif changes within that child are not to be processed.voidleave(NodeState before, NodeState after)Called after the given before and after states are compared.voidnodeAdded(java.lang.String name, NodeState after)Notification for an added nodevoidnodeDeleted(java.lang.String name, NodeState before)Notification for a deleted nodevoidnodeMoved(java.lang.String sourcePath, java.lang.String name, NodeState moved)Notification for a moved nodevoidnodeReordered(java.lang.String destName, java.lang.String name, NodeState reordered)Notification for a reordered nodevoidpropertyAdded(PropertyState after)Notification for an added propertyvoidpropertyChanged(PropertyState before, PropertyState after)Notification for a changed propertyvoidpropertyDeleted(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:EventHandlerCalled 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:
enterin 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:EventHandlerCalled 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:
leavein 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:EventHandlerReturns a handler of events within the given child node, ornullif changes within that child are not to be processed.- Specified by:
getChildHandlerin 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:EventHandlerNotification for an added property- Specified by:
propertyAddedin interfaceEventHandler- Parameters:
after- added property
-
propertyChanged
public void propertyChanged(PropertyState before, PropertyState after)
Description copied from interface:EventHandlerNotification for a changed property- Specified by:
propertyChangedin interfaceEventHandler- Parameters:
before- property before the changeafter- property after the change
-
propertyDeleted
public void propertyDeleted(PropertyState before)
Description copied from interface:EventHandlerNotification for a deleted property- Specified by:
propertyDeletedin interfaceEventHandler- Parameters:
before- deleted property
-
nodeAdded
public void nodeAdded(java.lang.String name, NodeState after)Description copied from interface:EventHandlerNotification for an added node- Specified by:
nodeAddedin interfaceEventHandler- Parameters:
name- name of the nodeafter- added node
-
nodeDeleted
public void nodeDeleted(java.lang.String name, NodeState before)Description copied from interface:EventHandlerNotification for a deleted node- Specified by:
nodeDeletedin 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:EventHandlerNotification for a moved node- Specified by:
nodeMovedin 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:EventHandlerNotification for a reordered node- Specified by:
nodeReorderedin interfaceEventHandler- Parameters:
destName- name of theorderBefore()destination nodename- name of the moved nodereordered- moved node
-
-