public interface PolicyStore
PolicyStore
is responsible to manage the persistence of Policy
instances.Modifier and Type | Method and Description |
---|---|
Policy |
create(String name,
String type,
ResourceServer resourceServer)
Creates a new
Policy instance. |
void |
delete(String id)
Deletes a policy from the underlying persistence mechanism.
|
Policy |
findById(String id)
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)
Returns a list of
Policy associated with a org.keycloak.authorization.core.model.Resource with the given resourceId . |
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 . |
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> |
findByType(String type)
Returns a list of
Policy with the given type . |
List<Policy> |
findDependentPolicies(String id)
Returns a list of
Policy that depends on another policy with the given id . |
Policy create(String name, String type, ResourceServer resourceServer)
Policy
instance. The new instance is not necessarily persisted though, which may require
a call to the {#save} method to actually make it persistent.name
- the name of the policytype
- the type of the policyresourceServer
- the resource server to which this policy belongsPolicy
void delete(String id)
id
- the id of the policy to deletePolicy findById(String id)
Policy
with the given id
id
- the identifier of the policyPolicy findByName(String name, String resourceServerId)
Policy
with the given name
name
- the name of the policyresourceServerId
- the resource server idList<Policy> findByResourceServer(String resourceServerId)
resourceServerId
- the identifier of a resource serverList<Policy> findByResource(String resourceId)
Policy
associated with a org.keycloak.authorization.core.model.Resource
with the given resourceId
.resourceId
- the identifier of a resourceList<Policy> findByResourceType(String resourceType, String resourceServerId)
Policy
associated with a org.keycloak.authorization.core.model.Resource
with the given type
.resourceType
- the type of a resourceresourceServerId
- the resource server idList<Policy> findByScopeIds(List<String> scopeIds, String resourceServerId)
Policy
associated with a org.keycloak.authorization.core.model.Scope
with the given scopeIds
.scopeIds
- the id of the scopesresourceServerId
- the resource server idList<Policy> findByType(String type)
Policy
with the given type
.type
- the type of the policyCopyright © 2016 JBoss by Red Hat. All rights reserved.