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,
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 authorization.core.model.Resource with the given resourceId. |
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)
|
List<Policy> |
findByScopeIds(List<String> scopeIds,
String resourceServerId)
|
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. |
default void |
notifyChange(Object cached)
Notify this store about changes to data associated with policies.
|
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 belongsPolicyvoid delete(String id)
id - the id of the policy to deletePolicy findById(String id, String resourceServerId)
Policy with the given idid - the identifier of the policyresourceServerId - the resource server idPolicy findByName(String name, String resourceServerId)
Policy with the given namename - the name of the policyresourceServerId - the resource server idList<Policy> findByResourceServer(String resourceServerId)
resourceServerId - the identifier of a resource serverList<Policy> findByResourceServer(Map<String,String[]> attributes, String resourceServerId, int firstResult, int maxResult)
attributes - a map holding the attributes that will be used as a filterresourceServerId - the identifier of a resource serverList<Policy> findByResource(String resourceId, String resourceServerId)
Policy associated with a authorization.core.model.Resource with the given resourceId.resourceId - the identifier of a resourceresourceServerId - the resource server idList<Policy> findByResourceType(String resourceType, String resourceServerId)
resourceType - the type of a resourceresourceServerId - the resource server idList<Policy> findByScopeIds(List<String> scopeIds, String resourceServerId)
scopeIds - the id of the scopesresourceServerId - the resource server idList<Policy> findByType(String type, String resourceServerId)
Policy with the given type.type - the type of the policyresourceServerId - the resource server idList<Policy> findDependentPolicies(String id, String resourceServerId)
Policy that depends on another policy with the given id.id - the id of the policy to query its dependentsresourceServerId - the resource server iddefault void notifyChange(Object cached)
cached - Copyright © 2017 JBoss by Red Hat. All rights reserved.