Class EditorHook
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.commit.EditorHook
-
- All Implemented Interfaces:
CommitHook
public class EditorHook extends java.lang.Object implements CommitHook
This commit hook implementation processes changes to be committed using theEditorinstance provided by theEditorProviderpassed to the constructor.- Since:
- Oak 0.7
- See Also:
- Commit editors
-
-
Constructor Summary
Constructors Constructor Description EditorHook(@NotNull EditorProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull NodeStateprocessCommit(@NotNull NodeState before, @NotNull NodeState after, @NotNull CommitInfo info)Validates and/or modifies the given content change before it gets persisted.java.lang.StringtoString()
-
-
-
Constructor Detail
-
EditorHook
public EditorHook(@NotNull @NotNull EditorProvider provider)
-
-
Method Detail
-
processCommit
@NotNull public @NotNull NodeState processCommit(@NotNull @NotNull NodeState before, @NotNull @NotNull NodeState after, @NotNull @NotNull CommitInfo info) throws CommitFailedException
Description copied from interface:CommitHookValidates and/or modifies the given content change before it gets persisted.- Specified by:
processCommitin interfaceCommitHook- Parameters:
before- content tree before the commitafter- content tree prepared for the commitinfo- metadata associated with this commit- Returns:
- content tree to be committed
- Throws:
CommitFailedException- if the commit should be rejected
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-