protected class StoreFactoryCacheSession.ResourceCache extends Object implements ResourceStore
| Modifier | Constructor and Description |
|---|---|
protected |
ResourceCache() |
| Modifier and Type | Method and Description |
|---|---|
Resource |
create(String name,
ResourceServer resourceServer,
String owner)
Creates a
Resource instance backed by this persistent storage implementation. |
Resource |
create(String id,
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,
String resourceServerId)
Returns a
Resource instance based on its identifier. |
Resource |
findByName(String name,
String resourceServerId)
Find a
Resource by its name where the owner is the resource server itself. |
Resource |
findByName(String name,
String ownerId,
String resourceServerId)
Find a
Resource by its name where the owner is the given ownerId. |
List<Resource> |
findByOwner(String ownerId,
String resourceServerId)
Finds all
Resource instances with the given ownerId. |
void |
findByOwner(String ownerId,
String resourceServerId,
Consumer<Resource> consumer) |
List<Resource> |
findByOwner(String ownerId,
String resourceServerId,
int first,
int max) |
List<Resource> |
findByResourceServer(Map<String,String[]> attributes,
String resourceServerId,
int firstResult,
int maxResult)
Finds all
Resource instances associated with a given resource server. |
List<Resource> |
findByResourceServer(String resourceServerId)
Finds all
Resource instances associated with a given resource server. |
List<Resource> |
findByScope(List<String> ids,
String resourceServerId)
Finds all
Resource associated with a given scope. |
void |
findByScope(List<String> ids,
String resourceServerId,
Consumer<Resource> consumer) |
List<Resource> |
findByType(String type,
String resourceServerId)
Finds all
Resource with the given type. |
void |
findByType(String type,
String resourceServerId,
Consumer<Resource> consumer)
Finds all
Resource with the given type. |
List<Resource> |
findByType(String type,
String owner,
String resourceServerId)
Finds all
Resource with the given type. |
void |
findByType(String type,
String owner,
String resourceServerId,
Consumer<Resource> consumer)
Finds all
Resource with the given type. |
List<Resource> |
findByTypeInstance(String type,
String resourceServerId) |
void |
findByTypeInstance(String type,
String resourceServerId,
Consumer<Resource> consumer) |
List<Resource> |
findByUri(String uri,
String resourceServerId)
Finds all
Resource instances with the given uri. |
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 Resource create(String id, String name, ResourceServer resourceServer, String owner)
ResourceStoreCreates a Resource instance backed by this persistent storage implementation.
create in interface ResourceStoreid - the id of this resource. It must be unique.name - 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, String resourceServerId)
ResourceStoreResource instance based on its identifier.findById in interface ResourceStoreid - the identifier of an existing resource instancepublic Resource findByName(String name, String resourceServerId)
ResourceStoreResource by its name where the owner is the resource server itself.findByName in interface ResourceStorename - the name of the resourceresourceServerId - the identifier of the resource serverpublic Resource findByName(String name, String ownerId, String resourceServerId)
ResourceStoreResource by its name where the owner is the given ownerId.findByName in interface ResourceStorename - the name of the resourceownerId - the owner idresourceServerId - the identifier of the resource serverpublic List<Resource> findByOwner(String ownerId, String resourceServerId)
ResourceStoreResource instances with the given ownerId.findByOwner in interface ResourceStoreownerId - the identifier of the ownerpublic void findByOwner(String ownerId, String resourceServerId, Consumer<Resource> consumer)
findByOwner in interface ResourceStorepublic List<Resource> findByOwner(String ownerId, String resourceServerId, int first, int max)
findByOwner in interface ResourceStorepublic List<Resource> findByUri(String uri, String resourceServerId)
ResourceStoreResource instances with the given uri.findByUri in interface ResourceStoreuri - the identifier of the uripublic 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> findByResourceServer(Map<String,String[]> attributes, String resourceServerId, int firstResult, int maxResult)
ResourceStoreResource instances associated with a given resource server.findByResourceServer in interface ResourceStoreattributes - a map holding the attributes that will be used as a filterresourceServerId - the identifier of the resource serverpublic List<Resource> findByScope(List<String> ids, String resourceServerId)
ResourceStoreResource associated with a given scope.findByScope in interface ResourceStoreids - one or more scope identifierspublic void findByScope(List<String> ids, String resourceServerId, Consumer<Resource> consumer)
findByScope in interface ResourceStorepublic List<Resource> findByType(String type, String resourceServerId)
ResourceStoreResource with the given type.findByType in interface ResourceStoretype - the type of the resourcepublic void findByType(String type, String resourceServerId, Consumer<Resource> consumer)
ResourceStoreResource with the given type.findByType in interface ResourceStoretype - the type of the resourceresourceServerId - the resource server idconsumer - the result consumerpublic List<Resource> findByType(String type, String owner, String resourceServerId)
ResourceStoreResource with the given type.findByType in interface ResourceStoretype - the type of the resourceowner - the resource owner or null for any resource with a given typepublic void findByType(String type, String owner, String resourceServerId, Consumer<Resource> consumer)
ResourceStoreResource with the given type.findByType in interface ResourceStoretype - the type of the resourceowner - the resource owner or null for any resource with a given typeresourceServerId - the resource server idconsumer - the result consumerpublic List<Resource> findByTypeInstance(String type, String resourceServerId)
findByTypeInstance in interface ResourceStorepublic void findByTypeInstance(String type, String resourceServerId, Consumer<Resource> consumer)
findByTypeInstance in interface ResourceStoreCopyright © 2021 JBoss by Red Hat. All rights reserved.