Package org.glassfish.deployment.common
Interface SecurityRoleMapper
-
- All Known Implementing Classes:
RoleMapper
public interface SecurityRoleMapper
This interface defines the protocol used by the DOL to access the role mapping information of a Java EE application. This class is implemented by other modules and their instanciation is done through the SecurityRoleMapperFactory class.- Author:
- Jerome Dochez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
assignRole(Principal p, Role r, RootDeploymentDescriptor rdd)
Assigns a Principal to the specified role.Enumeration
getGroupsAssignedTo(Role r)
Returns an enumeration of Groups assigned to the given roleString
getName()
Iterator
getRoles()
Map
getRoleToSubjectMapping()
Enumeration
getUsersAssignedTo(Role r)
void
setName(String name)
Set the role mapper application namevoid
unassignPrincipalFromRole(Role role, Principal principal)
Remove the given role-principal mappingvoid
unassignRole(Role role)
Remove all the role mapping information for this role
-
-
-
Method Detail
-
setName
void setName(String name)
Set the role mapper application name- Parameters:
the
- app name
-
getName
String getName()
- Returns:
- the role mapper application name
-
getRoles
Iterator getRoles()
- Returns:
- an iterator on all the assigned roles
-
getUsersAssignedTo
Enumeration getUsersAssignedTo(Role r)
- Parameters:
The
- Role to which the principals are assigned to.
-
getGroupsAssignedTo
Enumeration getGroupsAssignedTo(Role r)
Returns an enumeration of Groups assigned to the given role- Parameters:
The
- Role to which the groups are assigned to.
-
assignRole
void assignRole(Principal p, Role r, RootDeploymentDescriptor rdd)
Assigns a Principal to the specified role.- Parameters:
p
- 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 calling assignRole.
-
unassignPrincipalFromRole
void unassignPrincipalFromRole(Role role, Principal principal)
Remove the given role-principal mapping- Parameters:
role
- , Role objectprincipal
- , the principal
-
unassignRole
void unassignRole(Role role)
Remove all the role mapping information for this role- Parameters:
role
- , the role object
-
getRoleToSubjectMapping
Map getRoleToSubjectMapping()
-
-