Class RoleMapper

    • Constructor Detail

      • RoleMapper

        public RoleMapper​(RoleMapper r)
        Copy constructor. This is called from the JSR88 implementation. This is not stored into the internal rolemapper maps.
    • Method Detail

      • assignRole

        public void assignRole​(Principal p,
                               Role r,
                               RootDeploymentDescriptor rdd)
        Assigns a Principal to the specified role. This method delegates work to internalAssignRole() after checking for conflicts. RootDeploymentDescriptor added as a fix for: https://glassfish.dev.java.net/issues/show_bug.cgi?id=2475 The first time this is called, a new Mapping object is created to store the role mapping information. When called again from a different module, the old mapping information is checked and stored and a new Mapping object is created.
        Specified by:
        assignRole in interface SecurityRoleMapper
        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 containing the role mapping
      • getRoles

        public Iterator<String> getRoles()
        Returns an enumeration of roles for this rolemapper.
        Specified by:
        getRoles in interface SecurityRoleMapper
        Returns:
        an iterator on all the assigned roles
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        String. String representation of the RoleToPrincipal Mapping