Class ChangeCollectorProvider
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.commit.ValidatorProvider
-
- org.apache.jackrabbit.oak.plugins.observation.ChangeCollectorProvider
-
- All Implemented Interfaces:
EditorProvider
public class ChangeCollectorProvider extends ValidatorProvider
A ChangeCollectorProvider can be hooked into Oak thus enabling the collection of ChangeSets of changed items of a commit, which downstream Observers can then use at their convenience.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMMIT_CONTEXT_OBSERVATION_CHANGESETstatic StringTYPE
-
Constructor Summary
Constructors Constructor Description ChangeCollectorProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate(org.apache.jackrabbit.oak.plugins.observation.ChangeCollectorProvider.Configuration config)protected intgetMaxItems()FOR TESTING-ONLYprotected intgetMaxPathDepth()FOR TESTING-ONLYprotected ValidatorgetRootValidator(NodeState before, NodeState after, CommitInfo info)Returns a validator for checking the changes between the given two root states.protected voidmodified(org.apache.jackrabbit.oak.plugins.observation.ChangeCollectorProvider.Configuration config)protected voidsetMaxItems(int maxItems)FOR TESTING-ONLYprotected voidsetMaxPathDepth(int maxPathDepth)FOR TESTING-ONLY-
Methods inherited from class org.apache.jackrabbit.oak.spi.commit.ValidatorProvider
getRootEditor
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
COMMIT_CONTEXT_OBSERVATION_CHANGESET
public static final String COMMIT_CONTEXT_OBSERVATION_CHANGESET
- See Also:
- Constant Field Values
-
-
Method Detail
-
activate
protected void activate(org.apache.jackrabbit.oak.plugins.observation.ChangeCollectorProvider.Configuration config)
-
modified
protected void modified(org.apache.jackrabbit.oak.plugins.observation.ChangeCollectorProvider.Configuration config)
-
setMaxPathDepth
protected void setMaxPathDepth(int maxPathDepth)
FOR TESTING-ONLY
-
getMaxPathDepth
protected int getMaxPathDepth()
FOR TESTING-ONLY
-
setMaxItems
protected void setMaxItems(int maxItems)
FOR TESTING-ONLY
-
getMaxItems
protected int getMaxItems()
FOR TESTING-ONLY
-
getRootValidator
protected Validator getRootValidator(NodeState before, NodeState after, CommitInfo info)
Description copied from class:ValidatorProviderReturns a validator for checking the changes between the given two root states.- Specified by:
getRootValidatorin classValidatorProvider- Parameters:
before- original root stateafter- modified root stateinfo- metadata about this commit- Returns:
- validator for checking the modifications,
or
nullif this validator is not needed for this commit
-
-