public class MappingProviderUtil extends Object
Constructor and Description |
---|
MappingProviderUtil() |
Modifier and Type | Method and Description |
---|---|
static Group |
addPrincipals(Group grp,
Enumeration<? extends Principal> en)
Add principals passed via an enumeration into a group
|
static Group |
addRoles(Group roles,
String[] addRoles)
Add the roles into the Group
|
static String[] |
getRolesFromCommaSeparatedString(String str)
Given a comma-separated list of roles, return a string array
|
static Principal |
instantiatePrincipal(Class<?> cls,
String role)
Instantiate a Principal representing a principal
|
static Group |
removePrincipals(Group grp)
Remove all the principals from the group
|
static Group |
removeRoles(Group roles,
String[] removeRoles)
Remove the roles from the Group
|
static Group |
replacePrincipals(Group fg,
Group sg)
Replace the principals in first group with those in the second
|
public static Group addPrincipals(Group grp, Enumeration<? extends Principal> en)
grp
- en
- public static Group addRoles(Group roles, String[] addRoles)
roles
- Group of rolesaddRoles
- public static String[] getRolesFromCommaSeparatedString(String str)
str
- public static Principal instantiatePrincipal(Class<?> cls, String role)
cls
- principal classrole
- Name of the rolepublic static Group removePrincipals(Group grp)
grp
- public static Group removeRoles(Group roles, String[] removeRoles)
roles
- Group of rolesremoveRoles
- Copyright © 2016 JBoss by Red Hat. All rights reserved.