Hierarchy Developer's Guide for Oracle Self-Service E-Billing > Basic Hierarchy Manager Use Cases > Taking the User's Role into Consideration >

Finding Top Level Nodes That a User Can Access for a Hierarchy


The following code retrieves a list of the top level nodes for the specified user type:

IHierarchyNode[] rootNOdes = haMgr.getRootNodes(hierarchy, period);

or

IHierarchyNode[] rootNOdes = haMgr.getRootNodes();

Since hierarchy structure is versioned for each period, the root node can vary depending on which period you are currently looking at. When the hierarchy and period are not passed in as parameters, the current hierarchy and current period stored in hierarchyContext are used. Again, depending on the user role set in the current context, the method returns the following:

  • Subscriber or Manager. One or more hierarchy nodes that the current user has been given access explicitly. For example, the nodes that the current user is assigned to.
  • System Administrator. The root node of the hierarchy.
Hierarchy Developer's Guide for Oracle Self-Service E-Billing Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.