protected class StoreFactoryCacheSession.PolicyCache extends Object implements PolicyStore
| Modifier | Constructor and Description |
|---|---|
protected |
PolicyCache() |
| Modifier and Type | Method and Description |
|---|---|
Policy |
create(AbstractPolicyRepresentation representation,
ResourceServer resourceServer)
Creates a new
Policy instance. |
void |
delete(String id)
Deletes a policy from the underlying persistence mechanism.
|
Policy |
findById(String id,
String resourceServerId)
Returns a
Policy with the given id |
Policy |
findByName(String name,
String resourceServerId)
Returns a
Policy with the given name |
List<Policy> |
findByResource(String resourceId,
String resourceServerId)
Returns a list of
Policy associated with a org.keycloak.authorization.core.model.Resource with the given resourceId. |
void |
findByResource(String resourceId,
String resourceServerId,
Consumer<Policy> consumer) |
List<Policy> |
findByResourceServer(Map<String,String[]> attributes,
String resourceServerId,
int firstResult,
int maxResult)
|
List<Policy> |
findByResourceServer(String resourceServerId)
|
List<Policy> |
findByResourceType(String resourceType,
String resourceServerId)
Returns a list of
Policy associated with a org.keycloak.authorization.core.model.Resource with the given type. |
void |
findByResourceType(String resourceType,
String resourceServerId,
Consumer<Policy> consumer) |
List<Policy> |
findByScopeIds(List<String> scopeIds,
String resourceServerId)
Returns a list of
Policy associated with a org.keycloak.authorization.core.model.Scope with the given scopeIds. |
List<Policy> |
findByScopeIds(List<String> scopeIds,
String resourceId,
String resourceServerId)
Returns a list of
Policy associated with a org.keycloak.authorization.core.model.Scope with the given resourceId and scopeIds. |
void |
findByScopeIds(List<String> scopeIds,
String resourceId,
String resourceServerId,
Consumer<Policy> consumer) |
List<Policy> |
findByType(String type,
String resourceServerId)
Returns a list of
Policy with the given type. |
List<Policy> |
findDependentPolicies(String id,
String resourceServerId)
Returns a list of
Policy that depends on another policy with the given id. |
public Policy create(AbstractPolicyRepresentation representation, ResourceServer resourceServer)
PolicyStorePolicy 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 PolicyStorerepresentation - the policy representationresourceServer - the resource server to which this policy belongsPolicypublic void delete(String id)
PolicyStoredelete in interface PolicyStoreid - the id of the policy to deletepublic Policy findById(String id, String resourceServerId)
PolicyStorePolicy with the given idfindById in interface PolicyStoreid - the identifier of the policyresourceServerId - the resource server idpublic Policy findByName(String name, String resourceServerId)
PolicyStorePolicy with the given namefindByName in interface PolicyStorename - the name of the policyresourceServerId - the resource server idpublic List<Policy> findByResourceServer(String resourceServerId)
PolicyStorefindByResourceServer in interface PolicyStoreresourceServerId - the identifier of a resource serverpublic List<Policy> findByResourceServer(Map<String,String[]> attributes, String resourceServerId, int firstResult, int maxResult)
PolicyStorefindByResourceServer in interface PolicyStoreattributes - a map holding the attributes that will be used as a filterresourceServerId - the identifier of a resource serverpublic List<Policy> findByResource(String resourceId, String resourceServerId)
PolicyStorePolicy associated with a org.keycloak.authorization.core.model.Resource with the given resourceId.findByResource in interface PolicyStoreresourceId - the identifier of a resourceresourceServerId - the resource server idpublic void findByResource(String resourceId, String resourceServerId, Consumer<Policy> consumer)
findByResource in interface PolicyStorepublic List<Policy> findByResourceType(String resourceType, String resourceServerId)
PolicyStorePolicy associated with a org.keycloak.authorization.core.model.Resource with the given type.findByResourceType in interface PolicyStoreresourceType - the type of a resourceresourceServerId - the resource server idpublic void findByResourceType(String resourceType, String resourceServerId, Consumer<Policy> consumer)
findByResourceType in interface PolicyStorepublic List<Policy> findByScopeIds(List<String> scopeIds, String resourceServerId)
PolicyStorePolicy associated with a org.keycloak.authorization.core.model.Scope with the given scopeIds.findByScopeIds in interface PolicyStorescopeIds - the id of the scopesresourceServerId - the resource server idpublic List<Policy> findByScopeIds(List<String> scopeIds, String resourceId, String resourceServerId)
PolicyStorePolicy associated with a org.keycloak.authorization.core.model.Scope with the given resourceId and scopeIds.findByScopeIds in interface PolicyStorescopeIds - the id of the scopesresourceId - the id of the resourceresourceServerId - the resource server idpublic void findByScopeIds(List<String> scopeIds, String resourceId, String resourceServerId, Consumer<Policy> consumer)
findByScopeIds in interface PolicyStorepublic List<Policy> findByType(String type, String resourceServerId)
PolicyStorePolicy with the given type.findByType in interface PolicyStoretype - the type of the policyresourceServerId - the resource server idpublic List<Policy> findDependentPolicies(String id, String resourceServerId)
PolicyStorePolicy that depends on another policy with the given id.findDependentPolicies in interface PolicyStoreid - the id of the policy to query its dependentsresourceServerId - the resource server idCopyright © 2021 JBoss by Red Hat. All rights reserved.