public class RoleBasedAuthorizationImpl extends Object implements RoleBasedAuthorization
| Constructor and Description |
|---|
RoleBasedAuthorizationImpl(String role) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getResource()
returns an optional resource that the role is assigned-on
|
String |
getRole()
returns the role
|
int |
hashCode() |
boolean |
match(AuthorizationContext context)
this methods verifies whether or not the authorization match the specified
context.
|
RoleBasedAuthorization |
setResource(String resource)
sets an optional resource that the role is assigned-on
|
boolean |
verify(Authorization otherAuthorization)
this method verifies whether or not the authorization implies the specified
authorization.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcreatematchpublic RoleBasedAuthorizationImpl(String role)
public String getRole()
RoleBasedAuthorizationgetRole in interface RoleBasedAuthorizationpublic boolean match(AuthorizationContext context)
Authorizationmatch in interface Authorizationcontext - the context.public boolean verify(Authorization otherAuthorization)
AuthorizationWildcardPermissionBasedAuthorization, this method
may return true even if the permissions are different
WildcardPermissionBasedAuthorization.create('*').verify(WildcardPermissionBasedAuthorization.create('anypermission'))
would return trueverify in interface AuthorizationotherAuthorization - the authorization.public String getResource()
RoleBasedAuthorizationgetResource in interface RoleBasedAuthorizationpublic RoleBasedAuthorization setResource(String resource)
RoleBasedAuthorizationsetResource in interface RoleBasedAuthorizationCopyright © 2021. All rights reserved.