public class CachedResourceStore extends Object implements ResourceStore
| Constructor and Description |
|---|
CachedResourceStore(KeycloakSession session,
org.keycloak.models.authorization.infinispan.InfinispanStoreFactoryProvider.CacheTransaction transaction) |
| Modifier and Type | Method and Description |
|---|---|
Resource |
create(String name,
ResourceServer resourceServer,
String owner)
Creates a
Resource instance backed by this persistent storage implementation. |
void |
delete(String id)
Removes a
Resource instance, with the given id from the persistent storage. |
Resource |
findById(String id)
Returns a
Resource instance based on its identifier. |
Resource |
findByName(String name,
String resourceServerId)
Find a
Resource by its name. |
List<Resource> |
findByOwner(String ownerId)
Finds all
Resource instances with the given ownerId. |
List<Resource> |
findByResourceServer(String resourceServerId)
Finds all
Resource instances associated with a given resource server. |
List<Resource> |
findByScope(String... id)
Finds all
Resource associated with a given scope. |
List<Resource> |
findByType(String type)
Finds all
Resource with the given type. |
public CachedResourceStore(KeycloakSession session, org.keycloak.models.authorization.infinispan.InfinispanStoreFactoryProvider.CacheTransaction transaction)
public Resource create(String name, ResourceServer resourceServer, String owner)
ResourceStoreCreates a Resource instance backed by this persistent storage implementation.
create in interface ResourceStorename - the name of this resource. It must be unique.resourceServer - the resource server to where the given resource belongs toowner - the owner of this resource or null if the resource server is the ownerpublic void delete(String id)
ResourceStoreResource instance, with the given id from the persistent storage.delete in interface ResourceStoreid - the identifier of an existing resource instancepublic Resource findById(String id)
ResourceStoreResource instance based on its identifier.findById in interface ResourceStoreid - the identifier of an existing resource instancepublic List<Resource> findByOwner(String ownerId)
ResourceStoreResource instances with the given ownerId.findByOwner in interface ResourceStoreownerId - the identifier of the ownerpublic List<Resource> findByResourceServer(String resourceServerId)
ResourceStoreResource instances associated with a given resource server.findByResourceServer in interface ResourceStoreresourceServerId - the identifier of the resource serverpublic List<Resource> findByScope(String... id)
ResourceStoreResource associated with a given scope.findByScope in interface ResourceStoreid - one or more scope identifierspublic Resource findByName(String name, String resourceServerId)
ResourceStoreResource by its name.findByName in interface ResourceStorename - the name of the resourceresourceServerId - the identifier of the resource serverpublic List<Resource> findByType(String type)
ResourceStoreResource with the given type.findByType in interface ResourceStoretype - the type of the resourceCopyright © 2016 JBoss by Red Hat. All rights reserved.