Class HierarchyPrincipal

java.lang.Object
oracle.bpel.services.identity.hierarchy.HierarchyPrincipal
All Implemented Interfaces:
Serializable

public class HierarchyPrincipal extends Object implements Serializable
Represents a member of the hierarchy. A HierarchyPrincipal has the following parameters:
  • id - principal guid that identifies the hierachy member. Normally this value is set for start and top approvers from the approval policy. The approval management framework receives the id of each member from the IHierarchyProvider when walking up the hierarchy.
  • effectiveDate - effective date of the hierarchy to traverse. This value can be set by the aproval policy. If not available, the value will be null. It is up to the IHierarchyProvider implementation to determine how to handle a null value (for example, default to the current date).
  • jobLevel - the job level of this hierarchy member. Never set by the Approval Management framework. Must be set by the IHierarchyProvider implementation on any HierarchyPrincipal it returns. Job level is used to determine approvers in the approval policy.
  • assignmentId - the assignment id of this hierarchy member. assignmentId is set in the approval policy.
  • hierarchyType - the hierarchy type of this hierarchy member. hierarchyType value is set in the approval policy. This value usually is one of retrieved value from the IHierarchyProvider as LOV (List of Values) calling fetchHierarchyTypes() method.
  • propertyBag - a Map containing name-value pairs for the additional properties that the IHierarchyProvider implementation requires (as specified by the provider's getPropertyNames() method). This map is populated by the Approval Management framework from the approval policy and Task payload attributes. The IHierarchyProvider implementation shold populate the map with appropriate values for any HierarchyPrincipal it returns.
See Also:
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object aThat)
    Overrides equlas method of Hierarchypricipal, it comapres the object equality and id value in the object.
    fromHcmHierarchy(oracle.bpel.services.identity.hierarchy.providers.hcm.supervisory.HierarchyPrincipal hcmPrincipal)
    Unmarshalls HierarchyPrincipal from oracle.bpel.services.identity.hierarchy.providers.hcm.supervisory.HierarchyPrincipal HierarchyPrincipal.
    long
    Returns the assignment id of this hierarchy memeber.
    Returns the effective date of the hierarchy to traverse.
    Returns the hierarchy type of this hierarchy member.
    Returns principal guid used to identify the hierarchy member.
    int
    Returns the jobLevel of this hierarchy member.
    Returns a Map of additional properties required by the IHierarchyProvider implementation to identify the hierarchy member, and traverse the hierarchy.
    int
    Returns HashCode of the id field.
    void
    setAssignmentId(long assignmentId)
    Sets the assignment id of this hierarchy memeber.
    void
    setEffectiveDate(String effectiveDate)
    Sets the effective date of the hierarchy to traverse.
    void
    setHierarchyType(String hierarchyType)
    Sets the hierarchy type of this hierarchy member.
    void
    Sets principal guid used to identify the hierarchy member.
    void
    setJobLevel(int jobLevel)
    Sets the jobLevel of this hierarchy member.
    void
    setPropertyBag(Map propertyBag)
    Sets the Map of name-value pairs of additional properties required by the IHierarchyProvider.
    static oracle.bpel.services.identity.hierarchy.providers.hcm.supervisory.HierarchyPrincipal
    Marshalls HierarchyPrincipal obejct into a object that Fusion HCM uses to represent Hierarchy Principal.
    static String
    Deprecated.
    Marshalls HierarchyPrincipal into a flat Properties formatted string.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HierarchyPrincipal

      public HierarchyPrincipal()
    • HierarchyPrincipal

      public HierarchyPrincipal(String id)
    • HierarchyPrincipal

      public HierarchyPrincipal(HierarchyPrincipal p)
  • Method Details

    • getId

      public String getId()
      Returns principal guid used to identify the hierarchy member.
      Returns:
      String guid for hierarchy member.
    • getJobLevel

      public int getJobLevel()
      Returns the jobLevel of this hierarchy member. Only ever set by IHierarchyProvider implementation. Returns -1 if jobLevel is not implemented.
      Returns:
      int jobLevel
    • getEffectiveDate

      public String getEffectiveDate()
      Returns the effective date of the hierarchy to traverse. May be null. This effectiveDate string is expected to have the format "yyyy-mm-dd". For instance, April 15th, 2008 is represented as "2008-04-15".
      Returns:
      String effectiveDate
    • getAssignmentId

      public long getAssignmentId()
      Returns the assignment id of this hierarchy memeber.
      Returns:
      int assignmentId
    • getHierarchyType

      public String getHierarchyType()
      Returns the hierarchy type of this hierarchy member.
      Returns:
      String hierarchyType
    • getPropertyBag

      public Map getPropertyBag()
      Returns a Map of additional properties required by the IHierarchyProvider implementation to identify the hierarchy member, and traverse the hierarchy. The properites to be stored in the Map are specified by the IHierarchyProvider getPropertyNames() method.
      Returns:
      a Map of name-value pairs.
    • setId

      public void setId(String id)
      Sets principal guid used to identify the hierarchy member.
      Parameters:
      id - String guid for hierarchy member.
    • setJobLevel

      public void setJobLevel(int jobLevel)
      Sets the jobLevel of this hierarchy member.
      Parameters:
      jobLevel -
    • setEffectiveDate

      public void setEffectiveDate(String effectiveDate)
      Sets the effective date of the hierarchy to traverse. This effectiveDate string is expected to have the format "yyyy-mm-dd". For instance, April 15th, 2008 is represented as "2008-04-15".
      Parameters:
      effectiveDate -
    • setAssignmentId

      public void setAssignmentId(long assignmentId)
      Sets the assignment id of this hierarchy memeber.
      Parameters:
      assignmentId -
    • setHierarchyType

      public void setHierarchyType(String hierarchyType)
      Sets the hierarchy type of this hierarchy member.
      Parameters:
      hierarchyType -
    • setPropertyBag

      public void setPropertyBag(Map propertyBag)
      Sets the Map of name-value pairs of additional properties required by the IHierarchyProvider.
      Parameters:
      propertyBag -
    • toPropertiesString

      public static String toPropertiesString(HierarchyPrincipal principal)
      Deprecated.
      Marshalls HierarchyPrincipal into a flat Properties formatted string.
      Parameters:
      principal -
      Returns:
      String representation of the hierarchy pricipal.
    • equals

      public boolean equals(Object aThat)
      Overrides equlas method of Hierarchypricipal, it comapres the object equality and id value in the object.
      Overrides:
      equals in class Object
      Parameters:
      aThat - (Instance of HierarchyPrincipal to compare)
      Returns:
      boolean true if the this and input object and id are equal, otherwise false.
    • hashCode

      public int hashCode()
      Returns HashCode of the id field. If HierarchyPrincipal is not used as an hashmap key this method will be unused.
      Overrides:
      hashCode in class Object
      Returns:
      hashcode
    • toHcmHierarchy

      public static oracle.bpel.services.identity.hierarchy.providers.hcm.supervisory.HierarchyPrincipal toHcmHierarchy(HierarchyPrincipal principal)
      Marshalls HierarchyPrincipal obejct into a object that Fusion HCM uses to represent Hierarchy Principal. Used for Oracle HCM Fusion Application.
      Parameters:
      principal -
      Returns:
      instance of oracle.bpel.services.identity.hierarchy.providers.hcm.supervisory.HierarchyPrincipal
    • fromHcmHierarchy

      public static HierarchyPrincipal fromHcmHierarchy(oracle.bpel.services.identity.hierarchy.providers.hcm.supervisory.HierarchyPrincipal hcmPrincipal)
      Unmarshalls HierarchyPrincipal from oracle.bpel.services.identity.hierarchy.providers.hcm.supervisory.HierarchyPrincipal HierarchyPrincipal.
      Parameters:
      hcmPrincipal - object
      Returns:
      HierarchyPrincipal