P - Supported permission typepublic abstract class AbstractAuthorizer<P extends Permission> extends Object implements Authorizer<P>
Authorizer implementationDefaultAuthorizer| Constructor and Description |
|---|
AbstractAuthorizer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isPermitted(Authentication authentication,
Collection<? extends P> permissions)
Check if given Authentication has all the specified permissions.
|
boolean |
isPermitted(Authentication authentication,
String... permissions)
Check if given Authentication has all specified permission/s, using the
String permission representation. |
<T extends P> |
isPermitted(Authentication authentication,
T... permissions)
Check if given Authentication has all the specified permission/s.
|
boolean |
isPermittedAny(Authentication authentication,
Collection<? extends P> permissions)
Check if given Authentication has any of the specified permissions.
|
boolean |
isPermittedAny(Authentication authentication,
String... permissions)
Check if given Authentication has any of the specified permission/s, using the
String permission
representation. |
<T extends P> |
isPermittedAny(Authentication authentication,
T... permissions)
Check if given Authentication has any of the specified permission/s.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, getPermissionTypepublic <T extends P> boolean isPermitted(Authentication authentication, T... permissions)
AuthorizerisPermitted in interface Authorizer<P extends Permission>T - Permission typeauthentication - The Authentication for which to check the permissionspermissions - The permissions to be checkedtrue if given Authentication has all the specified permissionspublic boolean isPermitted(Authentication authentication, String... permissions)
AuthorizerString permission representation.
String permission match against Authentication Permissions should be performed using the
Permission.getPermission() method.
isPermitted in interface Authorizer<P extends Permission>authentication - The Authentication for which to check the permissionspermissions - The permissions to be checkedtrue if given Authentication has all the specified permissionspublic <T extends P> boolean isPermittedAny(Authentication authentication, T... permissions)
AuthorizerisPermittedAny in interface Authorizer<P extends Permission>T - Permission typeauthentication - The Authentication for which to check the permissionspermissions - The permissions to be checkedtrue if given Authentication has any of the specified permissionpublic boolean isPermittedAny(Authentication authentication, String... permissions)
AuthorizerString permission
representation.
String permission match against Authentication Permissions will be performed using
Permission.getPermission() method.
isPermittedAny in interface Authorizer<P extends Permission>authentication - The Authentication for which to check the permissionspermissions - The permissions to be checkedtrue if given Authentication has any of the specified permissionpublic boolean isPermitted(Authentication authentication, Collection<? extends P> permissions)
AuthorizerisPermitted in interface Authorizer<P extends Permission>authentication - The Authentication for which to check the permissionspermissions - The permissions to be checkedtrue if given Authentication has all the specified permissionspublic boolean isPermittedAny(Authentication authentication, Collection<? extends P> permissions)
AuthorizerisPermittedAny in interface Authorizer<P extends Permission>authentication - The Authentication for which to check the permissionspermissions - The permissions to be checkedtrue if given Authentication has any of the specified permissionCopyright © 2019 The Holon Platform. All rights reserved.