Class JPAResourceStore
- java.lang.Object
-
- org.keycloak.authorization.jpa.store.JPAResourceStore
-
- All Implemented Interfaces:
ResourceStore
public class JPAResourceStore extends Object implements ResourceStore
- Author:
- Pedro Igor
-
-
Constructor Summary
Constructors Constructor Description JPAResourceStore(javax.persistence.EntityManager entityManager, AuthorizationProvider provider)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.authorization.store.ResourceStore
create, findByName, findByOwner, findByScopes, findByType
-
-
-
-
Constructor Detail
-
JPAResourceStore
public JPAResourceStore(javax.persistence.EntityManager entityManager, AuthorizationProvider provider)
-
-
Method Detail
-
create
public Resource create(ResourceServer resourceServer, String id, String name, String owner)
- Specified by:
create
in interfaceResourceStore
-
delete
public void delete(RealmModel realm, String id)
- Specified by:
delete
in interfaceResourceStore
-
findById
public Resource findById(RealmModel realm, ResourceServer resourceServer, String id)
- Specified by:
findById
in interfaceResourceStore
-
findByOwner
public void findByOwner(RealmModel realm, ResourceServer resourceServer, String ownerId, Consumer<Resource> consumer)
- Specified by:
findByOwner
in interfaceResourceStore
-
findByResourceServer
public List<Resource> findByResourceServer(ResourceServer resourceServer)
- Specified by:
findByResourceServer
in interfaceResourceStore
-
find
public List<Resource> find(RealmModel realm, ResourceServer resourceServer, Map<Resource.FilterOption,String[]> attributes, Integer firstResult, Integer maxResults)
- Specified by:
find
in interfaceResourceStore
-
findByScopes
public void findByScopes(ResourceServer resourceServer, Set<Scope> scopes, Consumer<Resource> consumer)
- Specified by:
findByScopes
in interfaceResourceStore
-
findByName
public Resource findByName(ResourceServer resourceServer, String name, String ownerId)
- Specified by:
findByName
in interfaceResourceStore
-
findByType
public void findByType(ResourceServer resourceServer, String type, Consumer<Resource> consumer)
- Specified by:
findByType
in interfaceResourceStore
-
findByType
public void findByType(ResourceServer resourceServer, String type, String owner, Consumer<Resource> consumer)
- Specified by:
findByType
in interfaceResourceStore
-
findByTypeInstance
public void findByTypeInstance(ResourceServer resourceServer, String type, Consumer<Resource> consumer)
- Specified by:
findByTypeInstance
in interfaceResourceStore
-
-