Package org.keycloak.models
Interface RoleModel
-
- All Known Implementing Classes:
AbstractRoleModel
,MapRoleAdapter
,RoleAdapter
,RoleAdapter
public interface RoleModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RoleModel.RoleNameChangeEvent
static class
RoleModel.SearchableFields
-
Method Summary
-
-
-
Method Detail
-
getName
String getName()
-
getDescription
String getDescription()
-
setDescription
void setDescription(String description)
-
getId
String getId()
-
setName
void setName(String name)
-
isComposite
boolean isComposite()
-
addCompositeRole
void addCompositeRole(RoleModel role)
-
removeCompositeRole
void removeCompositeRole(RoleModel role)
-
getCompositesStream
default Stream<RoleModel> getCompositesStream()
Returns all composite roles as a stream.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getCompositesStream
Stream<RoleModel> getCompositesStream(String search, Integer first, Integer max)
Returns a paginated stream of composite roles ofthis
role that contain given string in its name.- Parameters:
search
- Case-insensitive search stringfirst
- Index of the first result to return. Ignored if negative ornull
.max
- Maximum number of results to return. Ignored if negative ornull
.- Returns:
- A stream of requested roles ordered by the role name
-
isClientRole
boolean isClientRole()
-
getContainerId
String getContainerId()
-
getContainer
RoleContainerModel getContainer()
-
hasRole
boolean hasRole(RoleModel role)
-
removeAttribute
void removeAttribute(String name)
-
getAttributeStream
Stream<String> getAttributeStream(String name)
Returns all role's attributes that match the given name as a stream.- Parameters:
name
-String
Name of an attribute to be used as a filter.- Returns:
- Stream of
String
. Never returnsnull
.
-
-