public interface PermissionService
@Inject PermissionService permissionService;
Concrete implementations do not hold any state, but it's advised to get an instance through CDI or as an EJB.| Modifier and Type | Method and Description |
|---|---|
Permission |
create(Operation operation,
Role role)
Creates a permission composed of the given operation and role
|
Permission |
getById(UUID id)
Retrieves an existing Permission based on its ID
|
Set<Permission> |
getPermissionsForOperation(Operation operation)
Provides a list of Permissions that exists for the given operation
|
Set<Role> |
getPermittedRoles(Operation operation)
Provides a list of roles that have permission to perform the given operation.
|
void |
remove(Permission permission)
Removes the given permission from the data store.
|
Set<Role> getPermittedRoles(Operation operation)
operation - the operationSet<Permission> getPermissionsForOperation(Operation operation)
operation - the operationPermission getById(UUID id)
id - the ID of the permissionPermission create(Operation operation, Role role)
operation - the operationrole - the allowed role for the permissionvoid remove(Permission permission)
permission - the permission to be removed.Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.