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 TypeMethodDescriptionvoid
clear()
Resets all internal state.@Nullable String
Returns the new node id to whicholdUUID
has been mapped ornull
if no such mapping exists.Returns an iterator over all processed reference properties.void
processedReference
(@NotNull Object refProp) Store the given reference property for later retrieval usinggetProcessedReferences()
.void
Store the given id mapping for later lookup usingget(String)
.boolean
removeReferences
(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 whicholdUUID
has been mapped ornull
if no such mapping exists.- Parameters:
oldUUID
- old node id- Returns:
- mapped new id or
null
if 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:
true
if the internal list of references changed.
-