|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.safehaus.triplesec.guardian.Role
public class Role
An application role. Roles are application specific and contain a set of permission grants. Users assigned to these Roles inherit the set of permission grants from their roles.
| Constructor Summary | |
|---|---|
Role(ApplicationPolicy store,
java.lang.String name,
Permissions permissions)
Creates a new Role instance. |
|
Role(ApplicationPolicy store,
java.lang.String name,
Permissions permissions,
java.lang.String description)
Creates a new Role instance with a description. |
|
| Method Summary | |
|---|---|
void |
checkPermission(Permission permission)
Assertive permission check to test if this role has the effective permission. |
void |
checkPermission(Permission permission,
java.lang.String message)
Assertive permission check to test if this Role has the effective permission. |
void |
checkPermission(java.lang.String permissionName)
Assertive permission check to test if this role has the effective permission. |
void |
checkPermission(java.lang.String permissionName,
java.lang.String message)
Assertive permission check to test if this role has the effective permission. |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object that)
|
boolean |
equals(java.lang.Object that)
|
java.lang.String |
getApplicationName()
Gets the application name this Role is defined for. |
java.lang.String |
getDescription()
Gets a brief description for this Role if one exists. |
Permissions |
getGrants()
Gets a set of permissions granted to this role. |
java.lang.String |
getName()
Gets the name of this Role. |
int |
hashCode()
|
boolean |
hasPermission(Permission permission)
Get's whether or not this Role has the permission. |
boolean |
hasPermission(java.lang.String permissionName)
Get's whether or not this Role has the permission. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Role(ApplicationPolicy store,
java.lang.String name,
Permissions permissions,
java.lang.String description)
store - the parent store this role is defined forname - the name of this rolepermissions - a set of permissions granted for this roledescription - a breif description of the role
public Role(ApplicationPolicy store,
java.lang.String name,
Permissions permissions)
store - the parent store this role is defined forname - the name of this rolepermissions - a set of permissions granted for this role| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getDescription()
public java.lang.String getApplicationName()
public Permissions getGrants()
public void checkPermission(Permission permission)
permission - the permission to check for
java.security.AccessControlException - if the permission is not grantedpublic boolean hasPermission(java.lang.String permissionName)
permissionName - the permission to check for
public boolean hasPermission(Permission permission)
permission - the name of permission to check for
public void checkPermission(java.lang.String permissionName)
permissionName - the name of the permission to check for
java.security.AccessControlException - if the permission is not granted
public void checkPermission(Permission permission,
java.lang.String message)
permission - the permission to check formessage - to use for AccessControlException if it is thrown
java.security.AccessControlException - if the permission is not granted
public void checkPermission(java.lang.String permissionName,
java.lang.String message)
permissionName - the permission name to check formessage - to use for AccessControlException if it is thrown
java.security.AccessControlException - if the permission is not grantedpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object that)
equals in class java.lang.Objectpublic int compareTo(java.lang.Object that)
compareTo in interface java.lang.Comparablepublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||