public class JPAScopeStore extends Object implements ScopeStore
| Constructor and Description |
|---|
JPAScopeStore(javax.persistence.EntityManager entityManager,
AuthorizationProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
Scope |
create(String name,
ResourceServer resourceServer)
Creates a new
Scope instance. |
Scope |
create(String id,
String name,
ResourceServer resourceServer)
Creates a new
Scope instance. |
void |
delete(String id)
Deletes a scope from the underlying persistence mechanism.
|
Scope |
findById(String id,
String resourceServerId)
Returns a
Scope with the given id |
Scope |
findByName(String name,
String resourceServerId)
Returns a
Scope with the given name |
List<Scope> |
findByResourceServer(Map<Scope.FilterOption,String[]> attributes,
String resourceServerId,
int firstResult,
int maxResult)
|
List<Scope> |
findByResourceServer(String serverId)
|
public JPAScopeStore(javax.persistence.EntityManager entityManager,
AuthorizationProvider provider)
public Scope create(String name, ResourceServer resourceServer)
ScopeStoreScope instance. The new instance is not necessarily persisted though, which may require
a call to the {#save} method to actually make it persistent.create in interface ScopeStorename - the name of the scoperesourceServer - the resource server to which this scope belongsScopepublic Scope create(String id, String name, ResourceServer resourceServer)
ScopeStoreScope instance. The new instance is not necessarily persisted though, which may require
a call to the {#save} method to actually make it persistent.create in interface ScopeStoreid - the id of the scope. Is generated randomly when nullname - the name of the scoperesourceServer - the resource server to which this scope belongsScopepublic void delete(String id)
ScopeStoredelete in interface ScopeStoreid - the id of the scope to deletepublic Scope findById(String id, String resourceServerId)
ScopeStoreScope with the given idfindById in interface ScopeStoreid - the identifier of the scoperesourceServerId - the resource server idpublic Scope findByName(String name, String resourceServerId)
ScopeStoreScope with the given namefindByName in interface ScopeStorename - the name of the scoperesourceServerId - the resource server idpublic List<Scope> findByResourceServer(String serverId)
ScopeStorefindByResourceServer in interface ScopeStorepublic List<Scope> findByResourceServer(Map<Scope.FilterOption,String[]> attributes, String resourceServerId, int firstResult, int maxResult)
ScopeStorefindByResourceServer in interface ScopeStoreattributes - a map holding the attributes that will be used as a filter; possible filter options are given by Scope.FilterOptionresourceServerId - the identifier of a resource serverCopyright © 2021 JBoss by Red Hat. All rights reserved.