Hierarchy Developer's Guide for Oracle Billing Insight > APIs for Customizing Oracle Billing Insight Hierarchy Manager >

IHierarchyNode Interface


The IHierarchyNode interface provides a contract for a hierarchy node. This API expresses the parent-child relationship of a hierarchy, and has no direct business meaning. A node only has business meaning after it is linked to a business object. The list of business objects include IAccount, IService, ICharge. Objects can have the properties described in Table 14.

Table 14. IHierarchyNode Object Properties
Attribute
Description

id

The internal ID used to identify this hierarchy node.

alias

The alias given to this node.

isContainer

Indicates whether this node is a container. Only container nodes can have children.

createdAt

The date when the node was created.

createdBy

The user ID who created this node.

deletedAt

The date when this node was marked as deleted.

description

The description of the node.

linkTargetId

The ID of the link target of the node. For example, account number for IAccount.

linkTargetName

The name of the link target of the node.

linkTargetType

The type of the link target of the node.

linkTargetURI

The URI of the link target of the node.

Table 15 describes the methods available for the IHierarchyNode API.

Table 15. IHierarchyNode Methods
Method
Description

void addAttribute(IAttribute attribute)

Adds an attribute to the attribute list of the node.

void addAttributes(java.util.Collection attributes)

Adds a collection of attributes to the attribute list of the node.

IHierarchyNode addLinkTarget(IHierarchyLinkTarget child)

Creates a new node whose link target is as specified and add that node as the child node of this node object.

void addUserAccess(java.lang.String userId)

Gives a user access to this node.

IHierarchyNode[] findByOMFTypeAndAttributes(java.lang.String omfType, IAttribute[] attributes)

Deprecated. Use #findNodeByLinkTargetTypeAndCriteria(String,com.edocs.common.api.omf.search.ISearchCriteria) instead. Finds all nodes that are the descendants of this node whose link target types match the specified OMF object type and node attributes match the ones in the specified attributes.

IHierarchyNode[] findNodeByLinkTargetId(java.lang.String linkTargetId)

Finds all nodes that match the specified link target ID, beginning at this node and searching recursively to the child nodes.

IHierarchyNode[] findNodeByLinkTargetType(java.lang.String linkTargetType)

Finds all nodes that are the descendants of this node whose link target types match the specified link target type.

IHierarchyNode[] findNodeByLinkTargetTypeAndCriteria(java.lang.String linkTargetType, ISearchCriteria criteria)

Finds all nodes that are the descendants of this node whose link target type match the specified link target type and link target object match the specified criteria.

IHierarchyNode[] findNodeByLinkTargetTypeAndDisplayName(java.lang.String linkTargetType, java.lang.String linkTargetDisplayName)

Finds all nodes that are the descendants of this node whose link target types match the specified link target type and link target display names match the specified link target display name.

IHierarchyNode findNodeByLinkTargetURI(java.lang.String linkTargetURI)

Finds a node that matches the specified link target URI, beginning at this node and searching recursively to the child nodes.

IOMFObject[] findOMFObject(java.lang.String userId, java.lang.String elementType, HierSearchType status, IAttribute[] attributes)

Deprecated. Use IHierarchyAccessManager#findAssignedOMFObjects(com.edocs.common.api.hierarchy.IHierarchyNode, String, com.edocs.common.api.omf.search.ISearchCriteria) or IHierarchyAccessManager#findUnassignedOMFObjects(com.edocs.common.api.hierarchy.IHierarchy, String, com.edocs.common.api.omf.search.ISearchCriteria)

IHierarchyNodeObjWrapper[] findOMFObject(java.lang.String userId, java.lang.String elementType, HierSearchType status, java.lang.String attrName, java.lang.Object attrValue)

Deprecated. Use IHierarchyAccessManager#findAssignedOMFObjects(com.edocs.common.api.hierarchy.IHierarchyNode, String, com.edocs.common.api.omf.search.ISearchCriteria) or IHierarchyAccessManager#findUnassignedOMFObjects(com.edocs.common.api.hierarchy.IHierarchy, String, com.edocs.common.api.omf.search.ISearchCriteria)

java.util.List findUsers(HierSearchType status, IAttribute[] attributes)

Deprecated.

java.util.List findUsers(HierSearchType searchType, java.lang.String attrName, java.lang.Object attrValue)

Finds users (Assigned, Unassigned, Authorized or Unauthorized as specified in HierSearchType) that match the specified attribute name and value within the sub tree starting from the current node.

java.lang.String getAlias()

Each node can be given an alias.

java.util.Set getAllAuthorizedUsers()

Retrieves all the users who have access to this node.

java.util.Collection getAllUsers()

Returns a collection of users having access to this node and its parent nodes.

java.lang.Object getAttribute(java.lang.String attributeName)

Retrieves the value of the attribute for a given name.

java.util.Set getAttributes()

Retrieves all the attributes for this node.

java.util.Set getAttributes(java.lang.String attributeName)

Retrieves all attributes of the node whose names match the specified attribute name.

java.util.Set getAuthorizedUsers()

Retrieves all the users who are directly assigned to access this node.

java.util.Set getChildren()

Retrieves all the immediate children nodes of this node.

java.util.Set getChildren(boolean initializeHasChildren)

Retrieves all the immediate children nodes of this node.

java.util.Set getChildren(boolean initializeHasChildren, IHierarchyNode startFromNode, int fetchSize)

Returns a list of IHierarchyNode objects that represent as child nodes of the current node.

java.util.Set getChildren(boolean initializeHasChildren, int startPosition, int fetchSize)

Returns a list of IHierarchyNode objects that represent as child nodes of the current node.

java.util.Set getChildrenOfType(java.lang.String omfObjectType)

Returns a set of immediate children whose link target types match the specified type.

java.util.Set getChildrenOfType(java.lang.String omfObjectType, java.util.Collection attributes)

Returns a set of immediate children whose link target types match the specified type and whose node attributes match those specified.

java.util.Date getCreatedAt()

Retrieves the date when the node was created.

java.lang.String getCreatedBy()

Retrieves the ID of the user who created the node.

java.util.Date getDeletedAt()

Retrieves the date when the node was marked as deleted.

java.lang.String getDescription()

Retrieves the description property of this node.

java.util.Date getExpiredate()

Retrieves the date when the node is removed

IHierarchyNodeHandle getHandle()

Retrieves the hierarchy node handle that can be serialized and passed across the net.

IHierarchy getHierarchy()

Retrieves the current hierarchy object which this node belongs to.

java.lang.String getHierarchyName()

Retrieves the name of the hierarchy this node is associated with.

java.lang.Long getID()

Returns the internal node ID.

IHierarchyLinkTarget getLinkTarget()

Retrieves the link target object of this nodes.

java.lang.String getLinkTargetExtKey()

Retrieves link target external key.

java.lang.String getLinkTargetID()

Retrieves the ID of the link target of this node.

java.lang.String getLinkTargetName()

Retrieves the name of the link target of this node.

java.lang.String getLinkTargetType()

Retrieves the type of the link target for this node.

java.lang.String getLinkTargetURI()

Retrieves the URI of the link target of this node.

java.lang.String getOmfObjectType()

Deprecated. use {#getLinkTargetType} instead.

java.lang.String getOmfObjectURI()

Retrieves the URI of the link target of this node.

IHierarchyNode getParent()

Retrieves the parent node of this node.

java.lang.String getPath()

This is the absolute path from the root node to this node.

int getScrollPosition()

Retrieves the position and focus of current child nodes.

java.util.Collection getUsers()

Returns a collection of IUser objects assigned to this node.

java.util.List getUsersAssignedToNodeOrAnyAncestor()

Retrieves all the users who have access to this node or any of its ancestor nodes.

java.util.List getUsersAssignedToNodeOrAnyDescendent()

Retrieves all the users who have access to this node or any of its descendant, or child, nodes.

boolean hasChildren()

Use this method to check whether the node has any children without loading all the children nodes.

boolean hasUser()

Indicates whether the node has any users associated with.

boolean isDeleted()

Deprecated. With versioning, it does not make sense to have a deleted node. Checks whether this node has been marked as deleted.

boolean isFolder()

Checks whether this node is a folder.

boolean isRoot()

Checks whether this node is a root node.

void move(IHierarchyNode destination)

Moves this node to a different parent in the same hierarchy or between two different hierarchy.

void moveUser(IHierarchyNode destination, java.lang.String userid)

Re-associates the given user from current node to the destination node.

void remove()

Marks this hierarchy node and its children as deleted.

void removeAllAttributes()

Removes all attributes for this node.

IAttribute removeAttribute(java.lang.String name, java.lang.String value)

Removes the attribute with specified name and value from this node.

void removeAttributes(java.lang.String name)

Removes all attributes whose names are the same as the specified name.

void removeUserAccess(java.lang.String userId)

Removes user access from the node.

void setAlias(java.lang.String alias)

Gives this node an alias.

void setDescription(java.lang.String description)

Sets the description property of this node.

void setLinkTargetName(java.lang.String name)

Sets the name of the link target of this node.

void update()

Persists any changes made to the node.

void update(IHierarchyLinkTarget linkTarget)

Updates the current node value using the information from the given link target.

Hierarchy Developer's Guide for Oracle Billing Insight Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.