public class EmptyHook extends java.lang.Object implements CommitHook
INSTANCE
instance can be used as a "null object"
in cases where another commit hook has not been configured, thus avoiding
the need for extra code for such cases.CommitHook
interface. For example if it is later decided that
new arguments are needed in the hook methods, this class is guaranteed
to implement any new method signatures in a way that falls gracefully
back to any earlier behavior.Modifier and Type | Field and Description |
---|---|
static CommitHook |
INSTANCE
Static instance of this class, useful as a "null object".
|
Constructor and Description |
---|
EmptyHook() |
Modifier and Type | Method and Description |
---|---|
NodeState |
processCommit(NodeState before,
NodeState after,
CommitInfo info)
Validates and/or modifies the given content change before it gets
persisted.
|
public static final CommitHook INSTANCE
public NodeState processCommit(NodeState before, NodeState after, CommitInfo info) throws CommitFailedException
CommitHook
processCommit
in interface CommitHook
before
- content tree before the commitafter
- content tree prepared for the commitinfo
- metadata associated with this commitCommitFailedException
- if the commit should be rejected"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"