Interface Realm
- 
 public interface RealmThis interface provides methods to query information from a realm.- Author:
- Pedro Igor
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Map<String,List<String>>getUserAttributes(String id)Returns all attributes associated with the a user with the givenid.List<String>getUserClientRoles(String id, String clientId)Returns all client roles granted for a user with the givenid.List<String>getUserGroups(String id)Returns all groups which the user with the givenidis a member.List<String>getUserRealmRoles(String id)Returns all realm roles granted for a user with the givenid.booleanisGroupInRole(String group, String role)Checks whether or not agroupis granted with the given realmrole.booleanisUserInClientRole(String id, String clientId, String role)Checks whether or not a user with the givenidis granted with the given clientrole.default booleanisUserInGroup(String id, String group)Checks whether or not a user with the givenidis a member of the givengroup.booleanisUserInGroup(String id, String group, boolean checkParent)Checks whether or not a user with the givenidis a member of the givengroup.booleanisUserInRealmRole(String id, String role)Checks whether or not a user with the givenidis granted with the given realmrole.
 
- 
- 
- 
Method Detail- 
isUserInGroupdefault boolean isUserInGroup(String id, String group) Checks whether or not a user with the given idis a member of the givengroup.This method will also consider memberships where the user is a member of any child group of the given group. For instance, if user is member of/Group A/Group Band this method is checking if user is a member of/Group Athe result will betruegiven that the user is a member of a child group of/Group A.- Parameters:
- id- the user id. It can be the id, username or email
- group- the group path. For instance, /Group A/Group B.
- Returns:
- true if user is a member of the given group. Otherwise returns false.
 
 - 
isUserInGroupboolean isUserInGroup(String id, String group, boolean checkParent) Checks whether or not a user with the givenidis a member of the givengroup.- Parameters:
- id- the user id. It can be the id, username or email
- group- the group path. For instance, /Group A/Group B.
- checkParent- if true, this method returns true even though the user is not directly associated with the given group but a member of any child of the group.
- Returns:
- true if user is a member of the given group. Otherwise returns false.
 
 - 
isUserInRealmRoleboolean isUserInRealmRole(String id, String role) Checks whether or not a user with the givenidis granted with the given realmrole.- Parameters:
- id- the user id. It can be the id, username or email
- role- the role name
- Returns:
- true if the user is granted with the role. Otherwise, false.
 
 - 
isUserInClientRoleboolean isUserInClientRole(String id, String clientId, String role) Checks whether or not a user with the givenidis granted with the given clientrole.- Parameters:
- id- the user id. It can be the id, username or email
- clientId- the client id
- role- the role name
- Returns:
- true if the user is granted with the role. Otherwise, false.
 
 - 
isGroupInRoleboolean isGroupInRole(String group, String role) Checks whether or not agroupis granted with the given realmrole.- Parameters:
- group- the group path. For instance, /Group A/Group B.
- role- the role name
- Returns:
- true if the group is granted with the role. Otherwise, false.
 
 - 
getUserRealmRolesList<String> getUserRealmRoles(String id) Returns all realm roles granted for a user with the givenid.- Parameters:
- id- the user id. It can be the id, username or email
- Returns:
- the roles granted to the user
 
 - 
getUserClientRolesList<String> getUserClientRoles(String id, String clientId) Returns all client roles granted for a user with the givenid.- Parameters:
- id- the user id. It can be the id, username or email
- clientId- the client id
- Returns:
- the roles granted to the user
 
 - 
getUserGroupsList<String> getUserGroups(String id) Returns all groups which the user with the givenidis a member.- Parameters:
- id- the user id. It can be the id, username or email
- Returns:
- the groups which the user is a member
 
 
- 
 
-