Class DirectoryTools

java.lang.Object
com.webmethods.portal.service.dir.DirectoryTools
All Implemented Interfaces:
IDirConstants

public class DirectoryTools extends Object implements IDirConstants
Static helper functions
  • Field Details

  • Constructor Details

    • DirectoryTools

      public DirectoryTools()
  • Method Details

    • getRDN

      public static String getRDN(String dn)
      Retrieves the most significant attribute set in the DN. For example, given the dn:
            uid=Administrator,ou=People,o=datachannel.com --> uid=Administrator
            cn=Guests,ou=People,o=datachannel.com --> cn=Guests
       
    • getEscapedRDN

      public static String getEscapedRDN(String rdn)
      Returns the RDN after escaping the characters requiring escaping.
      Parameters:
      rdn -
      Returns:
    • getUID

      public static String getUID(String dn)
      Returns value of the most significant attribute in the DN. We assume that this is principal UID value. For example given dn: uid=portal admin,ou=People,o=webmethods.com. Result would be 'portal admin'
      Parameters:
      dn -
      Returns:
    • getType

      public static int getType(IURI principalURI)
    • getTypeID

      public static int getTypeID(String type)
      Examines the given type and returns the corresponding type ID
    • getDN

      public static String getDN(IURI directoryURI) throws PortalException
      Retrieve the DN from a directory URI
      Parameters:
      directoryURI - the uri to the directory resource
      Returns:
      the DN from the URI, or null if no DN found
      Throws:
      PortalException
    • constructDirectoryURI

      public static IURI constructDirectoryURI(IThingID dirServiceID, IThingID objectID, int type) throws PortalException
      Constructs directory URI in the form of: /directory///. For example: /directory/system/user/meta/default/user/0000000001 for portal admin
      Parameters:
      dirServiceID -
      objectID -
      type -
      Throws:
      PortalException
    • constructDirectoryURI

      public static IURI constructDirectoryURI(IThingID dirServiceID, String dn, int type) throws PortalException
      Throws:
      PortalException
    • getDisplayURI

      public static String getDisplayURI(IURI directoryURI, int type)
    • normalizeDN

      public static String normalizeDN(String dn)
      Removes the spaces and captialization from an LDAP distinguished-name
      Parameters:
      dn -
    • getDirSystemBizPolicy

      public static IDirSystemBizPolicy getDirSystemBizPolicy() throws PortalException
      Throws:
      PortalException
    • getMechanicsManager

      public static IMechanicsManager getMechanicsManager()
    • getDisplayName

      public static String getDisplayName(IURI principalURI) throws PortalException
      Throws:
      PortalException
    • getPrincipalDirectoryURI

      public static IURI getPrincipalDirectoryURI(IURI principalURI) throws PortalException
      Throws:
      PortalException
    • resolveUserByUUID

      public static IThingID resolveUserByUUID(IInitializableUser initializableUser) throws PortalException
      Resolve the user by UUID, If user exist update the DN and return the userThingID
      Parameters:
      initializableUser -
      Returns:
      thingId
      Throws:
      PortalException
    • getDirectoryService

      public static IDirService getDirectoryService(IURI principalURI) throws PortalException
      Throws:
      PortalException
    • invalidateGroupRoleCache

      public static void invalidateGroupRoleCache(IThingID thingID)
    • getUUIDResolution

      public static Boolean getUUIDResolution()