Class DirectoryManagerUtils

java.lang.Object
com.gigaspaces.security.directory.DirectoryManagerUtils

public class DirectoryManagerUtils extends Object
A helper class for managing the directory.
Since:
7.0.1
Author:
Moran Avigdor
  • Constructor Details

    • DirectoryManagerUtils

      public DirectoryManagerUtils()
  • Method Details

    • getUsersWithRole

      public static List<UserDetails> getUsersWithRole(UserManager userManager, String role)
      Get all users that are assigned to the specified role.
      Parameters:
      userManager - A user manager to query.
      role - The role to query.
      Returns:
      A list of users with the specified role.
    • getUserRoles

      public static List<String> getUserRoles(UserManager userManager, String username)
      Query the UserManager for all the roles assigned to the specified user.
      Parameters:
      userManager - A user manager to query.
      username - The user to query.
      Returns:
      A list of roles for the specified user.
    • getUserRoles

      public static List<String> getUserRoles(UserDetails user)
      Extract all roles assigned to the specified user.
      Parameters:
      user - The user to extract roles from.
      Returns:
      A list of roles for the specified user.