Interface Role

All Known Subinterfaces:
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
... // unwind the possibly recursive SetOfSubsets credentials?

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


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

String type of the role


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

value of the role