Package org.keycloak.models
Interface RoleModel
- All Known Implementing Classes:
 RoleAdapter,RoleAdapter
public interface RoleModel
- Version:
 - $Revision: 1 $
 - Author:
 - Bill Burke
 
- 
Nested Class Summary
Nested Classes - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddCompositeRole(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 ofthisrole that contain given string in its name.default StringgetFirstAttribute(String name) getId()getName()booleanbooleanbooleanvoidremoveAttribute(String name) voidremoveCompositeRole(RoleModel role) voidsetAttribute(String name, List<String> values) voidsetDescription(String description) voidvoidsetSingleAttribute(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 ofthisrole 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-StringName of an attribute to be used as a filter.- Returns:
 - Stream of 
String. Never returnsnull. 
 - 
getAttributes
 
 -