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

Assigned and Unassigned Search Provider


The Hierarchy Manager search functionalities are assigned and unassigned search. Assigned search is searching for business objects that linked into the current hierarchy. Assigned search returns only business objects the current user have access to in the hierarchy for a given period.

Unassigned search is searching for business objects the users was given access to in the master hierarchy and not assigned into the current hierarchy for a given period.

By default assigned and unassigned search are provided for all OMF objects where the OMF object managers implement the IOMFObjectSearchable interface. This method of search is very flexible and work very well with OMF objects where there are not a lot of objects. For search where the result could be a big set, implementing a search provider extending two interfaces IAssignedObjectProvider for assigned search and IUnassignedObjectProvider for unassigned search.

The search provider was created to search for unassigned objects where the user accessibility to a business object is not managed by Hierarchy Manager. This concept of the provider is equivalent to the user access managed in the master hierarchy.

To be able to plug-in the search provider into the hierarchy search framework, you must implement a class that implements the interfaces IAssignedObjectProvider and IUnassignedObjectProvider. Then edit the configuration file, hierarchy.cfg.xma.xml, for the link target that this search provider supports.

The interface IAssignedObjectProvider has two methods:

  • public HierarchySearchResult getAssignedLinkTargets(IHierarchy hierarchy, SearchProperties searchProp);. Searches the entire hierarchy for specific link target type for user.
  • public HierarchySearchResult getAssignedLinkTargets(IHierarchyNode selectedNode, SearchProperties searchProp);. Searches for a specific link target type at the specified node and all of its descendants.

The interface IUnassignedObjectProvider has one method:

public HierarchySearchResult getUnassignedLinkTargets(IHierarchy targetHierarchy, SearchProperties searchProp) throws HierarchyException;

This method searches the unassigned link targets of the specified type and period and filter the result of the specified object attributes.

The following code is an example of a provider to support the ServiceAgreement business object:

<bean id="ServiceAgreementConfig" class="com.edocs.common.hierarchy.core.LinkTargetConfig" singleton="true">

<property name="targetType">

<value>edx:omf:serviceagreement:</value>

</property>

<property name="targetTypeName">

<value>hierarchy.element.class.ServiceAgreement</value>

</property>

<property name="displayName">

<value>getLinkTargetName</value>

</property>

<property name="xmlTag">

<value>ServiceAgreement</value>

</property>

<property name="storedHierXRef">

<value>false</value>

</property>

<property name="xmlExchangeHandler">

<bean class="com.edocs.common.omf.serviceagreement.ServiceAgreementXMLExchangeHandler"/>

</property>

<property name="linkTargetEventHandlers">

<list>

<bean class="com.edocs.common.hierarchy.connector.olap.OLAPServiceAgreementHandler"/>

</list>

</property>

<property name="assignedObjectProvider">

<bean class="com.edocs.common.xma.api.LookupBeanFactoryBean">

<property name="beanUri">

<value>edx:platform://modules/omf?id=ServiceAgreementSearchProvider</value>

</property>

</bean>

</property>

<property name="unassignedObjectProvider">

<bean class="com.edocs.common.xma.api.LookupBeanFactoryBean">

<property name="beanUri"> <value>edx:platform://modules/omf?id=ServiceAgreementSearchProvider</value>

</property>

</bean>

</property>

</bean>

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