Class CrossMountReferenceValidator
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.commit.DefaultValidator
-
- org.apache.jackrabbit.oak.composite.CrossMountReferenceValidator
-
public class CrossMountReferenceValidator extends DefaultValidator
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description CrossMountReferenceValidator(NodeState root, MountInfoProvider mip, boolean failOnDetection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidatorchildNodeAdded(java.lang.String name, NodeState after)Validate an added nodeValidatorchildNodeChanged(java.lang.String name, NodeState before, NodeState after)Validate a changed nodevoidenter(NodeState before, NodeState after)Called before the given before and after states are compared.voidleave(NodeState before, NodeState after)Called after the given before and after states are compared.voidpropertyAdded(PropertyState after)Validate an added propertyvoidpropertyChanged(PropertyState before, PropertyState after)Validate a changed property-
Methods inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
childNodeDeleted, propertyDeleted
-
-
-
-
Constructor Detail
-
CrossMountReferenceValidator
public CrossMountReferenceValidator(NodeState root, MountInfoProvider mip, boolean failOnDetection)
-
-
Method Detail
-
enter
public void enter(NodeState before, NodeState after) throws CommitFailedException
Description copied from interface:EditorCalled before the given before and after states are compared. The implementation can use this method to initialize any internal state needed for processing the results of the comparison. For example an implementation could look up the effective node type of the after state to know what constraints to apply to on the content changes.- Specified by:
enterin interfaceEditor- Overrides:
enterin classDefaultValidator- 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
-
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 classDefaultValidator- 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
-
propertyAdded
public void propertyAdded(PropertyState after) throws CommitFailedException
Description copied from interface:ValidatorValidate an added property- Specified by:
propertyAddedin interfaceEditor- Specified by:
propertyAddedin interfaceValidator- Overrides:
propertyAddedin classDefaultValidator- Parameters:
after- the added property- Throws:
CommitFailedException- if validation fails.
-
propertyChanged
public void propertyChanged(PropertyState before, PropertyState after) throws CommitFailedException
Description copied from interface:ValidatorValidate a changed property- Specified by:
propertyChangedin interfaceEditor- Specified by:
propertyChangedin interfaceValidator- Overrides:
propertyChangedin classDefaultValidator- Parameters:
before- the original propertyafter- the changed property- Throws:
CommitFailedException- if validation fails.
-
childNodeAdded
public Validator childNodeAdded(java.lang.String name, NodeState after) throws CommitFailedException
Description copied from interface:ValidatorValidate an added node- Specified by:
childNodeAddedin interfaceEditor- Specified by:
childNodeAddedin interfaceValidator- Overrides:
childNodeAddedin classDefaultValidator- Parameters:
name- the name of the added nodeafter- the added node- Returns:
- a
Validatorforafterornullif validation should not decent into the subtree rooted atafter. - Throws:
CommitFailedException- if validation fails.
-
childNodeChanged
public Validator childNodeChanged(java.lang.String name, NodeState before, NodeState after) throws CommitFailedException
Description copied from interface:ValidatorValidate a changed node- Specified by:
childNodeChangedin interfaceEditor- Specified by:
childNodeChangedin interfaceValidator- Overrides:
childNodeChangedin classDefaultValidator- Parameters:
name- the name of the changed nodebefore- the original nodeafter- the changed node- Returns:
- a
Validatorforafterornullif validation should not decent into the subtree rooted atafter. - Throws:
CommitFailedException- if validation fails.
-
-