| Package | Description |
|---|---|
| org.sakaiproject.hierarchy | |
| org.sakaiproject.hierarchy.utils |
| Modifier and Type | Method and Description |
|---|---|
HierarchyNode |
HierarchyNodeWriter.addChildRelation(String nodeId,
String childNodeId)
Add children to a node (creates the association),
only adds direct children (directly connected to this node),
others are implicitly defined,
this will not create loops in the hierarchy |
HierarchyNode |
HierarchyNodeWriter.addNode(String hierarchyId,
String parentNodeId)
Add a new node to a hierarchy
|
HierarchyNode |
HierarchyNodeWriter.addParentRelation(String nodeId,
String parentNodeId)
Add parents to a node (creates the association),
only adds direct parents (directly connected to this node),
others are implicitly defined,
this will not create loops in the hierarchy |
HierarchyNode |
HierarchyService.createHierarchy(String hierarchyId)
Creates a new hierarchy with the unique id specified, exception if this id is already used
|
HierarchyNode |
HierarchyNodeReader.getNodeById(String nodeId)
Get a node based on the unique id,
convenience method for
HierarchyNodeReader.getNodesByIds(String[]) |
HierarchyNode |
HierarchyNodeReader.getRootNode(String hierarchyId)
Get the hierarchy root node for a specific hierarchy if it exists
|
HierarchyNode |
HierarchyNodeWriter.removeChildRelation(String nodeId,
String childNodeId)
Remove a child relation from a node,
this will not be allowed to orphan a node
|
HierarchyNode |
HierarchyNodeWriter.removeNode(String nodeId)
Remove a node from the hierarchy if it is possible,
nodes can only be removed if they have no children associations,
root nodes can never be removed,
exception occurs if these rules are violated
|
HierarchyNode |
HierarchyNodeWriter.removeParentRelation(String nodeId,
String parentNodeId)
Remove a parent relation from a node,
this will not be allowed to orphan a node,
only extra parents may be removed,
the last parent for a node cannot currently be removed
|
HierarchyNode |
HierarchyNodeWriter.saveNodeMetaData(String nodeId,
String title,
String description,
String permKey)
Save meta data on a node, this is optional and nodes do not need meta data associated,
if the params are nulls then the values remain unchanged, if they are empty string
then the values are wiped out
|
HierarchyNode |
HierarchyService.setHierarchyRootNode(String hierarchyId,
String nodeId)
Sets the root node of this hierarchy, note that although a hierarchy might have multiple
nodes at the top of the hierarchy, it always has a primary node which is considering the
"entry point" into the hierarchy
A node must have no parents to be set to the root node The first node added to a hierarchy becomes the root node by default |
HierarchyNode |
HierarchyNodeWriter.setNodeDisabled(String nodeId,
Boolean isDisabled)
Enables/disables the node.
|
| Modifier and Type | Method and Description |
|---|---|
Set<HierarchyNode> |
HierarchyNodeReader.getChildNodes(String nodeId,
boolean directOnly)
Get all children nodes for this node in the hierarchy all the way to the leaves,
will return no nodes if this node has no children
|
Map<String,HierarchyNode> |
HierarchyNodeReader.getNodesByIds(String[] nodeIds)
Get a set of nodes based on their unique ids,
NOTE: this method is here for efficiency
|
Set<HierarchyNode> |
HierarchyPermissions.getNodesForUserPerm(String userId,
String hierarchyPermission)
Get the hierarchy nodes which a user has a specific permission in,
this is used to find a set of nodes which a user should be able to see and to build
the list of hierarchy nodes a user has a given permission in
|
Set<HierarchyNode> |
HierarchyNodeReader.getParentNodes(String nodeId,
boolean directOnly)
Get all the parent nodes for a specific node all the way to the root node,
returns empty set if this is the root node
|
| Modifier and Type | Method and Description |
|---|---|
static List<HierarchyNode> |
HierarchyUtils.getSortedNodes(Collection<HierarchyNode> nodes)
Create a sorted list of nodes based on a set of input nodes,
list goes from root (or highest parent) down to the bottom most node
|
| Modifier and Type | Method and Description |
|---|---|
static List<HierarchyNode> |
HierarchyUtils.getSortedNodes(Collection<HierarchyNode> nodes)
Create a sorted list of nodes based on a set of input nodes,
list goes from root (or highest parent) down to the bottom most node
|
static Set<String> |
HierarchyUtils.getUniqueChildNodes(Collection<HierarchyNode> nodes,
boolean includeSuppliedNodeIds,
boolean directOnly)
Create a set of all the unique child node ids based on the set of supplied nodes,
can optionally be limited to return only direct children and to include the supplied node ids
|
static Set<String> |
HierarchyUtils.getUniqueParentNodes(Collection<HierarchyNode> nodes,
boolean includeSuppliedNodeIds,
boolean directOnly)
Create a set of all the unique parent node ids based on the set of supplied nodes,
can optionally be limited to return only direct parents and to include the supplied node ids
|
Copyright © 2003–2021 Sakai Project. All rights reserved.