FileDocCategorySizeDatePackage
SecurityMapConfigBeanHelper.javaAPI DocGlassfish v2 API4500Fri May 04 22:23:40 BST 2007com.sun.enterprise.management.offline

SecurityMapConfigBeanHelper

public final class SecurityMapConfigBeanHelper extends StdConfigBeanHelper

Fields Summary
private static final String
PRINCIPAL_ATTR
private static final String
USER_GROUP_ATTR
Constructors Summary
public SecurityMapConfigBeanHelper(com.sun.enterprise.config.ConfigContext configContext, com.sun.enterprise.config.ConfigBean configBean)

    
        
    
          
              
    
        super( configContext, configBean );
        
    
Methods Summary
protected java.util.Set_getAttributeNames()

        final Set<String>   attrNames = super._getAttributeNames();
        
        attrNames.add( PRINCIPAL_ATTR );
        attrNames.add( USER_GROUP_ATTR );
        
        return attrNames;
    
public java.lang.ObjectgetAttribute(java.lang.String attrName)

        Object  result  = null;
        
        if ( PRINCIPAL_ATTR.equals( attrName ) )
        {
            result  = getPrincipalNames();
        }
        else if ( USER_GROUP_ATTR.equals( attrName ) )
        {
            result  = getUserGroupNames();
        }
        else
        {
            result  = super.getAttribute( attrName );
	    }
	    return result;
    
protected java.lang.ClassgetAttributeClass(java.lang.String attrName)

        Class  result  = null;
        
        if ( PRINCIPAL_ATTR.equals( attrName ) ||
            USER_GROUP_ATTR.equals( attrName ) )
        {
            result  = String[].class;
        }
        else
        {
            result  = super.getAttributeClass( attrName );
	    }
	    return result;
    
public java.lang.String[]getPrincipalNames()

        final String    value = (String)getValue( PRINCIPAL_ATTR );
        
        // presumably spaces are not allowed in a JVM option
        final String[]  result  = (value == null) ? EMPTY_STRING_ARRAY : value.split( " " );
        
        return result;
    
public java.lang.String[]getUserGroupNames()

        final String    value = (String)getValue( USER_GROUP_ATTR );
        
        // presumably spaces are not allowed in a JVM option
        final String[]  result  = (value == null) ? EMPTY_STRING_ARRAY : value.split( " " );
        
        return result;