GigaSpaces XAP 7.0 API

com.gigaspaces.security.directory
Class DirectoryManagerUtils

java.lang.Object
  extended by 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 Summary
DirectoryManagerUtils()
           
 
Method Summary
static List<String> getUserRoles(UserDetails user)
          Extract all roles assigned to the specified user.
static List<String> getUserRoles(UserManager userManager, String username)
          Query the UserManager for all the roles assigned to the specified user.
static List<UserDetails> getUsersWithRole(UserManager userManager, String role)
          Get all users that are assigned to the specified role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryManagerUtils

public DirectoryManagerUtils()
Method Detail

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.

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.