Hierarchy Developer's Guide for Oracle Self-Service E-Billing > APIs for Customizing <ProductName> Hierarchy Manager >

IHierarchy Interface


This interface represents a contract of a hierarchy. Use it 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 may 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 database.
  • Published. Once a hierarchy is published, any changes made to the hierarchy structure will be versioned based on periods defined. A published hierarchy cannot be unpublished again.
  • Expired. Once a hierarchy is expired, it becomes not available for periods which are later than the expiration period. However, the hierarchy is still available for the periods prior to expiration period, and the user can still edit the hierarchy for the older version.

Each hierarchy also has a list of associated attributes (properties). These attributes include:

  • id. Internal unique id to identify this hierarchy.
  • version. Version of the hierarchy.
  • hierarchy type. The type of the hierarchy.
  • company id. The id of the company where this hierarchy belongs to.
  • name. The name of the hierarchy. It 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 5. 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 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)

Find 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()

Return the user who is currently operating on the hierarchy.

java.util.List getAvailablePeriods()

Gets a list of periods this hierarchy exists in.

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

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

java.lang.String getCompanyID()

Gets unique id of the company which this hierarchy belongs to.

java.util.Date getCreatedAt()

Deprecated. Gets the date when the hierarchy was created.

java.util.Date getCreatedate()

Get the hierarchy creation date.

java.lang.String getCreatedBy()

Gets 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()

Gets the description of the hierarchy.

java.lang.String getDisplayName()

Gets the display name of the hierarchy.

java.util.Date getExpiredate()

Gets the hierarchy expiration date.

IPeriod getExpiredPeriod()

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

IHierarchyHandle getHandle()

Gets 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()

Gets the internal ID used to identify this hierarchy.

java.util.List getLinkTargetTypes()

Gets all valid link targets type string.

java.util.Date getModifiedAt()

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

java.lang.String getModifiedBy()

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

java.util.Date getModifydate()

Gets the hierarchy last modified date.

java.lang.String getName()

Get the name of the hierarchy

java.util.Date getPublishdate()

Gets hierarchy publish date.

IHierarchyNode getRoot()

Returns the root node of this hierarchy.

IHierarchyType getType()

Gets the type of the hierarchy.

java.lang.Long getVersion()

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

IPeriod getWorkingPeriod()

Gets 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()

Remove the hierarchy from 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()

Update this hierarchy with the new attributes and or properties.

Hierarchy Developer's Guide for Oracle Self-Service E-Billing Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices.