Class MapScopeStore
java.lang.Object
org.keycloak.models.map.authorization.MapScopeStore
- All Implemented Interfaces:
ScopeStore
-
Constructor Summary
ConstructorsConstructorDescriptionMapScopeStore(MapStorage<MapScopeEntity, Scope> scopeStore, AuthorizationProvider provider) -
Method Summary
Modifier and TypeMethodDescriptioncreate(ResourceServer resourceServer, String id, String name) Creates a newScopeinstance.voiddelete(RealmModel realm, String id) Deletes a scope from the underlying persistence mechanism.findById(RealmModel realm, ResourceServer resourceServer, String id) Returns aScopewith the givenidfindByName(ResourceServer resourceServer, String name) Returns aScopewith the givennamefindByResourceServer(ResourceServer resourceServer) Returns a list ofScopeassociated with theResourceServer.findByResourceServer(ResourceServer resourceServer, Map<Scope.FilterOption, String[]> attributes, Integer firstResult, Integer maxResults) voidpreRemove(RealmModel realm) voidpreRemove(RealmModel realm, ResourceServer resourceServer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.authorization.store.ScopeStore
create
-
Constructor Details
-
MapScopeStore
-
-
Method Details
-
create
Description copied from interface:ScopeStoreCreates a newScopeinstance. The new instance is not necessarily persisted though, which may require a call to the {#save} method to actually make it persistent.- Specified by:
createin interfaceScopeStore- Parameters:
resourceServer- the resource server to which this scope belongs. Cannot benull.id- the id of the scope. Is generated randomly when nullname- the name of the scope- Returns:
- a new instance of
Scope
-
delete
Description copied from interface:ScopeStoreDeletes a scope from the underlying persistence mechanism.- Specified by:
deletein interfaceScopeStore- Parameters:
realm- the realm. Cannot benull.id- the id of the scope to delete
-
findById
Description copied from interface:ScopeStoreReturns aScopewith the givenid- Specified by:
findByIdin interfaceScopeStore- Parameters:
realm- the realm. Cannot benull.resourceServer- the resource server id. Ignored ifnull.id- the identifier of the scope- Returns:
- a scope with the given identifier.
-
findByName
Description copied from interface:ScopeStoreReturns aScopewith the givenname- Specified by:
findByNamein interfaceScopeStore- Parameters:
resourceServer- the resource server. Cannot benull.name- the name of the scope- Returns:
- a scope with the given name.
-
findByResourceServer
Description copied from interface:ScopeStoreReturns a list ofScopeassociated with theResourceServer.- Specified by:
findByResourceServerin interfaceScopeStore- Parameters:
resourceServer- the resource server. Cannot benull.- Returns:
- a list of scopes that belong to the given resource server
-
findByResourceServer
public List<Scope> findByResourceServer(ResourceServer resourceServer, Map<Scope.FilterOption, String[]> attributes, Integer firstResult, Integer maxResults) Description copied from interface:ScopeStore- Specified by:
findByResourceServerin interfaceScopeStore- Parameters:
resourceServer- the resource server. Cannot benull.attributes- a map holding the attributes that will be used as a filter; possible filter options are given byScope.FilterOptionfirstResult- first result to return. Ignored if negative ornull.maxResults- maximum number of results to return. Ignored if negative ornull.- Returns:
- a list of scopes that belong to the given resource server
-
preRemove
-
preRemove
-