public class MemoryRealm extends Realm
Constructor and Description |
---|
MemoryRealm()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<Group> |
findGroups(User user)
Finds the set of groups where a given user is a member.
|
java.util.Set<Group> |
findGroups(User user,
boolean inheritOnly)
Finds the set of groups where a given user is a member.
|
java.util.Set<Role> |
findRoles(Application application,
Group userGroup)
Finds the roles mapped to a given user group.
|
java.util.Set<Role> |
findRoles(Application application,
java.util.Set<Group> userGroups)
Finds the roles mapped to given user groups.
|
java.util.Set<Role> |
findRoles(Application application,
User user)
Finds the roles mapped to a given user, for a specific application.
|
java.util.Set<Role> |
findRoles(Group userGroup)
Finds the roles mapped to given user group.
|
java.util.Set<Role> |
findRoles(java.util.Set<Group> userGroups)
Finds the roles mapped to given user groups.
|
java.util.Set<Role> |
findRoles(User user)
Finds the roles mapped to a given user.
|
User |
findUser(java.lang.String userIdentifier)
Finds a user in the organization based on its identifier.
|
java.util.List<Group> |
getRootGroups()
Returns the modifiable list of root groups.
|
java.util.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,
Application application,
java.lang.String roleName)
Maps a user 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(java.util.List<Group> rootGroups)
Sets the modifiable list of root groups.
|
void |
setUsers(java.util.List<User> users)
Sets the modifiable list of users.
|
void |
unmap(Group group,
Application application,
java.lang.String roleName)
Unmaps a group defined in a component from a role defined in the
application.
|
void |
unmap(Group group,
Role role)
Unmaps a group defined in a component from a role defined in the
application.
|
void |
unmap(User user,
Application application,
java.lang.String roleName)
Unmaps a user 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 java.util.Set<Group> findGroups(User user)
user
- The member user.public java.util.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 java.util.Set<Role> findRoles(Application application, Group userGroup)
application
- The parent application. Can't be null.userGroup
- The user group.java.lang.IllegalArgumentException
- If application is null.public java.util.Set<Role> findRoles(Application application, java.util.Set<Group> userGroups)
application
- The parent application. Can't be null.userGroups
- The user groups.java.lang.IllegalArgumentException
- If application is null.public java.util.Set<Role> findRoles(Application application, User user)
application
- The parent application. Can't be null.user
- The user.java.lang.IllegalArgumentException
- If application is null.public java.util.Set<Role> findRoles(Group userGroup)
userGroup
- The user group.public java.util.Set<Role> findRoles(java.util.Set<Group> userGroups)
userGroups
- The user groups.public java.util.Set<Role> findRoles(User user)
user
- The user.public User findUser(java.lang.String userIdentifier)
userIdentifier
- The identifier to match.public java.util.List<Group> getRootGroups()
public java.util.List<User> getUsers()
public void map(Group group, Role role)
group
- The source group.role
- The target role.public void map(User user, Application application, java.lang.String roleName)
user
- The source user.application
- The parent application. Can't be null.roleName
- The target role name.java.lang.IllegalArgumentException
- If application is null.public void map(User user, Role role)
user
- The source user.role
- The target role.public void setRootGroups(java.util.List<Group> rootGroups)
rootGroups
- A list of root groups.public void setUsers(java.util.List<User> users)
users
- A list of users.public void unmap(Group group, Application application, java.lang.String roleName)
group
- The source group.application
- The parent application. Can't be null.roleName
- The target role name.java.lang.IllegalArgumentException
- If application is null.public void unmap(Group group, Role role)
group
- The source group.role
- The target role.public void unmap(User user, Application application, java.lang.String roleName)
user
- The source user.application
- The parent application. Can't be null.roleName
- The target role name.java.lang.IllegalArgumentException
- If application is null.Copyright © 2005-2024 Restlet.