Class tcUtilLDAPOrganizationHierarchy

java.lang.Object
com.thortech.xl.util.adapters.tcUtilLDAPOrganizationHierarchy

public class tcUtilLDAPOrganizationHierarchy extends Object
Utility class that creates the organization hierarchy from an LDAP perspective in a vector. Uses the lookup LDAP.Organization.Type.Map to map organization types ("Company",...) to object types ("OU",...)

Nishant Kaushik
January 22, 2002

  • Constructor Details

    • tcUtilLDAPOrganizationHierarchy

      public tcUtilLDAPOrganizationHierarchy(com.thortech.xl.dataaccess.tcDataProvider DataBase)
      Creates a new tcUtilLDAPOrganizationHierarchy object.
      Parameters:
      DataBase -
  • Method Details

    • getHierarchyVector

      public Vector getHierarchyVector(String psActKey)
      Returns the hierarchy vector
      Parameters:
      psActKey - the organization whose hierarchy needsd to be built (inclusive)
      Returns:
      A vector of string arrays, where each string array contains one organization record, with the following data: {Org. Type, Org. Name}. The Org Type refers to the LDAP object type, eg OU, CN, etc
    • getHierarchyString

      public String getHierarchyString(String psActKey)
      Returns the hierarchy string
      Parameters:
      psActKey - the organization whose hierarchy needsd to be built (inclusive)
      Returns:
      A String of format "Class Type=Object CN,Class Type=Object CN" where:
      - Class Type is the objects class type ("CN", "OU", ...)
      - Object CN is the LDAP objects common name (" nkaushik", "finance group", ... ). Basically whatever is assigned to the mandatory property "cn" or "ou".
      E.g.CN=Dumbo,OU=Leaders,OU=Elephants,DC=thordev,DC=com
    • getParentHierarchyVector

      public Vector getParentHierarchyVector(String psActKey)
      Returns the hierarchy vector of the organization that is the parent of the specified organization
      Parameters:
      psActKey - the organization whose parent hierarchy needs to be built (exclusive)
      Returns:
      A vector of string arrays, where each string array contains one organization record, with the following data: {Org. Type, Org. Name}. The Org Type refers to the LDAP object type, eg OU, CN, etc
    • getParentHierarchyString

      public String getParentHierarchyString(String psActKey)
      Returns the hierarchy string of the organization that is the parent of the specified organization
      Parameters:
      psActKey - the organization whose parent hierarchy needs to be built
      Returns:
      A String of format "Class Type=Object CN,Class Type=Object CN" where:
      - Class Type is the objects class type ("CN", "OU", ...)
      - Object CN is the LDAP objects common name (" nkaushik", "finance group", ... ). Basically whatever is assigned to the mandatory property "cn" or "ou".
      E.g.CN=Dumbo,OU=Leaders,OU=Elephants,DC=thordev,DC=com
    • getPathFromVector

      public String getPathFromVector(Vector hierarchy)
      Uses the hierarchy vector of string arrays (of format {Class Type, Object CN}) to build the hierarchy string
      Parameters:
      hierarchyVector -
      Returns:
      String Hierarchy vector converted to a string