Class JPAStoreFactory
- java.lang.Object
-
- org.keycloak.authorization.jpa.store.JPAStoreFactory
-
- All Implemented Interfaces:
StoreFactory
,Provider
public class JPAStoreFactory extends Object implements StoreFactory
- Author:
- Pedro Igor
-
-
Constructor Summary
Constructors Constructor Description JPAStoreFactory(javax.persistence.EntityManager entityManager, AuthorizationProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
PermissionTicketStore
getPermissionTicketStore()
Returns aPermissionTicketStore
.PolicyStore
getPolicyStore()
Returns aPolicyStore
.ResourceServerStore
getResourceServerStore()
Returns aResourceServerStore
.ResourceStore
getResourceStore()
Returns aResourceStore
.ScopeStore
getScopeStore()
Returns aScopeStore
.boolean
isReadOnly()
Indicates if instances returned from storage are read-only.void
setReadOnly(boolean readOnly)
Sets whether or not changes to instances returned from this factory are supported.
-
-
-
Constructor Detail
-
JPAStoreFactory
public JPAStoreFactory(javax.persistence.EntityManager entityManager, AuthorizationProvider provider)
-
-
Method Detail
-
getPolicyStore
public PolicyStore getPolicyStore()
Description copied from interface:StoreFactory
Returns aPolicyStore
.- Specified by:
getPolicyStore
in interfaceStoreFactory
- Returns:
- the policy store
-
getResourceServerStore
public ResourceServerStore getResourceServerStore()
Description copied from interface:StoreFactory
Returns aResourceServerStore
.- Specified by:
getResourceServerStore
in interfaceStoreFactory
- Returns:
- the resource server store
-
getResourceStore
public ResourceStore getResourceStore()
Description copied from interface:StoreFactory
Returns aResourceStore
.- Specified by:
getResourceStore
in interfaceStoreFactory
- Returns:
- the resource store
-
getScopeStore
public ScopeStore getScopeStore()
Description copied from interface:StoreFactory
Returns aScopeStore
.- Specified by:
getScopeStore
in interfaceStoreFactory
- Returns:
- the scope store
-
getPermissionTicketStore
public PermissionTicketStore getPermissionTicketStore()
Description copied from interface:StoreFactory
Returns aPermissionTicketStore
.- Specified by:
getPermissionTicketStore
in interfaceStoreFactory
- Returns:
- the permission ticket store
-
setReadOnly
public void setReadOnly(boolean readOnly)
Description copied from interface:StoreFactory
Sets whether or not changes to instances returned from this factory are supported. Once marked as read-only, any attempt to change state will throw anIllegalStateException
.- Specified by:
setReadOnly
in interfaceStoreFactory
- Parameters:
readOnly
- if true, changes are not supported
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:StoreFactory
Indicates if instances returned from storage are read-only.- Specified by:
isReadOnly
in interfaceStoreFactory
- Returns:
- if true, instances only support reads.
-
-