|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.util.ReferenceChangeTracker
public class ReferenceChangeTracker
Simple helper class that can be used to keep track of node id mappings (e.g. if the id of an imported or copied node is mapped to a new id) and processed (e.g. imported or copied) reference properties that might need correcting depending on the id mappings.
Constructor Summary | |
---|---|
ReferenceChangeTracker()
|
Method Summary | |
---|---|
void |
clear()
Resets all internal state. |
NodeId |
getMappedId(NodeId oldId)
Returns the new node id to which oldId has been mapped
or null if no such mapping exists. |
Iterator<Object> |
getProcessedReferences()
Returns an iterator over all processed reference properties. |
void |
mappedId(NodeId oldId,
NodeId newId)
Store the given id mapping for later lookup using . |
void |
processedReference(Object refProp)
Store the given reference property for later retrieval using . |
boolean |
removeReferences(List<Object> processedReferences)
Remove the given references that have already been processed from the references list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReferenceChangeTracker()
Method Detail |
---|
public void clear()
public void mappedId(NodeId oldId, NodeId newId)
getMappedId(NodeId)
.
oldId
- old node idnewId
- new node idpublic void processedReference(Object refProp)
getProcessedReferences()
.
refProp
- reference propertypublic NodeId getMappedId(NodeId oldId)
oldId
has been mapped
or null
if no such mapping exists.
oldId
- old node id
null
if no such mapping existsmappedId(NodeId, NodeId)
public Iterator<Object> getProcessedReferences()
processedReference(Object)
public boolean removeReferences(List<Object> processedReferences)
processedReferences
-
true
if the internal list of references changed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |