Interface HierarchyManager
-
- All Known Implementing Classes:
HierarchyManagerImpl
public interface HierarchyManagerHierarchyManager...
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()Dispose thisHierarchyManagerintgetDepth(HierarchyEntry hierarchyEntry)Returns the depth of the specified item.NodeEntrygetNodeEntry(NodeId nodeId)Resolves a itemId into aHierarchyEntry.NodeEntrygetNodeEntry(Path qPath)Resolves a path into aNodeEntry.NodeStategetNodeState(Path qPath)Retrieves theNodeEntrycorresponding to the given path and resolves it to the underlyingNodeState.PropertyEntrygetPropertyEntry(Path qPath)Resolves a path into aPropertyEntry.PropertyEntrygetPropertyEntry(PropertyId propertyId)Resolves a propertyId into aPropertyEntry.PropertyStategetPropertyState(Path qPath)Retrieves thePropertyEntrycorresponding to the given path and resolves it to the underlyingPropertyState.intgetRelativeDepth(NodeEntry ancestor, HierarchyEntry descendant)Returns the depth of the specified descendant relative to the given ancestor.NodeEntrygetRootEntry()HierarchyEntrylookup(ItemId workspaceItemId)Lookup ofHierarchyEntryby its workspace Id that may be different if a entry (or any of its ancestors) has been transiently moved or reordered.HierarchyEntrylookup(Path workspacePath)Lookup ofHierarchyEntryby its workspace path that may be different if a entry (or any of its ancestors) has been transiently moved or reordered.
-
-
-
Method Detail
-
dispose
void dispose()
Dispose thisHierarchyManager
-
getRootEntry
NodeEntry getRootEntry()
- Returns:
- the root entry.
-
lookup
HierarchyEntry lookup(ItemId workspaceItemId)
Lookup ofHierarchyEntryby its workspace Id that may be different if a entry (or any of its ancestors) has been transiently moved or reordered.If the Hierarchy already lists the entry with the given workspaceItemId it is returned otherwise
null. SeegetNodeEntry(NodeId)orgetPropertyEntry(PropertyId)for methods that resolves the ItemId including lookup in the persistence layer if the entry has not been loaded yet.- Parameters:
workspaceItemId-- Returns:
- the HierarchyEntry with the given
workspaceItemId.
-
lookup
HierarchyEntry lookup(Path workspacePath)
Lookup ofHierarchyEntryby its workspace path that may be different if a entry (or any of its ancestors) has been transiently moved or reordered.If the Hierarchy already lists the entry with the given path it is returned otherwise
null. SeegetNodeEntry(Path)orgetPropertyEntry(Path)for methods that resolves the path including lookup in the persistence layer if the entry has not been loaded yet.- Parameters:
workspacePath-- Returns:
- the HierarchyEntry with the given
workspacePath.
-
getNodeEntry
NodeEntry getNodeEntry(NodeId nodeId) throws ItemNotFoundException, RepositoryException
Resolves a itemId into aHierarchyEntry.- Parameters:
nodeId-- Returns:
- Throws:
PathNotFoundExceptionRepositoryExceptionItemNotFoundException
-
getNodeEntry
NodeEntry getNodeEntry(Path qPath) throws PathNotFoundException, RepositoryException
Resolves a path into aNodeEntry.- Parameters:
qPath-- Returns:
- Throws:
PathNotFoundExceptionRepositoryException
-
getPropertyEntry
PropertyEntry getPropertyEntry(PropertyId propertyId) throws ItemNotFoundException, RepositoryException
Resolves a propertyId into aPropertyEntry.- Parameters:
propertyId-- Returns:
- Throws:
PathNotFoundExceptionRepositoryExceptionItemNotFoundException
-
getPropertyEntry
PropertyEntry getPropertyEntry(Path qPath) throws PathNotFoundException, RepositoryException
Resolves a path into aPropertyEntry.- Parameters:
qPath-- Returns:
- Throws:
PathNotFoundExceptionRepositoryException
-
getNodeState
NodeState getNodeState(Path qPath) throws PathNotFoundException, RepositoryException
Retrieves theNodeEntrycorresponding to the given path and resolves it to the underlyingNodeState.- Parameters:
qPath-- Returns:
- Throws:
PathNotFoundExceptionRepositoryException
-
getPropertyState
PropertyState getPropertyState(Path qPath) throws PathNotFoundException, RepositoryException
Retrieves thePropertyEntrycorresponding to the given path and resolves it to the underlyingPropertyState.- Parameters:
qPath-- Returns:
- Throws:
PathNotFoundExceptionRepositoryException
-
getDepth
int getDepth(HierarchyEntry hierarchyEntry) throws ItemNotFoundException, RepositoryException
Returns the depth of the specified item. The depth reflects the absolute hierarchy level.- Parameters:
hierarchyEntry-- Returns:
- the depth of the specified item
- Throws:
RepositoryException- if another error occursItemNotFoundException
-
getRelativeDepth
int getRelativeDepth(NodeEntry ancestor, HierarchyEntry descendant) throws ItemNotFoundException, RepositoryException
Returns the depth of the specified descendant relative to the given ancestor. Ifancestoranddescendantdenote the same item 0 is returned. Ifancestordoes not denote an ancestor -1 is returned.- Parameters:
ancestor- NodeEntry that must be an ancestor of the descendantdescendant- HierarchyEntry- Returns:
- the relative depth; -1 if
ancestordoes not denote an ancestor of the item denoted bydescendant(or itself). - Throws:
ItemNotFoundException- If either of the specified id's does not denote an existing item.RepositoryException- If another error occurs.
-
-