@PermitAll public class PermissionServiceImpl extends BaseServiceImpl<Permission> implements PermissionService
| Constructor and Description |
|---|
PermissionServiceImpl() |
| 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.
|
getByIdpublic Set<Role> getPermittedRoles(Operation operation)
PermissionServicegetPermittedRoles in interface PermissionServiceoperation - the operationpublic Set<Permission> getPermissionsForOperation(Operation operation)
PermissionServicegetPermissionsForOperation in interface PermissionServiceoperation - the operationpublic Permission getById(UUID id)
PermissionServicegetById in interface PermissionServiceid - the ID of the permissionpublic Permission create(Operation operation, Role role)
PermissionServicecreate in interface PermissionServiceoperation - the operationrole - the allowed role for the permissionpublic void remove(Permission permission)
PermissionServiceremove in interface PermissionServicepermission - the permission to be removed.Copyright © 2015 Red Hat, Inc.. All rights reserved.