protected class StoreFactoryCacheSession.ScopeCache extends Object implements ScopeStore
Modifier | Constructor and Description |
---|---|
protected |
ScopeCache() |
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 id)
|
public Scope create(String name, ResourceServer resourceServer)
ScopeStore
Scope
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 ScopeStore
name
- the name of the scoperesourceServer
- the resource server to which this scope belongsScope
public Scope create(String id, String name, ResourceServer resourceServer)
ScopeStore
Scope
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 ScopeStore
id
- the id of the scope. Is generated randomly when nullname
- the name of the scoperesourceServer
- the resource server to which this scope belongsScope
public void delete(String id)
ScopeStore
delete
in interface ScopeStore
id
- the id of the scope to deletepublic Scope findById(String id, String resourceServerId)
ScopeStore
Scope
with the given id
findById
in interface ScopeStore
id
- the identifier of the scoperesourceServerId
- the resource server idpublic Scope findByName(String name, String resourceServerId)
ScopeStore
Scope
with the given name
findByName
in interface ScopeStore
name
- the name of the scoperesourceServerId
- the resource server idpublic List<Scope> findByResourceServer(String id)
ScopeStore
findByResourceServer
in interface ScopeStore
public List<Scope> findByResourceServer(Map<Scope.FilterOption,String[]> attributes, String resourceServerId, int firstResult, int maxResult)
ScopeStore
findByResourceServer
in interface ScopeStore
attributes
- a map holding the attributes that will be used as a filter; possible filter options are given by Scope.FilterOption
resourceServerId
- the identifier of a resource serverCopyright © 2021 JBoss by Red Hat. All rights reserved.