Package org.apache.jackrabbit.core
Class ZombieHierarchyManager
- java.lang.Object
-
- org.apache.jackrabbit.core.HierarchyManagerImpl
-
- org.apache.jackrabbit.core.ZombieHierarchyManager
-
- All Implemented Interfaces:
HierarchyManager
public class ZombieHierarchyManager extends HierarchyManagerImpl
HierarchyManagerimplementation that is also able to build/resolve paths of those items that have been moved or removed (i.e. moved to the attic).todo make use of path caching
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.HierarchyManagerImpl
HierarchyManagerImpl.CycleDetector
-
-
Field Summary
Fields Modifier and Type Field Description protected ItemStateManageratticthe attic-
Fields inherited from class org.apache.jackrabbit.core.HierarchyManagerImpl
provider, rootNodeId
-
-
Constructor Summary
Constructors Constructor Description ZombieHierarchyManager(HierarchyManagerImpl parent, ItemStateManager provider, ItemStateManager attic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ChildNodeEntrygetChildNodeEntry(NodeState parent, NodeId id)Returns theChildNodeEntryofparentwith the specifieduuidornullif there's no such entry.protected ChildNodeEntrygetChildNodeEntry(NodeState parent, Name name, int index)Returns theChildNodeEntryofparentwith the specifiednameandindexornullif there's no such entry.protected ItemStategetItemState(ItemId id)Return an item state, given its item id.protected NodeIdgetParentId(ItemState state)Returns theparentUUIDof the given item.protected booleanhasItemState(ItemId id)Determines whether an item state for a given item id exists.-
Methods inherited from class org.apache.jackrabbit.core.HierarchyManagerImpl
buildPath, getDepth, getName, getName, getParentIds, getPath, getRelativeDepth, getRootNodeId, getShareRelativeDepth, isAncestor, isShareAncestor, pathResolved, resolveNodePath, resolvePath, resolvePath, resolvePath, resolvePropertyPath
-
-
-
-
Field Detail
-
attic
protected ItemStateManager attic
the attic
-
-
Constructor Detail
-
ZombieHierarchyManager
public ZombieHierarchyManager(HierarchyManagerImpl parent, ItemStateManager provider, ItemStateManager attic)
-
-
Method Detail
-
getItemState
protected ItemState getItemState(ItemId id) throws NoSuchItemStateException, ItemStateException
Return an item state, given its item id.Low-level hook provided for specialized derived classes.
Delivers state from attic if such exists, otherwise calls base class.
- Overrides:
getItemStatein classHierarchyManagerImpl- Parameters:
id- item id- Returns:
- item state
- Throws:
NoSuchItemStateException- if the item does not existItemStateException- if an error occurs- See Also:
getItemState(ItemId)
-
hasItemState
protected boolean hasItemState(ItemId id)
Determines whether an item state for a given item id exists.Low-level hook provided for specialized derived classes.
Returns
trueif there's state on the attic for the requested item; otherwise delegates to base class.- Overrides:
hasItemStatein classHierarchyManagerImpl- Parameters:
id- item id- Returns:
trueif an item state exists, otherwisefalse- See Also:
hasItemState(ItemId)
-
getParentId
protected NodeId getParentId(ItemState state)
Returns theparentUUIDof the given item.Low-level hook provided for specialized derived classes.
Also allows for removed items.
- Overrides:
getParentIdin classHierarchyManagerImpl- Parameters:
state- item state- Returns:
parentUUIDof the given item- See Also:
getParentId(ItemState)
-
getChildNodeEntry
protected ChildNodeEntry getChildNodeEntry(NodeState parent, Name name, int index)
Returns theChildNodeEntryofparentwith the specifiednameandindexornullif there's no such entry.Low-level hook provided for specialized derived classes.
Also allows for removed/renamed child node entries.
- Overrides:
getChildNodeEntryin classHierarchyManagerImpl- Parameters:
parent- node statename- name of child node entryindex- index of child node entry- Returns:
- the
ChildNodeEntryofparentwith the specifiednameandindexornullif there's no such entry. - See Also:
getChildNodeEntry(NodeState, Name, int)
-
getChildNodeEntry
protected ChildNodeEntry getChildNodeEntry(NodeState parent, NodeId id)
Returns theChildNodeEntryofparentwith the specifieduuidornullif there's no such entry.Low-level hook provided for specialized derived classes.
Also allows for removed child node entries.
- Overrides:
getChildNodeEntryin classHierarchyManagerImpl- Parameters:
parent- node stateid- id of child node entry- Returns:
- the
ChildNodeEntryofparentwith the specifieduuidornullif there's no such entry. - See Also:
getChildNodeEntry(NodeState, NodeId)
-
-