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
Modifier and TypeInterfaceDescriptionstatic interface
static class
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompositeRole
(RoleModel role) getAttributeStream
(String name) Returns all role's attributes that match the given name as a stream.Returns all composite roles as a stream.getCompositesStream
(String search, Integer first, Integer max) Returns a paginated stream of composite roles ofthis
role that contain given string in its name.default String
getFirstAttribute
(String name) getId()
getName()
boolean
boolean
boolean
void
removeAttribute
(String name) void
removeCompositeRole
(RoleModel role) void
setAttribute
(String name, List<String> values) void
setDescription
(String description) void
void
setSingleAttribute
(String name, String value)
-
Method Details
-
getName
String getName() -
getDescription
String getDescription() -
setDescription
-
getId
String getId() -
setName
-
isComposite
boolean isComposite() -
addCompositeRole
-
removeCompositeRole
-
getCompositesStream
Returns all composite roles as a stream.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getCompositesStream
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
-
setSingleAttribute
-
setAttribute
-
removeAttribute
-
getFirstAttribute
-
getAttributeStream
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
.
-
getAttributes
-