public interface AuthorizationService
| Modifier and Type | Method and Description |
|---|---|
void |
appendRule(AuthorizationRule aRule)
Appends a new authorization rule to the end.
|
<T> T |
check(T aResource,
Operation aOperation)
Checks if the given operation is allowed on the resource.
|
AuthorizationRule[] |
getRules()
Gets the authorization rules.
|
void |
insertRuleAfter(int aIndex,
AuthorizationRule aRule)
Inserts a rule.
|
boolean |
isAllowed(Object aResource,
Operation aOperation)
Checks whether an operation is allowed on a resource.
|
void |
removeRule(int aIndex)
Removes a rule.
|
void |
setUserAccessor(UserAccessor aUserAccessor)
Sets the user accessor so that the authorization service can get access
to the logged in user.
|
void |
setUserAdministration(UserAdministration aUserAdmin)
Sets the user administration so that the authorization service can check
information for the the current user.
|
boolean isAllowed(Object aResource, Operation aOperation)
aResource - Resource.aOperation - Operation.<T> T check(T aResource,
Operation aOperation)
T - Type of resourceaResource - Resource.aOperation - Operation.AuthorizationException - In case access is denied.AuthorizationRule[] getRules()
void appendRule(AuthorizationRule aRule)
aRule - Rule to append.void removeRule(int aIndex)
aIndex - Index of the rule to remove.void insertRuleAfter(int aIndex,
AuthorizationRule aRule)
aIndex - Index of the position of the rule after insertion.aRule - Rule to insert.void setUserAccessor(UserAccessor aUserAccessor)
aUserAccessor - User accessor.void setUserAdministration(UserAdministration aUserAdmin)
aUserAdmin - User administration.Copyright © 2025. All rights reserved.