Class PolicyResource
java.lang.Object
org.keycloak.authorization.client.resource.PolicyResource
An entry point for managing user-managed permissions for a particular resource
- Author:
 - Pedro Igor
 
- 
Constructor Summary
ConstructorsConstructorDescriptionPolicyResource(String resourceId, Http http, ServerConfiguration serverConfiguration, TokenCallable pat)  - 
Method Summary
Modifier and TypeMethodDescriptioncreate(UmaPermissionRepresentation permission) Creates a new user-managed permission as represented by the givenpermission.voidDeletes an existing user-managed permissionQueries the server for permission matching the given parameters.Queries the server for a permission with the givenid.voidupdate(UmaPermissionRepresentation permission) Updates an existing user-managed permission 
- 
Constructor Details
- 
PolicyResource
public PolicyResource(String resourceId, Http http, ServerConfiguration serverConfiguration, TokenCallable pat)  
 - 
 - 
Method Details
- 
create
Creates a new user-managed permission as represented by the givenpermission.- Parameters:
 permission- the permission to create- Returns:
 - if successful, the permission created
 
 - 
update
Updates an existing user-managed permission- Parameters:
 permission- the permission to update
 - 
delete
Deletes an existing user-managed permission- Parameters:
 id- the permission id
 - 
find
public List<UmaPermissionRepresentation> find(String name, String scope, Integer firstResult, Integer maxResult) Queries the server for permission matching the given parameters.- Parameters:
 id- the permission idname- the name of the permissionscope- the scope associated with the permissionfirstResult- the position of the first resource to retrievemaxResult- the maximum number of resources to retrieve- Returns:
 - the permissions matching the given parameters
 
 - 
findById
Queries the server for a permission with the givenid.- Parameters:
 id- the permission id- Returns:
 - the permission with the given id
 
 
 -