|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.lib.security.mapping.JPolicyUserRoleMapping
public class JPolicyUserRoleMapping
Helper class to manage user to role mapping It uses the contextId as identifier. For clients, as there is no contextId, this is a per jvm property with contextId equals to "global"
Field Summary | |
---|---|
static String |
GLOBAL_CTXID
Global contextID (per JVM configuration) |
Method Summary | |
---|---|
static void |
addGlobalUserToRoleMapping(String principalName,
String[] roles)
Add a mapping for the given principal name (on all JVM) |
static void |
addUserToRoleMapping(String contextId,
String principalName,
String[] roles)
Add a mapping for the given principal name |
static String[] |
getGlobalMappingForPrincipal(String principalName)
Gets the mapping for a principal name |
static String[] |
getMappingForPrincipal(String contextId,
String principalName)
Gets the mapping for a principal name |
static void |
removeUserToRoleMapping(String contextId)
Remove a mapping for the given context Id |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String GLOBAL_CTXID
Method Detail |
---|
public static void addUserToRoleMapping(String contextId, String principalName, String[] roles)
contextId
- Id of the applicationprincipalName
- mapping for this principal nameroles
- roles for the principalpublic static void addGlobalUserToRoleMapping(String principalName, String[] roles)
principalName
- mapping for this principal nameroles
- roles for the principalpublic static String[] getMappingForPrincipal(String contextId, String principalName)
contextId
- Id of the applicationprincipalName
- name of the principal on which we want to retrieve
roles
public static String[] getGlobalMappingForPrincipal(String principalName)
principalName
- name of the principal on which we want to retrieve
roles
public static void removeUserToRoleMapping(String contextId)
contextId
- Id of the application
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |