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
HierarchyManagerImpl.CycleDetector
Modifier and Type | Field and Description |
---|---|
protected ItemStateManager |
attic
the attic
|
provider, rootNodeId
Constructor and Description |
---|
ZombieHierarchyManager(HierarchyManagerImpl parent,
ItemStateManager provider,
ItemStateManager attic) |
Modifier and Type | Method and Description |
---|---|
protected ChildNodeEntry |
getChildNodeEntry(NodeState parent,
Name name,
int index)
Returns the
ChildNodeEntry of parent with the
specified name and index or null
if there's no such entry. |
protected ChildNodeEntry |
getChildNodeEntry(NodeState parent,
NodeId id)
Returns the
ChildNodeEntry of parent with the
specified uuid or null 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 the
parentUUID of the given item. |
protected boolean |
hasItemState(ItemId id)
Determines whether an item state for a given item id exists.
|
buildPath, getDepth, getName, getName, getParentIds, getPath, getRelativeDepth, getRootNodeId, getShareRelativeDepth, isAncestor, isShareAncestor, pathResolved, resolveNodePath, resolvePath, resolvePath, resolvePath, resolvePropertyPath
protected ItemStateManager attic
public ZombieHierarchyManager(HierarchyManagerImpl parent, ItemStateManager provider, ItemStateManager attic)
protected ItemState getItemState(ItemId id) throws NoSuchItemStateException, ItemStateException
Low-level hook provided for specialized derived classes.
Delivers state from attic if such exists, otherwise calls base class.
getItemState
in class HierarchyManagerImpl
id
- item idNoSuchItemStateException
- if the item does not existItemStateException
- if an error occursgetItemState(ItemId)
protected boolean hasItemState(ItemId id)
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.
hasItemState
in class HierarchyManagerImpl
id
- item idtrue
if an item state exists, otherwise
false
hasItemState(ItemId)
protected NodeId getParentId(ItemState state)
parentUUID
of the given item.
Low-level hook provided for specialized derived classes.
Also allows for removed items.
getParentId
in class HierarchyManagerImpl
state
- item stateparentUUID
of the given itemgetParentId(ItemState)
protected ChildNodeEntry getChildNodeEntry(NodeState parent, Name name, int index)
ChildNodeEntry
of parent
with the
specified name
and index
or null
if there's no such entry.
Low-level hook provided for specialized derived classes.
Also allows for removed/renamed child node entries.
getChildNodeEntry
in class HierarchyManagerImpl
parent
- node statename
- name of child node entryindex
- index of child node entryChildNodeEntry
of parent
with
the specified name
and index
or
null
if there's no such entry.getChildNodeEntry(NodeState, Name, int)
protected ChildNodeEntry getChildNodeEntry(NodeState parent, NodeId id)
ChildNodeEntry
of parent
with the
specified uuid
or null
if there's no such entry.
Low-level hook provided for specialized derived classes.
Also allows for removed child node entries.
getChildNodeEntry
in class HierarchyManagerImpl
parent
- node stateid
- id of child node entryChildNodeEntry
of parent
with
the specified uuid
or null
if there's
no such entry.getChildNodeEntry(NodeState, NodeId)
Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.