public interface ResourceStore
ResourceStore
is responsible to manage the persistence of Resource
instances.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. |
Resource create(String name, ResourceServer resourceServer, String owner)
Creates a Resource
instance backed by this persistent storage implementation.
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 ownervoid delete(String id)
Resource
instance, with the given id
from the persistent storage.id
- the identifier of an existing resource instanceResource findById(String id)
Resource
instance based on its identifier.id
- the identifier of an existing resource instanceList<Resource> findByOwner(String ownerId)
Resource
instances with the given ownerId
.ownerId
- the identifier of the ownerList<Resource> findByResourceServer(String resourceServerId)
Resource
instances associated with a given resource server.resourceServerId
- the identifier of the resource serverList<Resource> findByScope(String... id)
Resource
associated with a given scope.id
- one or more scope identifiersResource findByName(String name, String resourceServerId)
Resource
by its name.name
- the name of the resourceresourceServerId
- the identifier of the resource serverCopyright © 2016 JBoss by Red Hat. All rights reserved.