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
HierarchyManager
implementation 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 ItemStateManager
attic
the 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 ChildNodeEntry
getChildNodeEntry(NodeState parent, NodeId id)
Returns theChildNodeEntry
ofparent
with the specifieduuid
ornull
if there's no such entry.protected ChildNodeEntry
getChildNodeEntry(NodeState parent, Name name, int index)
Returns theChildNodeEntry
ofparent
with the specifiedname
andindex
ornull
if there's no such entry.protected ItemState
getItemState(ItemId id)
Return an item state, given its item id.protected NodeId
getParentId(ItemState state)
Returns theparentUUID
of the given item.protected boolean
hasItemState(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:
getItemState
in 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
true
if there's state on the attic for the requested item; otherwise delegates to base class.- Overrides:
hasItemState
in classHierarchyManagerImpl
- Parameters:
id
- item id- Returns:
true
if an item state exists, otherwisefalse
- See Also:
hasItemState(ItemId)
-
getParentId
protected NodeId getParentId(ItemState state)
Returns theparentUUID
of the given item.Low-level hook provided for specialized derived classes.
Also allows for removed items.
- Overrides:
getParentId
in classHierarchyManagerImpl
- Parameters:
state
- item state- Returns:
parentUUID
of the given item- See Also:
getParentId(ItemState)
-
getChildNodeEntry
protected ChildNodeEntry getChildNodeEntry(NodeState parent, Name name, int index)
Returns theChildNodeEntry
ofparent
with the specifiedname
andindex
ornull
if there's no such entry.Low-level hook provided for specialized derived classes.
Also allows for removed/renamed child node entries.
- Overrides:
getChildNodeEntry
in classHierarchyManagerImpl
- Parameters:
parent
- node statename
- name of child node entryindex
- index of child node entry- Returns:
- the
ChildNodeEntry
ofparent
with the specifiedname
andindex
ornull
if there's no such entry. - See Also:
getChildNodeEntry(NodeState, Name, int)
-
getChildNodeEntry
protected ChildNodeEntry getChildNodeEntry(NodeState parent, NodeId id)
Returns theChildNodeEntry
ofparent
with the specifieduuid
ornull
if there's no such entry.Low-level hook provided for specialized derived classes.
Also allows for removed child node entries.
- Overrides:
getChildNodeEntry
in classHierarchyManagerImpl
- Parameters:
parent
- node stateid
- id of child node entry- Returns:
- the
ChildNodeEntry
ofparent
with the specifieduuid
ornull
if there's no such entry. - See Also:
getChildNodeEntry(NodeState, NodeId)
-
-