public interface IdentityManager
Modifier and Type | Method and Description |
---|---|
com.edorasware.commons.core.entity.UserId |
getCurrentSystemAdminUserId()
Returns current tenant administrator UserId
|
String |
getSessionUserName()
Returns the display name of the current session user.
|
com.google.common.collect.ImmutableList<com.edorasware.commons.core.entity.UserId> |
getUsersOfGroup(String groupId)
Returns all users for the given group id.
|
com.google.common.collect.ImmutableList<com.edorasware.commons.core.entity.UserId> |
getUsersOfGroups(Collection<?> groupIds)
Returns all users for the given group ids.
|
boolean |
isUserInAllGroups(String userId,
Collection<?> 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<?> groupIds)
Checks if the user with the given id is a member of at least one group in the collection.
|
com.google.common.collect.ImmutableList<com.edorasware.commons.core.entity.UserId> getUsersOfGroup(String groupId)
groupId
- the id of the groupIllegalArgumentException
- if the given group id is nullcom.edorasware.commons.core.entity.EntityNotFoundException
- if a group with the given id does not existcom.google.common.collect.ImmutableList<com.edorasware.commons.core.entity.UserId> getUsersOfGroups(Collection<?> groupIds)
groupIds
- the ids of the groupsIllegalArgumentException
- if one of the given group ids is nullcom.edorasware.commons.core.entity.EntityNotFoundException
- if one of the groups with the given id does not existboolean isUserInGroup(String userId, String groupId)
userId
- the user id, not nullgroupId
- the group id, not nullIllegalArgumentException
- if the given group or user id is nullcom.edorasware.commons.core.entity.EntityNotFoundException
- if the user or the group with the given id does not existboolean isUserInGroups(String userId, Collection<?> groupIds)
userId
- the user id, not nullgroupIds
- collection of group Ids, not nullIllegalArgumentException
- if the given collection of groups or user id is nullcom.edorasware.commons.core.entity.EntityNotFoundException
- if the user or the group with the given id does not existboolean isUserInAllGroups(String userId, Collection<?> groupIds)
userId
- the user id, not nullgroupIds
- collection of group Ids, not nullIllegalArgumentException
- if the given collection of groups or user id is nullcom.edorasware.commons.core.entity.EntityNotFoundException
- if the user or the group with the given id does not existString getSessionUserName()
com.edorasware.commons.core.entity.UserId getCurrentSystemAdminUserId()
Copyright © 2010 - 2017 edorasware ag. All Rights Reserved.