public class ClientScopeStorageManager extends AbstractStorageManager<ClientScopeStorageProvider,ClientScopeStorageProviderModel> implements ClientScopeProvider
session
Constructor and Description |
---|
ClientScopeStorageManager(KeycloakSession session) |
Modifier and Type | Method and Description |
---|---|
ClientScopeModel |
addClientScope(RealmModel realm,
String id,
String name)
Creates new client scope with given internal ID and
name to the given realm. |
void |
close() |
ClientScopeModel |
getClientScopeById(RealmModel realm,
String id)
Exact search for a client scope by its internal ID..
|
Stream<ClientScopeModel> |
getClientScopesStream(RealmModel realm)
Returns all the client scopes of the given realm as a stream.
|
boolean |
removeClientScope(RealmModel realm,
String id)
Removes client scope from the given realm.
|
void |
removeClientScopes(RealmModel realm)
Removes all client scopes from the given realm.
|
consumeEnabledStorageProvidersWithTimeout, flatMapEnabledStorageProvidersWithTimeout, getEnabledStorageProviders, getStorageProviderFactory, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderModel, getStorageProviderModels, getStorageProviderTimeout, mapEnabledStorageProvidersWithTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addClientScope
public ClientScopeStorageManager(KeycloakSession session)
public ClientScopeModel getClientScopeById(RealmModel realm, String id)
ClientScopeLookupProvider
getClientScopeById
in interface ClientScopeLookupProvider
realm
- Realm.id
- Internal ID of the role.public Stream<ClientScopeModel> getClientScopesStream(RealmModel realm)
ClientScopeProvider
getClientScopesStream
in interface ClientScopeProvider
realm
- Realm.null
.public ClientScopeModel addClientScope(RealmModel realm, String id, String name)
ClientScopeProvider
name
to the given realm.
Spaces in name
will be replaced by underscore so that scope name
can be used as value of scope parameter.addClientScope
in interface ClientScopeProvider
realm
- Realm owning this client scope.id
- Internal ID of the client scope or null
if one is to be created by the underlying storename
- String name of the client scope.public boolean removeClientScope(RealmModel realm, String id)
ClientScopeProvider
removeClientScope
in interface ClientScopeProvider
realm
- Realm.id
- Internal ID of the client scopetrue
if the client scope existed and has been removed, false
otherwise.public void removeClientScopes(RealmModel realm)
ClientScopeProvider
removeClientScopes
in interface ClientScopeProvider
realm
- Realm.Copyright © 2021 JBoss by Red Hat. All rights reserved.