|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.pba.rbac.SubsetCredentials issrg.pba.rbac.RoleBasedCredentials
public class RoleBasedCredentials
This is the implementation of a credential for a role based scheme. It implements the Role interface.
Field Summary | |
---|---|
protected java.lang.String |
roleType
|
Constructor Summary | |
---|---|
protected |
RoleBasedCredentials()
|
|
RoleBasedCredentials(java.lang.String roleType,
java.lang.Object roleValue)
This constructor builds the object by specifying the Role type and value. |
Method Summary | |
---|---|
java.lang.Object |
clone()
This method creates a copy of the RoleBasedCredential |
boolean |
contains(Credentials c)
This method implements comparison of a credential to this object. |
java.lang.String |
getRoleType()
This method returns the type of the role. |
java.lang.Object |
getRoleValue()
This method returns the value of the role. |
static java.util.Vector |
getRoleValues(Credentials creds,
java.lang.String type)
This method retrieves all the Role Values of a particular type the user has got. |
static RoleBasedCredentials |
newCredentials(java.lang.String roleType,
java.lang.String roleValue)
Utility method to help build Role Based Credentials out of two strings. |
java.lang.String |
toString()
|
Methods inherited from class issrg.pba.rbac.SubsetCredentials |
---|
equals, intersection, union |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String roleType
Constructor Detail |
---|
protected RoleBasedCredentials()
public RoleBasedCredentials(java.lang.String roleType, java.lang.Object roleValue)
roleType
- is the String name of the Role type, as specified in the
Policy XMLroleValue
- is the object representing the value of the Role
java.lang.IllegalArgumentException
- if the parameters to the constructor are
semantically incorrectMethod Detail |
---|
public static RoleBasedCredentials newCredentials(java.lang.String roleType, java.lang.String roleValue)
roleType
- - the role typeroleValue
- - the value of the role
public java.lang.String getRoleType()
getRoleType
in interface Role
public java.lang.Object getRoleValue()
getRoleValue
in interface Role
public java.lang.Object clone()
clone
in interface Credentials
clone
in class SubsetCredentials
public boolean contains(Credentials c)
This is a basic Credential, which is unaware of any Role Hierarchy. Therefore, this method is the same as equals.
contains
in interface Credentials
contains
in class SubsetCredentials
c
- is the credential to compare to
SetOfSubsetsCredentials
public java.lang.String toString()
toString
in class java.lang.Object
public static java.util.Vector getRoleValues(Credentials creds, java.lang.String type)
Example:
Vector roleValues = RoleBasedCredentials.getRoleValues(subject.exportCreds(), "whatEverRoleTypeYouWant");
creds
- is the set of credentials to look thoughtype
- is a case-sensitive string name of the required role type, or
null, if roles of all types should be returned
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |