Class JPAResourceServerStore
- java.lang.Object
-
- org.keycloak.authorization.jpa.store.JPAResourceServerStore
-
- All Implemented Interfaces:
ResourceServerStore
public class JPAResourceServerStore extends Object implements ResourceServerStore
- Author:
- Pedro Igor
-
-
Constructor Summary
Constructors Constructor Description JPAResourceServerStore(javax.persistence.EntityManager entityManager, AuthorizationProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceServer
create(ClientModel client)
Creates aResourceServer
instance backed by this persistent storage implementation.void
delete(ClientModel client)
Removes aResourceServer
instance, with the given client from the persistent storage.ResourceServer
findByClient(ClientModel client)
Returns aResourceServer
instance based on a client.ResourceServer
findById(RealmModel realm, String id)
Returns aResourceServer
instance based on its identifier.
-
-
-
Constructor Detail
-
JPAResourceServerStore
public JPAResourceServerStore(javax.persistence.EntityManager entityManager, AuthorizationProvider provider)
-
-
Method Detail
-
create
public ResourceServer create(ClientModel client)
Description copied from interface:ResourceServerStore
Creates a
ResourceServer
instance backed by this persistent storage implementation.- Specified by:
create
in interfaceResourceServerStore
- Parameters:
client
- the client acting as a resource server. Cannot benull
.- Returns:
- an instance backed by the underlying storage implementation
-
delete
public void delete(ClientModel client)
Description copied from interface:ResourceServerStore
Removes aResourceServer
instance, with the given client from the persistent storage.- Specified by:
delete
in interfaceResourceServerStore
- Parameters:
client
- the client acting as a resource server. Cannot benull
.
-
findById
public ResourceServer findById(RealmModel realm, String id)
Description copied from interface:ResourceServerStore
Returns aResourceServer
instance based on its identifier.- Specified by:
findById
in interfaceResourceServerStore
- Parameters:
realm
- the realm. Cannot benull
.id
- the identifier of an existing resource server instance- Returns:
- the resource server instance with the given identifier or null if no instance was found
-
findByClient
public ResourceServer findByClient(ClientModel client)
Description copied from interface:ResourceServerStore
Returns aResourceServer
instance based on a client.- Specified by:
findByClient
in interfaceResourceServerStore
- Parameters:
client
- the client acting as a resource server. Cannot benull
.- Returns:
- the resource server instance or null if no instance was found
-
-