Class EventTypeFilter
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.observation.filter.EventTypeFilter
-
- All Implemented Interfaces:
EventFilter
public class EventTypeFilter extends java.lang.Object implements EventFilter
EventTypeFilter
filters based on event types as defined byObservationManager.addEventListener()
.
-
-
Constructor Summary
Constructors Constructor Description EventTypeFilter(int eventTypes)
Create a newFilter
instance that includes all events matching theeventTypes
bit mask.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventFilter
create(java.lang.String name, NodeState before, NodeState after)
Factory for creating a filter instance for the given child nodeboolean
includeAdd(java.lang.String name, NodeState after)
Include an added nodeboolean
includeAdd(PropertyState after)
Include an added propertyboolean
includeChange(PropertyState before, PropertyState after)
Include a changed propertyboolean
includeDelete(java.lang.String name, NodeState before)
Include a deleted nodeboolean
includeDelete(PropertyState before)
Include a deleted propertyboolean
includeMove(java.lang.String sourcePath, java.lang.String name, NodeState moved)
Include a moved nodeboolean
includeReorder(java.lang.String destName, java.lang.String name, NodeState reordered)
Include a reordered node
-
-
-
Constructor Detail
-
EventTypeFilter
public EventTypeFilter(int eventTypes)
Create a newFilter
instance that includes all events matching theeventTypes
bit mask. That is, a given event is included if the corresponding bit ineventType
is set.- Parameters:
eventTypes
- bit mask encoding the types of events to include- See Also:
Event
-
-
Method Detail
-
includeAdd
public boolean includeAdd(PropertyState after)
Description copied from interface:EventFilter
Include an added property- Specified by:
includeAdd
in interfaceEventFilter
- Parameters:
after
- added property- Returns:
true
if the property should be included
-
includeChange
public boolean includeChange(PropertyState before, PropertyState after)
Description copied from interface:EventFilter
Include a changed property- Specified by:
includeChange
in interfaceEventFilter
- Parameters:
before
- property before the changeafter
- property after the change- Returns:
true
if the property should be included
-
includeDelete
public boolean includeDelete(PropertyState before)
Description copied from interface:EventFilter
Include a deleted property- Specified by:
includeDelete
in interfaceEventFilter
- Parameters:
before
- deleted property- Returns:
true
if the property should be included
-
includeAdd
public boolean includeAdd(java.lang.String name, NodeState after)
Description copied from interface:EventFilter
Include an added node- Specified by:
includeAdd
in interfaceEventFilter
- Parameters:
name
- name of the nodeafter
- added node- Returns:
true
if the node should be included
-
includeDelete
public boolean includeDelete(java.lang.String name, NodeState before)
Description copied from interface:EventFilter
Include a deleted node- Specified by:
includeDelete
in interfaceEventFilter
- Parameters:
name
- name of the nodebefore
- deleted node- Returns:
true
if the node should be included
-
includeMove
public boolean includeMove(java.lang.String sourcePath, java.lang.String name, NodeState moved)
Description copied from interface:EventFilter
Include a moved node- Specified by:
includeMove
in interfaceEventFilter
- Parameters:
sourcePath
- source path of the move operationname
- name of the moved nodemoved
- the moved node- Returns:
true
if the node should be included
-
includeReorder
public boolean includeReorder(java.lang.String destName, java.lang.String name, NodeState reordered)
Description copied from interface:EventFilter
Include a reordered node- Specified by:
includeReorder
in interfaceEventFilter
- Parameters:
destName
- name of theorderBefore()
destination nodename
- name of the reordered nodereordered
- the reordered node- Returns:
true
if the node should be included
-
create
public EventFilter create(java.lang.String name, NodeState before, NodeState after)
Description copied from interface:EventFilter
Factory for creating a filter instance for the given child node- Specified by:
create
in interfaceEventFilter
- Parameters:
name
- name of the child nodebefore
- before state of the child nodeafter
- after state of the child node- Returns:
- filter instance for filtering the child node or
null
to exclude the sub tree rooted at this child node.
-
-