Interface RoleMapperModel

All Known Subinterfaces:
CachedUserModel, GroupModel, UserModel
All Known Implementing Classes:
AbstractInMemoryUserAdapter, AbstractUserAdapter, AbstractUserAdapter.Streams, AbstractUserAdapterFederatedStorage, AbstractUserAdapterFederatedStorage.Streams, GroupAdapter, GroupAdapter, GroupLDAPStorageMapper.LDAPGroupMappingsUserDelegate, InMemoryUserAdapter, LDAPWritesOnlyUserModelDelegate, LightweightUserAdapter, MSADLDSUserAccountControlStorageMapper.MSADUserModelDelegate, MSADUserAccountControlStorageMapper.MSADUserModelDelegate, ReadOnlyKerberosUserModelDelegate, ReadonlyLDAPUserModelDelegate, ReadonlySSSDUserModelDelegate, ReadOnlyUserModelDelegate, RoleLDAPStorageMapper.LDAPRoleMappingsUserDelegate, TxAwareLDAPUserModelDelegate, UpdateOnlyChangeUserModelDelegate, UserAdapter, UserAdapter, UserModelDefaultMethods, UserModelDelegate

public interface RoleMapperModel
Version:
$Revision: 1 $
Author:
Bill Burke
  • Method Details

    • getRealmRoleMappingsStream

      Stream<RoleModel> getRealmRoleMappingsStream()
      Returns stream of realm roles that are directly set to this object.
      Returns:
      Stream of RoleModel. Never returns null.
    • getClientRoleMappingsStream

      Stream<RoleModel> getClientRoleMappingsStream(ClientModel app)
      Returns stream of client roles that are directly set to this object for the given client.
      Parameters:
      app - ClientModel Client to get the roles for.
      Returns:
      Stream of RoleModel. Never returns null.
    • hasDirectRole

      default boolean hasDirectRole(RoleModel role)
      Returns true, if this object is directly assigned the given role.
      Parameters:
      role - the role
      Returns:
      see description
      See Also:
    • hasRole

      boolean hasRole(RoleModel role)
      Returns true if this object is directly or indirectly assigned the given role, false otherwise.

      For example, true is returned for hasRole(R) if:

      • R is directly assigned to this object
      • R is indirectly assigned to this object via composites
      • R is not assigned to this object but this object belongs to a group G which is assigned the role R
      • R is not assigned to this object but this object belongs to a group G, and G belongs to group H which is assigned the role R
      Parameters:
      role -
      Returns:
      see description
      See Also:
    • grantRole

      void grantRole(RoleModel role)
      Grants the given role to this object.
      Parameters:
      role -
    • getRoleMappingsStream

      Stream<RoleModel> getRoleMappingsStream()
      Returns stream of all role (both realm all client) that are directly set to this object.
      Returns:
      Stream of RoleModel. Never returns null.
    • deleteRoleMapping

      void deleteRoleMapping(RoleModel role)
      Removes the given role mapping from this object.
      Parameters:
      role - Role to remove