Class MappingProviderUtil
- java.lang.Object
-
- org.jboss.security.mapping.providers.MappingProviderUtil
-
public class MappingProviderUtil extends Object
Utility class for Mapping Providers- Since:
- Oct 10, 2006
- Version:
- $Revision$
- Author:
- Anil Saldhana
-
-
Constructor Summary
Constructors Constructor Description MappingProviderUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Group
addPrincipals(Group grp, Enumeration<? extends Principal> en)
Add principals passed via an enumeration into a groupstatic Group
addRoles(Group roles, String[] addRoles)
Add the roles into the Groupstatic String[]
getRolesFromCommaSeparatedString(String str)
Given a comma-separated list of roles, return a string arraystatic Principal
instantiatePrincipal(Class<?> cls, String role)
Instantiate a Principal representing a principalstatic Group
removePrincipals(Group grp)
Remove all the principals from the groupstatic Group
removeRoles(Group roles, String[] removeRoles)
Remove the roles from the Groupstatic Group
replacePrincipals(Group fg, Group sg)
Replace the principals in first group with those in the second
-
-
-
Method Detail
-
addPrincipals
public static Group addPrincipals(Group grp, Enumeration<? extends Principal> en)
Add principals passed via an enumeration into a group- Parameters:
grp
-en
-- Returns:
-
addRoles
public static Group addRoles(Group roles, String[] addRoles)
Add the roles into the Group- Parameters:
roles
- Group of rolesaddRoles
-- Returns:
- Group with the added roles
-
getRolesFromCommaSeparatedString
public static String[] getRolesFromCommaSeparatedString(String str)
Given a comma-separated list of roles, return a string array- Parameters:
str
-- Returns:
-
instantiatePrincipal
public static Principal instantiatePrincipal(Class<?> cls, String role)
Instantiate a Principal representing a principal- Parameters:
cls
- principal classrole
- Name of the role- Returns:
-
removePrincipals
public static Group removePrincipals(Group grp)
Remove all the principals from the group- Parameters:
grp
-- Returns:
-
removeRoles
public static Group removeRoles(Group roles, String[] removeRoles)
Remove the roles from the Group- Parameters:
roles
- Group of rolesremoveRoles
-- Returns:
- Group with roles removed
-
-