Oracle Fusion Middleware
Java API Reference for Oracle BPM Suite
11g Release 1 (11.1.1.7.0)
E25378-07

oracle.bpel.services.identity.hierarchy
Interface IHierarchyProvider

All Superinterfaces:
IServiceProvider

public interface IHierarchyProvider
extends IServiceProvider

Implement this interface to create a hierarchy provider. In addition to implementing this interface, the classes implementing the interface must provide a public constructor that accepts a Map<String,String> that can be used to create an instance of the hierarchy provider class, for example public MyHierarchyProviderImpl( Map<String,String> initParams){}.

Hierarchy providers must be registered in the workflow-config.xml configuration file. The Map passed to the constructor will contain any parameters defined in the configuration file entry for the provider.

When invoking an IHierarchy provider, a HierarchyPrincipal object will be passed. The HierarchyPrincipal object contains id and effectiveDate properties. The effectiveDate may be null. A list of the names of any other properties required by the HierarchyProvider must be returned by the getPropertyNames() method. These additional properties will be passed in the HierarchyPrincipal propertyBag. The values for these properties are detmerined by the ApprovalFramework by looking up matching attributes in the Task payload and in the Appoval Policy. If matching attributes are found in both sources, the value of the Approval Policy attribute takes precedence. If no matching attributes are found, then the value of the property passed to the IHierarchyProvider will be null. It is up to the IHierarchyProvider implementation how it will handle null values, for example defaulting the value, or throwing an exception.

When an IHierarchyProvider implementation returns an instance of a HierarchyPrincipal, it is responsible for setting the values of all its properties, including those in the propertyBag


Nested Class Summary
static class IHierarchyProvider.HierarchyProviderException
          Exception thrown by IHierarchyProvider methods
 
Method Summary
 java.util.List<oracle.bpel.services.identity.hierarchy.HierarchyType> fetchHierarchyTypes(java.lang.String filter, java.lang.String isoLang)
          Gets the hierarchy type values to use when looking up the hierarchiy from the provider.
 HierarchyPrincipal fetchJobLevel(HierarchyPrincipal principal)
          Determines the jobLevel for a given principal.
 HierarchyPrincipal fetchManager(HierarchyPrincipal principal)
          Determines the manager for a given HierarchyPrincipal.
 java.util.List<HierarchyPrincipal> fetchManagers(HierarchyPrincipal principal, int levelNumber)
          Determines the manager(s) for a given HierarchyPrincipal.
 java.util.List<java.lang.String> getPropertyNames()
          Returns a list of names of additional properties that the IHierarchyProvider implementation required for identifying a HierarchyPrincipal, and for traversing the hierarchy.
 
Methods inherited from interface oracle.tip.pc.services.identity.ext.IServiceProvider
init
 

Method Detail

fetchJobLevel

HierarchyPrincipal fetchJobLevel(HierarchyPrincipal principal)
                                 throws IHierarchyProvider.HierarchyProviderException
Determines the jobLevel for a given principal.

Parameters:
principal - HierarchyPrincipal to determine jobLevel for.
Returns:
same HierarchyPrincipal with job level field filled out
Throws:
IHierarchyProvider.HierarchyProviderException

fetchManager

HierarchyPrincipal fetchManager(HierarchyPrincipal principal)
                                throws IHierarchyProvider.HierarchyProviderException
Determines the manager for a given HierarchyPrincipal.

Parameters:
principal - HierarchyPrincipal to determine jobLevel for.
Returns:
HierarchyPrincipal object representing manager of principal, including job level field, and any relevant additional parameters in the propertyBag.
Throws:
IHierarchyProvider.HierarchyProviderException

getPropertyNames

java.util.List<java.lang.String> getPropertyNames()
Returns a list of names of additional properties that the IHierarchyProvider implementation required for identifying a HierarchyPrincipal, and for traversing the hierarchy. These properties will be passed in the HierarchyPrincipal's propertyBag. The ApprovalManagement framework will look up the values for these properties approval policy attribues first. If not found in the approval policy attributes, the values will be looked up from the Task payload attributes.

Returns:
a List of the names of the additional properties the IHierarchyProvider requires to be set in a HierarchyPrincipal's propertyBag.

fetchManagers

java.util.List<HierarchyPrincipal> fetchManagers(HierarchyPrincipal principal,
                                                 int levelNumber)
                                                 throws IHierarchyProvider.HierarchyProviderException
Determines the manager(s) for a given HierarchyPrincipal. This is a bulk method to avoid repeated calls to fetchManager.

Parameters:
principal - HierarchyPrincipal to determine manager for.
levelNumber - - number of level returned.
Returns:
a list of hierarchy principal, which could be less than levelNumber if the principal's top-most manager is less than the number of level specified.
Throws:
IHierarchyProvider.HierarchyProviderException

fetchHierarchyTypes

java.util.List<oracle.bpel.services.identity.hierarchy.HierarchyType> fetchHierarchyTypes(java.lang.String filter,
                                                                                          java.lang.String isoLang)
                                                                                          throws IHierarchyProvider.HierarchyProviderException
Gets the hierarchy type values to use when looking up the hierarchiy from the provider. The task could be assigned to a specific hierarchy type selected from DT@RT UI from these list of values. The hierarchy type then used to get the specific Hierarchy Principal in that hierarchy.

Parameters:
filter - specifies the filter string to get hierarchy types.
isoLang - language to get the display name of the hierarchy type.
Returns:
list of HierarchyTypes found in the hierarchy provider.
Throws:
IHierarchyProvider.HierarchyProviderException

Oracle Fusion Middleware
Java API Reference for Oracle BPM Suite
11g Release 1 (11.1.1.7.0)
E25378-07

Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.