Package org.keycloak.storage
Class ClientScopeStorageManager
java.lang.Object
org.keycloak.storage.AbstractStorageManager<ClientScopeStorageProvider,ClientScopeStorageProviderModel>
org.keycloak.storage.ClientScopeStorageManager
- All Implemented Interfaces:
ClientScopeProvider,Provider,ClientScopeLookupProvider
public class ClientScopeStorageManager
extends AbstractStorageManager<ClientScopeStorageProvider,ClientScopeStorageProviderModel>
implements ClientScopeProvider
-
Field Summary
Fields inherited from class org.keycloak.storage.AbstractStorageManager
session -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddClientScope(RealmModel realm, String id, String name) Creates new client scope with given internal ID andnameto the given realm.voidclose()getClientScopeById(RealmModel realm, String id) Exact search for a client scope by its internal ID..getClientScopesByAttributes(RealmModel realm, Map<String, String> searchMap, boolean useOr) Allows us to filter for scopes by specific attributesgetClientScopesByProtocol(RealmModel realm, String protocol) Must retrieve all client scopes of the given realm that are use the given protocol.getClientScopesStream(RealmModel realm) Returns all the client scopes of the given realm as a stream.booleanremoveClientScope(RealmModel realm, String id) Removes client scope from the given realm.voidremoveClientScopes(RealmModel realm) Removes all client scopes from the given realm.Methods inherited from class org.keycloak.storage.AbstractStorageManager
consumeEnabledStorageProvidersWithTimeout, flatMapEnabledStorageProvidersWithTimeout, getEnabledStorageProviders, getStorageProviderFactory, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderModel, getStorageProviderModels, getStorageProviderTimeout, mapEnabledStorageProvidersWithTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.ClientScopeProvider
addClientScope
-
Constructor Details
-
ClientScopeStorageManager
-
-
Method Details
-
getClientScopeById
Description copied from interface:ClientScopeLookupProviderExact search for a client scope by its internal ID..- Specified by:
getClientScopeByIdin interfaceClientScopeLookupProvider- Parameters:
realm- Realm.id- Internal ID of the role.- Returns:
- Model of the client scope.
-
getClientScopesStream
Description copied from interface:ClientScopeProviderReturns all the client scopes of the given realm as a stream.- Specified by:
getClientScopesStreamin interfaceClientScopeProvider- Parameters:
realm- Realm.- Returns:
- Stream of the client scopes. Never returns
null.
-
addClientScope
Description copied from interface:ClientScopeProviderCreates new client scope with given internal ID andnameto the given realm. Spaces innamewill be replaced by underscore so that scope name can be used as value of scope parameter.- Specified by:
addClientScopein interfaceClientScopeProvider- Parameters:
realm- Realm owning this client scope.id- Internal ID of the client scope ornullif one is to be created by the underlying storename- String name of the client scope.- Returns:
- Model of the created client scope.
-
removeClientScope
Description copied from interface:ClientScopeProviderRemoves client scope from the given realm.- Specified by:
removeClientScopein interfaceClientScopeProvider- Parameters:
realm- Realm.id- Internal ID of the client scope- Returns:
trueif the client scope existed and has been removed,falseotherwise.
-
removeClientScopes
Description copied from interface:ClientScopeProviderRemoves all client scopes from the given realm.- Specified by:
removeClientScopesin interfaceClientScopeProvider- Parameters:
realm- Realm.
-
getClientScopesByProtocol
Description copied from interface:ClientScopeProviderMust retrieve all client scopes of the given realm that are use the given protocol.- Specified by:
getClientScopesByProtocolin interfaceClientScopeProvider- Parameters:
realm- the realm to retrieve the client scopes from.protocol- the protocol expected from the clientScope
-
getClientScopesByAttributes
public Stream<ClientScopeModel> getClientScopesByAttributes(RealmModel realm, Map<String, String> searchMap, boolean useOr) Description copied from interface:ClientScopeProviderAllows us to filter for scopes by specific attributes- Specified by:
getClientScopesByAttributesin interfaceClientScopeProvider- Parameters:
realm- Realm.searchMap- a key-value map that holds the attribute names and values to search for.useOr- If the search-params should be combined with or-expressions or and-expressions
-
close
public void close()
-