|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas.security.RoleMechanism
Managed roles defined in a resource and check the right access between method roles and principal roles
Method Summary | |
static RoleMechanism |
getInstance()
Return the unique instance |
boolean |
isCallerInRole(java.security.Principal principal,
java.lang.String role)
Check if the given role match the principal roles |
boolean |
isCallerInRole(java.security.Principal principal,
java.lang.String role,
java.lang.String[] pRoles)
Check if the given role match the principal roles |
boolean |
isCallerInRoles(java.security.Principal principal,
java.lang.String[] roles)
Check if the given roles match the principal roles |
boolean |
isCallerInRoles(java.security.Principal principal,
java.lang.String[] roles,
java.lang.String[] pRoles)
Check if the given roles match the principal roles |
void |
setRealmResource(java.lang.String resourceName)
Use the given realm for the mapping between the principal and the roles |
java.lang.String |
toString()
Method toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static RoleMechanism getInstance()
public void setRealmResource(java.lang.String resourceName) throws java.lang.Exception
resourceName
- the realm to use
java.lang.Exception
- if the realm doesn't existpublic boolean isCallerInRole(java.security.Principal principal, java.lang.String role, java.lang.String[] pRoles)
principal
- principalrole
- the given rolepRoles
- the roles of the principal
public boolean isCallerInRole(java.security.Principal principal, java.lang.String role)
principal
- principalrole
- the given role
public boolean isCallerInRoles(java.security.Principal principal, java.lang.String[] roles, java.lang.String[] pRoles)
principal
- principalroles
- the given rolespRoles
- the roles of the principal
public boolean isCallerInRoles(java.security.Principal principal, java.lang.String[] roles)
principal
- principalroles
- the given roles
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |