public interface IdentityManager
Manager to retrieve user and group information. All APIs are restricted to the current tenant unless specifically noted otherwise.
Modifier and Type | Method and Description |
---|---|
String |
getCurrentSystemAdminUserId()
Returns current tenant administrator user ID
|
String |
getSessionUserName()
Returns the display name of the current session user.
|
List<String> |
getUsersOfGroup(String groupId)
Returns all users for the given group id.
|
List<String> |
getUsersOfGroups(Collection<String> groupIds)
Returns all users for the given group ids.
|
boolean |
isUserInAllGroups(String userId,
Collection<String> groupIds)
Checks if the user with the given id is a member of all groups the collection.
|
boolean |
isUserInGroup(String userId,
String groupId)
Checks if the given user is a member of the group with the given id.
|
boolean |
isUserInGroups(String userId,
Collection<String> groupIds)
Checks if the user with the given id is a member of at least one group in the collection.
|
List<String> getUsersOfGroup(String groupId)
Returns all users for the given group id.
groupId
- the id of the groupIllegalArgumentException
- if the given group id is nullEntityNotFoundException
- if a group with the given id does not existList<String> getUsersOfGroups(Collection<String> groupIds)
Returns all users for the given group ids.
groupIds
- the ids of the groupsIllegalArgumentException
- if one of the given group ids is nullEntityNotFoundException
- if one of the groups with the given id does not existboolean isUserInGroup(String userId, String groupId)
Checks if the given user is a member of the group with the given id.
userId
- the user id, not nullgroupId
- the group id, not nullIllegalArgumentException
- if the given group or user id is nullEntityNotFoundException
- if the user or the group with the given id does not existboolean isUserInGroups(String userId, Collection<String> groupIds)
Checks if the user with the given id is a member of at least one group in the collection.
userId
- the user id, not nullgroupIds
- collection of group Ids, not nullIllegalArgumentException
- if the given collection of groups or user id is nullEntityNotFoundException
- if the user or the group with the given id does not existboolean isUserInAllGroups(String userId, Collection<String> groupIds)
Checks if the user with the given id is a member of all groups the collection.
userId
- the user id, not nullgroupIds
- collection of group Ids, not nullIllegalArgumentException
- if the given collection of groups or user id is nullEntityNotFoundException
- if the user or the group with the given id does not existString getSessionUserName()
Returns the display name of the current session user. It also adds the information if the user is impersonated by another user. Example: If the user is not impersonated it will return: "Firstname Lastname", else it will return "Firstname1 Lastname1 on behalf of Firstname2 Lastname2".
String getCurrentSystemAdminUserId()
Returns current tenant administrator user ID
Copyright © 2010 - 2018 edorasware ag. All Rights Reserved.