FileDocCategorySizeDatePackage
SecurityRoleMapping.javaAPI DocGlassfish v2 API3924Fri May 04 22:31:52 BST 2007com.sun.enterprise.deployment.runtime.common

SecurityRoleMapping

public class SecurityRoleMapping extends com.sun.enterprise.deployment.runtime.RuntimeDescriptor
This is the in memory representation of the security-role-mapping information. Note that we are keeping just the literal Strings in this object. The implementation of Principal is not instantiated here. This is because 1) the dol should avoid loading any classes as the classloaders used for deployment and runtime can be different. 2) verifier uses this information and it has not access to the rolemaper on the server.
author
Jerome Dochez

Fields Summary
private String
roleName
private List
principals
private List
groups
Constructors Summary
Methods Summary
public voidaddGroupName(java.lang.String g)

        groups.add(g);
    
public voidaddPrincipalName(PrincipalNameDescriptor p)

        principals.add(p);
    
public java.util.ListgetGroupNames()

        return groups;
    
public java.lang.String[]getPrincipalName()

deprecated
This method needs to be removed once the custom principal is fully supported. We keep it for now for backward compatiblity in API. Note that this method only returns the name of the principals, not their class-names. Use with caution!

        String[] names = new String[principals.size()];
        for (int i = 0; i < principals.size(); i++) {
            names[i] = new String(principals.get(i).getName());
        }
        return names;
    
public java.util.ListgetPrincipalNames()

        return principals; 
    
public java.lang.StringgetRoleName()


       
        return roleName;
    
public voidsetRoleName(java.lang.String name)

        roleName = name;