public class MemoryRealm extends Realm
Constructor and Description |
---|
MemoryRealm()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Set<Group> |
findGroups(User user)
Finds the set of groups where a given user is a member.
|
Set<Group> |
findGroups(User user,
boolean inheritOnly)
Finds the set of groups where a given user is a member.
|
Set<Role> |
findRoles(Group userGroup)
Finds the roles mapped to given user group.
|
Set<Role> |
findRoles(Set<Group> userGroups)
Finds the roles mapped to given user groups.
|
Set<Role> |
findRoles(User user)
Finds the roles mapped to a given user.
|
User |
findUser(String userIdentifier)
Finds a user in the organization based on its identifier.
|
List<Group> |
getRootGroups()
Returns the modifiable list of root groups.
|
List<User> |
getUsers()
Returns the modifiable list of users.
|
void |
map(Group group,
Role role)
Maps a group defined in a component to a role defined in the application.
|
void |
map(User user,
Role role)
Maps a user defined in a component to a role defined in the application.
|
void |
setRootGroups(List<Group> rootGroups)
Sets the modifiable list of root groups.
|
void |
setUsers(List<User> users)
Sets the modifiable list of users.
|
void |
unmap(Group group,
Role role)
Unmaps a group defined in a component from a role defined in the
application.
|
void |
unmap(User user,
Role role)
Unmaps a user defined in a component from a role defined in the
application.
|
getEnroler, getName, getParameters, getVerifier, isStarted, isStopped, setEnroler, setName, setParameters, setVerifier, start, stop, toString
public Set<Group> findGroups(User user)
user
- The member user.public Set<Group> findGroups(User user, boolean inheritOnly)
user
- The member user.inheritOnly
- Indicates if only the ancestors groups that have their
"inheritRoles" property enabled should be added.public Set<Role> findRoles(Group userGroup)
userGroup
- The user group.public Set<Role> findRoles(Set<Group> userGroups)
userGroups
- The user groups.public Set<Role> findRoles(User user)
user
- The user.public User findUser(String userIdentifier)
userIdentifier
- The identifier to match.public List<Group> getRootGroups()
public List<User> getUsers()
public void map(Group group, Role role)
group
- The source group.role
- The target role.public void map(User user, Role role)
user
- The source user.role
- The target role.public void setRootGroups(List<Group> rootGroups)
rootGroups
- A list of root groups.public void setUsers(List<User> users)
users
- A list of users.public void unmap(Group group, Role role)
group
- The source group.role
- The target role.Copyright © 2005–2015. All rights reserved.