|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AuthorizationService
Service to determine if access to a certain resource is allowed.
Method Summary | ||
---|---|---|
void |
appendRule(AuthorizationRule aRule)
Appends a new authorization rule to the end. |
|
|
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(java.lang.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. |
Method Detail |
---|
boolean isAllowed(java.lang.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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |