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

IHierarchy Interface


The IHierarchy interface represents a contract of a hierarchy. Use this API to remove, update, and publish a hierarchy, or access and modify the attributes or tree nodes of a hierarchy. Each hierarchy has a root node and include many levels of child nodes. A hierarchy only maintains the parent-child relationship among nodes. The nodes themselves are not business objects; they have no business meaning. The business meaning is expressed through the link target of each node.

A hierarchy can have one of three states:

  • Unpublished. When a hierarchy is first created, it is in unpublished state. Unpublished hierarchies can only be available to or accessed by its creator and system administrators. Changes made to an unpublished hierarchy are not versioned. When an unpublished hierarchy is removed by an end user, the hierarchy is physically removed from the Oracle Billing Insight database.
  • Published. Once a hierarchy is published, any changes made to the hierarchy structure is versioned based on the periods defined. A published hierarchy cannot be unpublished again.
  • Expired. Once a hierarchy is expired, it becomes not available for periods that are later than the expiration period. However, the hierarchy is still available for the periods prior to the expiration period, and the user can still edit the hierarchy for the older version.

Each hierarchy also has a list of associated attributes, or properties, described in Table 7.

Table 7. IHierarchy Attributes
Attribute
Description

Id

Internal unique ID to identify the hierarchy.

version

Version of the hierarchy.

hierarchy type

The type of the hierarchy.

company id

The ID of the company to which the hierarchy belongs.

name

The name of the hierarchy, which is unique within the specific company.

display name

A more descriptive name for the hierarchy

description

The description of the hierarchy.

created date

The date when the hierarchy is created.

created by

The ID of the user who creates the hierarchy.

modified date

The date when the hierarchy is last modified.

modified by

The ID of the user who last modified the hierarchy.

deleted date

The date when the hierarchy is marked as deleted.

publish date

The date when the hierarchy is published.

expire date

The date when the hierarchy is expired.

expire period

The period staring which the hierarchy becomes expired. Get an instance of IHierarchy through IHierarchyManager.

Table 8 describes the methods available for the IHierarchy API.

Table 8. IHierarchy Methods
Method
Description

void addUserAccess(IOMFObject omfObject, java.lang.String userId)

Gives user access to a targeted node.

void expire()

Expires the hierarchy starting from the current working period.

IHierarchyNode[] findAllNodeForUserOfType(java.lang.String userId, java.lang.String omfObjectType)

Returns all nodes which the user has access to and whose link target types are of the specified type.

IHierarchyNode[] findFolderNode(java.lang.String folderName)

Deprecated.

IHierarchyNode findFolderNodeByLinkTargetId(java.lang.String linkTargetId)

Deprecated.

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

Finds all nodes from a specific hierarchy that match a link target ID.

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

Finds all nodes in this hierarchy whose link target types match the one specified by linkTargetType.

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

Finds all nodes in this hierarchy whose link target types are the specified linkTargetType and whose link target names are the specified linkTargetDisplayName.

IHierarchyNode findNodeByLinkTargetTypeAndLinkTargetId(java.lang.String linkTargetType, java.lang.String linkTargetId)

Finds all nodes in this hierarchy that match a link target type and link target Id.

IHierarchyNode findNodeByLinkTargetURI(java.lang.String linkTargetURI)

Finds a node in a hierarchy whose link target URL matches the specified linkTargetURI.

IHierarchyNode[] findNodeByLinkTargetURI(java.lang.String[] linkTargetURIs)

Finds an array of nodes in the hierarchy whose link target URIs match one of the URIs specified by linkTargetURIs.

IHierarchyNode[] findRootNodeForUser(java.lang.String userID)

Finds a list of root hierarchy nodes which the user has access to.

IHierarchyNode[] findRootNodeForUser2(java.lang.String userID)

Finds the nodes a user has access to; if the user has multiple access points in this hierarchy, the node is virtual. You can use this API if you have the userID.

IHierarchyNode[] findRootNodes(IUser user)

Finds a list of top level node for the user based on user's role.

IHierarchyNode[] findRootNodes2(IUser user)throws DataStoreException

Finds the nodes a user has access to; if the user has multiple access points in this hierarchy, the node is virtual. You can use this API if you have a user object.

java.util.List findUsers(java.lang.String userId, HierSearchType searchType, IAttribute[] attributes)

Deprecated.

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

Finds user objects (Assigned, Unassigned, Authorized or Unauthorized as specified in HierSearchType) that match the specified attribute value within the hierarchy.

IUser getActor()

Returns the user who is currently operating on the hierarchy.

java.util.List getAvailablePeriods()

Retrieves a list of periods that this hierarchy exists in.

java.util.List getAvailablePeriods(java.lang.String userId)

Retrieves all periods within which that specified user can have access to the hierarchy.

java.lang.String getCompanyID()

Retrieves the unique IDof the company which this hierarchy belongs to.

java.util.Date getCreatedAt()

Deprecated. Retrieves the date when the hierarchy was created.

java.util.Date getCreatedate()

Retrieves the hierarchy creation date.

java.lang.String getCreatedBy()

Retrieves user ID who created the hierarchy.

java.util.Date getDeletedAt()

Deprecated. Returns the date when the hierarchy was marked as deleted.

java.lang.String getDescription()

Retrieves the description of the hierarchy.

java.lang.String getDisplayName()

Retrieves the display name of the hierarchy.

java.util.Date getExpiredate()

Retrieves the hierarchy expiration date.

IPeriod getExpiredPeriod()

Retrieves the period when the hierarchy is expired, or good through.

IHierarchyHandle getHandle()

Retrieves the hierarchy handle for this hierarchy. You can serialize this handle into a persistent store and then use it to restore the hierarchy.

java.lang.Long getID()

Retrieves the internal ID used to identify this hierarchy.

java.util.List getLinkTargetTypes()

Retrieves all valid link targets type string.

java.util.Date getModifiedAt()

Deprecated. Retrieves the date when the hierarchy was modified last time.

java.lang.String getModifiedBy()

Retrieves the login name of user who modified the hierarchy last time.

java.util.Date getModifydate()

Retrieves the hierarchy last modified date.

java.lang.String getName()

Retrieves the name of the hierarchy

java.util.Date getPublishdate()

Retrieves hierarchy publish date.

IHierarchyNode getRoot()

Returns the root node of this hierarchy.

IHierarchyType getType()

Retrieves the type of the hierarchy.

java.lang.Long getVersion()

Retrieves the versioning number of this object stored in the database.

IPeriod getWorkingPeriod()

Retrieves the current working period.

boolean isActivated()

The opposite of the isDeleted().

boolean isDeleted()

Checks whether this hierarchy has been marked as deleted.

boolean isPublished()

Checks whether the hierarchy has been published.

void publish()

Publishes the hierarchy for the current period.

void publish(IPeriod startPeriod, IPeriod endPeriod)

Publishes the hierarchy from startPeriod to endPeriod, inclusive.

void purge()

Removes the hierarchy from the Oracle Billing Insight database.

void remove()

Removes the hierarchy.

void removeAccessForUser(java.lang.String userId)

Removes a users access to this hierarchy, which actually means all the nodes in this hierarchy.

void removeUserAccess(IHierarchyLinkTarget linkTarget, java.lang.String userId)

Removes user's access to the node whose link target is parameter linkTarget.

void replicateData(IPeriod startPeriod, IPeriod endPeriod)

Replicates current hierarchy structure for new periods specified between starting and end periods, inclusive.

void setActor(IUser user)

Sets the actor.

void setDescription(java.lang.String description)

Sets the description of the hierarchy.

void setDisplayName(java.lang.String displayName)

Sets the display name of the hierarchy.

void setName(java.lang.String name)

Sets the name of the hierarchy.

void setToLastestAvailablePeriod()

Sets the working period to the latest available period.

void setWorkingPeriod(IPeriod workingPeriod)

Sets a new working period.

void update()

Updates this hierarchy with the new attributes and or properties.

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