public interface CommitHook
A commit hook can throw a CommitFailedException
for a particular
change to prevent it from being persisted, or it can modify the changes
for example to update an in-content index or to add auto-generated content.
Note that instead of implementing this interface directly, most commit editors and validators are better expressed as implementations of the more specific extension interfaces defined in this package.
Modifier and Type | Method and Description |
---|---|
@NotNull NodeState |
processCommit(NodeState before,
NodeState after,
CommitInfo info)
Validates and/or modifies the given content change before it gets
persisted.
|
@NotNull @NotNull NodeState processCommit(NodeState before, NodeState after, CommitInfo info) throws CommitFailedException
before
- content tree before the commitafter
- content tree prepared for the commitinfo
- metadata associated with this commitCommitFailedException
- if the commit should be rejectedCopyright © 2010 - 2020 Adobe. All Rights Reserved