public class RoleMapper extends Object implements Serializable, SecurityRoleMapper
| Constructor and Description |
|---|
RoleMapper(RoleMapper r)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assignRole(Principal p,
Role r,
RootDeploymentDescriptor rdd)
Assigns a Principal to the specified role.
|
Enumeration<Group> |
getGroupsAssignedTo(Role r)
Returns an enumeration of Groups assigned to the given role
|
String |
getName() |
Iterator<String> |
getRoles()
Returns an enumeration of roles for this rolemapper.
|
Map<String,Subject> |
getRoleToSubjectMapping()
Returns the RoleToSubjectMapping for the RoleMapping
|
Enumeration<Principal> |
getUsersAssignedTo(Role r)
Returns an enumeration of Principals assigned to the given role
|
void |
setName(String name)
Set the role mapper application name
|
String |
toString() |
void |
unassignPrincipalFromRole(Role role,
Principal principal)
Remove the given role-principal mapping
|
void |
unassignRole(Role r)
Remove all the role mapping information for this role
|
public RoleMapper(RoleMapper r)
public String getName()
getName in interface SecurityRoleMapperpublic void setName(String name)
SecurityRoleMappersetName in interface SecurityRoleMappername - The application/module namepublic void unassignPrincipalFromRole(Role role, Principal principal)
unassignPrincipalFromRole in interface SecurityRoleMapperrole, - Role objectprincipal, - the principalpublic Map<String,Subject> getRoleToSubjectMapping()
getRoleToSubjectMapping in interface SecurityRoleMapperpublic void assignRole(Principal p, Role r, RootDeploymentDescriptor rdd)
assignRole in interface SecurityRoleMapperp - The principal that needs to be assigned to the role.r - The Role the principal is being assigned to.rdd - The descriptor of the module containing the role mappingpublic Iterator<String> getRoles()
getRoles in interface SecurityRoleMapperpublic Enumeration<Group> getGroupsAssignedTo(Role r)
getGroupsAssignedTo in interface SecurityRoleMapperThe - Role to which the groups are assigned to.public Enumeration<Principal> getUsersAssignedTo(Role r)
getUsersAssignedTo in interface SecurityRoleMapperThe - Role to which the principals are assigned to.public void unassignRole(Role r)
SecurityRoleMapperunassignRole in interface SecurityRoleMapperCopyright © 2017. All rights reserved.