Class VersionableEditor
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.commit.DefaultEditor
-
- org.apache.jackrabbit.oak.plugins.migration.version.VersionableEditor
-
- All Implemented Interfaces:
Editor
public class VersionableEditor extends DefaultEditor
The VersionableEditor provides two possible ways to handle versionable nodes:- it can copy the version histories of versionable nodes, or
-
it can skip copying version histories and remove the
mix:versionablemixin together with any related properties (seeVersionHistoryUtil.removeVersionProperties(NodeBuilder, TypePredicate)).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVersionableEditor.Provider
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultEditor
INSTANCE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EditorchildNodeAdded(String name, NodeState after)Processes an added child node.EditorchildNodeChanged(String name, NodeState before, NodeState after)Processes a changed child node.EditorchildNodeDeleted(String name, NodeState before)Processes a deleted child node.voidleave(NodeState before, NodeState after)Called after the given before and after states are compared.-
Methods inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultEditor
enter, propertyAdded, propertyChanged, propertyDeleted
-
-
-
-
Method Detail
-
childNodeAdded
public Editor childNodeAdded(String name, NodeState after) throws CommitFailedException
Description copied from interface:EditorProcesses an added child node.- Specified by:
childNodeAddedin interfaceEditor- Overrides:
childNodeAddedin classDefaultEditor- Parameters:
name- name of the added nodeafter- the added child node- Returns:
- an editor for processing the subtree below the added node,
or
nullif the subtree does not need processing - Throws:
CommitFailedException- if processing failed
-
childNodeChanged
public Editor childNodeChanged(String name, NodeState before, NodeState after) throws CommitFailedException
Description copied from interface:EditorProcesses a changed child node. This method gets called for all child nodes that may contain changes between the before and after states.- Specified by:
childNodeChangedin interfaceEditor- Overrides:
childNodeChangedin 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
nullif the subtree does not need processing - Throws:
CommitFailedException- if processing failed
-
childNodeDeleted
public Editor childNodeDeleted(String name, NodeState before) throws CommitFailedException
Description copied from interface:EditorProcesses a deleted child node.- Specified by:
childNodeDeletedin interfaceEditor- Overrides:
childNodeDeletedin classDefaultEditor- Parameters:
name- name of the deleted nodebefore- the deleted child node- Returns:
- an editor for processing the subtree below the removed node,
or
nullif the subtree does not need processing - Throws:
CommitFailedException- if processing failed
-
leave
public void leave(NodeState before, NodeState after) throws CommitFailedException
Description copied from interface:EditorCalled after the given before and after states are compared. The implementation can use this method to post-process information collected during the content diff. For example an implementation that during the diff just recorded the fact that this node was modified in some way could then use this method to trigger an index update based on that modification flag.- Specified by:
leavein interfaceEditor- Overrides:
leavein classDefaultEditor- Parameters:
before- before state, non-existent if this node was addedafter- after state, non-existent if this node was removed- Throws:
CommitFailedException- if this commit should be rejected
-
-