FileDocCategorySizeDatePackage
SecurityMapConfigFactory.javaAPI DocGlassfish v2 API4122Fri May 04 22:23:20 BST 2007com.sun.enterprise.management.config

SecurityMapConfigFactory

public final class SecurityMapConfigFactory extends ConfigFactory
MBean managing all instances of Connector resource.

Fields Summary
private static final String
USERNAME_KEY
private static final String
PASSWORD_KEY
Constructors Summary
public SecurityMapConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String name, java.lang.String username, java.lang.String password, java.lang.String[] principals, java.lang.String[] userGroups)

    

		 
	
	      
	      
	      
	      
	       
	
	    final String containerName  = getContainerName();
	    
		final OldConnectorConnectionPoolMBean   ccp =
		    getOldConfigProxies().getOldConnectorConnectionPool( containerName );
		    
		final Map<String,Serializable>    params  = new HashMap<String,Serializable>();
		params.put( "name", name );
		params.put( "pool_name", containerName );
		params.put( "principal", principals );
		params.put( "user_group", userGroups );
		
		final AttributeList attrs   = new AttributeList();
		for( final String key : params.keySet() )
		{
		    attrs.add( new Attribute( key, params.get( key ) ) );
		}
		
	    final String    targetName  = null;
		getOld().createSecurityMap( attrs, username, password, targetName );
		// doesn't return the ObjectName; returns null!
		final ObjectName    oldObjectName  = ccp.getSecurityMapByName( name );
		
		final ObjectName	amxName	= finish( oldObjectName, null );
		
		return( amxName );
	
private com.sun.enterprise.management.support.oldconfig.OldConnectorConnectionPoolMBeangetOld()

	    return getOldConfigProxies().getOldConnectorConnectionPool( getContainerName() );
	
protected voidremoveByName(java.lang.String name)

	    getOld().removeSecurityMapByName( name );