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, wait
create, getPermissionType
public <T extends P> boolean isPermitted(Authentication authentication, T... permissions)
Authorizer
isPermitted
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)
Authorizer
String
permission representation.
String permission match against Authentication Permission
s 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)
Authorizer
isPermittedAny
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)
Authorizer
String
permission
representation.
String permission match against Authentication Permission
s 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)
Authorizer
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 boolean isPermittedAny(Authentication authentication, Collection<? extends P> permissions)
Authorizer
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 permissionCopyright © 2019 The Holon Platform. All rights reserved.