public final class ChangeSet
extends java.lang.Object
Those items are parent paths, parent node names, parent node types and (child) properties. 'Changed' refers to any of add, remove, change (where applicable).
A ChangeSet is piggybacked on a CommitInfo in the CommitContext and can be used by (downstream) Observers for their convenience.
To limit memory usage, the ChangeSet has a limit on the number of items, each, that it collects. If one of those items reach the limit this is called an 'overflow' and the corresponding item type is marked as having 'overflown'. Downstream Observers should thus check if a particular item has overflown or not - this is indicated with null as the return value of the corresponding getters (while empty means: not overflown but nothing changed of that type).
Also, the ChangeSet carries a 'maxPathDepth' which is the depth of the path up until which paths have been collected. Thus any path that is longer than this 'maxPathDepth' will be cut off and only reported up to that max depth. Downstream Observers should thus inspect the 'maxPathDepth' and compare actual path depths with it in order to find out if any child paths have been cut off.
Naming: note that path, node name and node types all refer to the *parent* of a change. While properties naturally are leafs.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMIT_CONTEXT_OBSERVATION_CHANGESET |
Modifier and Type | Method and Description |
---|---|
boolean |
anyOverflow() |
java.lang.String |
asString() |
boolean |
doesHitMaxPathDepth() |
boolean |
equals(java.lang.Object o) |
static ChangeSet |
fromString(java.lang.String json) |
@Nullable java.util.Set<java.lang.String> |
getAllNodeTypes() |
int |
getMaxPrefilterPathDepth() |
@Nullable java.util.Set<java.lang.String> |
getParentNodeNames() |
@Nullable java.util.Set<java.lang.String> |
getParentNodeTypes() |
@Nullable java.util.Set<java.lang.String> |
getParentPaths() |
@Nullable java.util.Set<java.lang.String> |
getPropertyNames() |
int |
hashCode() |
java.lang.String |
toString() |
public static final java.lang.String COMMIT_CONTEXT_OBSERVATION_CHANGESET
public java.lang.String toString()
toString
in class java.lang.Object
public boolean doesHitMaxPathDepth()
@Nullable public @Nullable java.util.Set<java.lang.String> getParentPaths()
@Nullable public @Nullable java.util.Set<java.lang.String> getParentNodeNames()
@Nullable public @Nullable java.util.Set<java.lang.String> getParentNodeTypes()
@Nullable public @Nullable java.util.Set<java.lang.String> getPropertyNames()
public int getMaxPrefilterPathDepth()
@Nullable public @Nullable java.util.Set<java.lang.String> getAllNodeTypes()
public boolean anyOverflow()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String asString()
public static ChangeSet fromString(java.lang.String json)
Copyright © 2010 - 2020 Adobe. All Rights Reserved