Class SubtreeEditor
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.commit.DefaultEditor
-
- org.apache.jackrabbit.oak.spi.commit.SubtreeEditor
-
- All Implemented Interfaces:
Editor
public class SubtreeEditor extends DefaultEditor
Editor wrapper that passes only changes in the specified subtree to the given delegate editor.- Since:
- Oak 0.7
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultEditor
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description SubtreeEditor(Editor editor, java.lang.String... path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable Editor
childNodeAdded(java.lang.String name, NodeState after)
Processes an added child node.@Nullable Editor
childNodeChanged(java.lang.String name, NodeState before, NodeState after)
Processes a changed child node.@Nullable Editor
childNodeDeleted(java.lang.String name, NodeState before)
Processes a deleted child node.-
Methods inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultEditor
enter, leave, propertyAdded, propertyChanged, propertyDeleted
-
-
-
-
Constructor Detail
-
SubtreeEditor
public SubtreeEditor(Editor editor, java.lang.String... path)
-
-
Method Detail
-
childNodeAdded
@Nullable public @Nullable Editor childNodeAdded(java.lang.String name, NodeState after)
Description copied from interface:Editor
Processes an added child node.- Specified by:
childNodeAdded
in interfaceEditor
- Overrides:
childNodeAdded
in classDefaultEditor
- Parameters:
name
- name of the added nodeafter
- the added child node- Returns:
- an editor for processing the subtree below the added node,
or
null
if the subtree does not need processing
-
childNodeChanged
@Nullable public @Nullable Editor childNodeChanged(java.lang.String name, NodeState before, NodeState after)
Description copied from interface:Editor
Processes a changed child node. This method gets called for all child nodes that may contain changes between the before and after states.- Specified by:
childNodeChanged
in interfaceEditor
- Overrides:
childNodeChanged
in classDefaultEditor
- Parameters:
name
- name of the changed nodebefore
- child node before the changeafter
- child node after the change- Returns:
- an editor for processing the subtree below the added node,
or
null
if the subtree does not need processing
-
childNodeDeleted
@Nullable public @Nullable Editor childNodeDeleted(java.lang.String name, NodeState before)
Description copied from interface:Editor
Processes a deleted child node.- Specified by:
childNodeDeleted
in interfaceEditor
- Overrides:
childNodeDeleted
in classDefaultEditor
- Parameters:
name
- name of the deleted nodebefore
- the deleted child node- Returns:
- an editor for processing the subtree below the removed node,
or
null
if the subtree does not need processing
-
-