|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.security.Realm
org.restlet.security.MemoryRealm
public class MemoryRealm
Security realm based on a memory model. The model is composed of root groups, users and mapping to associated roles.
| Constructor Summary | |
|---|---|
MemoryRealm()
Constructor. |
|
| Method Summary | |
|---|---|
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(Application application,
Group userGroup)
Finds the roles mapped to a given user group. |
Set<Role> |
findRoles(Application application,
Set<Group> userGroups)
Finds the roles mapped to given user groups. |
Set<Role> |
findRoles(Application application,
User user)
Finds the roles mapped to a given user, for a specific application. |
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,
Application application,
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(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,
Application application,
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,
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. |
| Methods inherited from class org.restlet.security.Realm |
|---|
getEnroler, getName, getParameters, getVerifier, isStarted, isStopped, setEnroler, setName, setParameters, setVerifier, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryRealm()
| Method Detail |
|---|
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(Application application,
Group userGroup)
application - The parent application. Can't be null.userGroup - The user group.
IllegalArgumentException - If application is null.
public Set<Role> findRoles(Application application,
Set<Group> userGroups)
application - The parent application. Can't be null.userGroups - The user groups.
IllegalArgumentException - If application is null.
public Set<Role> findRoles(Application application,
User user)
application - The parent application. Can't be null.user - The user.
IllegalArgumentException - If application is null.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,
Application application,
String roleName)
user - The source user.application - The parent application. Can't be null.roleName - The target role name.
IllegalArgumentException - If application is null.
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,
Application application,
String roleName)
group - The source group.application - The parent application. Can't be null.roleName - The target role name.
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,
String roleName)
user - The source user.application - The parent application. Can't be null.roleName - The target role name.
IllegalArgumentException - If application is null.
public void unmap(User user,
Role role)
user - The source user.role - The target role.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||