Package org.keycloak.models
Interface RoleContainerModel
-
- All Known Subinterfaces:
CachedRealmModel
,ClientModel
,LegacyRealmModel
,RealmModel
- All Known Implementing Classes:
AbstractClientModel
,AbstractClientStorageAdapter
,AbstractReadOnlyClientStorageAdapter
,AbstractRealmModel
,ClientAdapter
,ClientAdapter
,ClientModelLazyDelegate
,ClientModelLazyDelegate.WithId
,MapClientAdapter
,MapRealmAdapter
,OIDCClientSecretConfigWrapper.ReadOnlyRotatedSecretClientModel
,OpenshiftSAClientAdapter
,RealmAdapter
,RealmAdapter
,UnsupportedOperationsClientStorageAdapter
public interface RoleContainerModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RoleContainerModel.RoleRemovedEvent
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
addDefaultRole(String name)
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
.RoleModel
addRole(String name)
RoleModel
addRole(String id, String name)
default List<String>
getDefaultRoles()
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
.Stream<String>
getDefaultRolesStream()
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
.String
getId()
RoleModel
getRole(String name)
Stream<RoleModel>
getRolesStream()
Returns available roles as a stream.Stream<RoleModel>
getRolesStream(Integer firstResult, Integer maxResults)
Returns available roles as a stream.void
removeDefaultRoles(String... defaultRoles)
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
.boolean
removeRole(RoleModel role)
Stream<RoleModel>
searchForRolesStream(String search, Integer first, Integer max)
Searches roles by the given name.default void
updateDefaultRoles(String... defaultRoles)
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
.
-
-
-
Method Detail
-
getId
String getId()
-
removeRole
boolean removeRole(RoleModel role)
-
getRolesStream
Stream<RoleModel> getRolesStream()
Returns available roles as a stream.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getRolesStream
Stream<RoleModel> getRolesStream(Integer firstResult, Integer maxResults)
Returns available roles as a stream.- Parameters:
firstResult
-Integer
Index of the first desired role. Ignored if negative ornull
.maxResults
-Integer
Maximum number of returned roles. Ignored if negative ornull
.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
searchForRolesStream
Stream<RoleModel> searchForRolesStream(String search, Integer first, Integer max)
Searches roles by the given name. Returns all roles that match the given filter.- Parameters:
search
-String
Name of the role to be used as a filter.first
-Integer
Index of the first desired role. Ignored if negative ornull
.max
-Integer
Maximum number of returned roles. Ignored if negative ornull
.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getDefaultRoles
@Deprecated default List<String> getDefaultRoles()
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
. This method will be removed.- Returns:
- List of default roles names or empty list if there are none. Never returns
null
.
-
getDefaultRolesStream
@Deprecated Stream<String> getDefaultRolesStream()
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
. This method will be removed.- Returns:
- Stream of default roles names or empty stream if there are none. Never returns
null
.
-
addDefaultRole
@Deprecated void addDefaultRole(String name)
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
. This method will be removed.
-
updateDefaultRoles
@Deprecated default void updateDefaultRoles(String... defaultRoles)
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
. This method will be removed.
-
removeDefaultRoles
@Deprecated void removeDefaultRoles(String... defaultRoles)
Deprecated.Default roles are now managed byRealmModel.getDefaultRole()
. This method will be removed.
-
-