Class ReferenceChangeTracker
java.lang.Object
org.apache.jackrabbit.oak.spi.xml.ReferenceChangeTracker
Helper class used to keep track of uuid mappings (e.g. if the uuid of an
imported or copied node is mapped to a new uuid) and processed (e.g. imported
or copied) reference properties that might need to be adjusted depending on
the UUID mapping resulting from the import.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Resets all internal state.@Nullable StringReturns the new node id to whicholdUUIDhas been mapped ornullif no such mapping exists.Returns an iterator over all processed reference properties.voidprocessedReference(@NotNull Object refProp) Store the given reference property for later retrieval usinggetProcessedReferences().voidStore the given id mapping for later lookup usingget(String).booleanremoveReferences(List<Object> processedReferences) Remove the given references that have already been processed from the references list.
-
Constructor Details
-
ReferenceChangeTracker
public ReferenceChangeTracker()
-
-
Method Details
-
get
Returns the new node id to whicholdUUIDhas been mapped ornullif no such mapping exists.- Parameters:
oldUUID- old node id- Returns:
- mapped new id or
nullif no such mapping exists - See Also:
-
put
Store the given id mapping for later lookup usingget(String).- Parameters:
oldUUID- old node idnewUUID- new node id
-
clear
public void clear()Resets all internal state. -
processedReference
Store the given reference property for later retrieval usinggetProcessedReferences().- Parameters:
refProp- reference property
-
getProcessedReferences
Returns an iterator over all processed reference properties.- Returns:
- an iterator over all processed reference properties
- See Also:
-
removeReferences
Remove the given references that have already been processed from the references list.- Parameters:
processedReferences- List of processed references to be removed.- Returns:
trueif the internal list of references changed.
-