issrg.pba.rbac
Interface Role

All Known Subinterfaces:
RoleHierarchyNode
All Known Implementing Classes:
PermisCredentials, RoleBasedCredentials, XMLPolicyParser.RoleHierarchyNode

public interface Role

This interface represents a Role which is a unit of credential in RBAC. The API does not use this specified interface; it is specified here solely for the purpose of allowing the caller to be able to extract the values of the roles the user has got. In the general case this is not needed, because the PBAAPI is supposed to deliver the ultimate access decision.

However, in case the caller wishes to interrogate the credentials an implementation of the Role interface is required. Then the caller using the interface may retrieve the type and value of the role and treat the results for their own purposes:

Credentials c = getCreds(user);

if (c instanceof Role){
Role r = (Role)c;
String type = r.getType();
Object value = r.getValue();
...// here depending on the type of the Role
// the decision can be made about the value type,
// and then, having the value, the code can use it
}else{
... // unwind the possibly recursive SetOfSubsets credentials?
}

Version:
1.0
Author:
A Otenko

Method Summary
 java.lang.String getRoleType()
          Returns the type of the role.
 java.lang.Object getRoleValue()
          Returns the value of the role.
 

Method Detail

getRoleType

java.lang.String getRoleType()
Returns the type of the role.

Returns:
String type of the role

getRoleValue

java.lang.Object getRoleValue()
Returns the value of the role.

Returns:
value of the role