Interface SecurityRoleMapper


public interface SecurityRoleMapper
This interface defines the protocol used by the DOL to access the role mapping information of a J2EE application. This class is implemented by other modules and their instanciation is done through the SecurityRoleMapperFactory class.
Author:
Jerome Dochez
  • Method Details

    • setName

      void setName(String name)
      Set the role mapper application name
      Parameters:
      name - the app name
    • getName

      String getName()
      Returns:
      the role mapper application name
    • getRoles

      Iterator<String> getRoles()
      Returns:
      an iterator on all the assigned roles
    • getUsersAssignedTo

      Enumeration<? extends Principal> getUsersAssignedTo(org.glassfish.security.common.Role r)
      Parameters:
      r - The Role to which the principals are assigned to.
      Returns:
      an enumeration of Principals assigned to the given role
    • getGroupsAssignedTo

      Enumeration<? extends Principal> getGroupsAssignedTo(org.glassfish.security.common.Role r)
      Parameters:
      r - The Role to which the groups are assigned to.
      Returns:
      an enumeration of Groups assigned to the given role
    • assignRole

      void assignRole(Principal p, org.glassfish.security.common.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(org.glassfish.security.common.Role role, Principal principal)
      Remove the given role-principal mapping
      Parameters:
      role - Role object
      principal - the principal
    • unassignRole

      void unassignRole(org.glassfish.security.common.Role role)
      Remove all the role mapping information for this role
      Parameters:
      role - the role object
    • getRoleToSubjectMapping

      Map<String,Subject> getRoleToSubjectMapping()
      Returns:
      a map of roles to the corresponding subjects
    • getGroupToRolesMapping

      Map<String,Set<String>> getGroupToRolesMapping()
      Returns:
    • getCallerToRolesMapping

      Map<String,Set<String>> getCallerToRolesMapping()
      Returns:
    • isDefaultPrincipalToRoleMapping

      boolean isDefaultPrincipalToRoleMapping()
      Returns:
    • getGroups

      Set<String> getGroups(Subject subject)
      Extracts the groups from the GlassFish specific and potential other unknown principals.
      Parameters:
      subject - container for finding groups, may be null
      Returns:
      a list of (non-mapped) groups
    • getCallerPrincipal

      Principal getCallerPrincipal(Subject subject)
      Parameters:
      subject -
      Returns: