FileDocCategorySizeDatePackage
ConfigSetup.javaAPI DocGlassfish v2 API5160Fri May 04 22:23:54 BST 2007com.sun.enterprise.management.config

ConfigSetup

public final class ConfigSetup extends Object

Fields Summary
final com.sun.appserv.management.DomainRoot
mDomainRoot
public static final String
TEST_SERVER_NAME
public static final String
TEST_CONFIG_NAME
Constructors Summary
public ConfigSetup(com.sun.appserv.management.DomainRoot domainRoot)

    
        
        
    
        mDomainRoot = domainRoot;
    
Methods Summary
public com.sun.appserv.management.config.ConfigConfigcreateConfig(java.lang.String name)

        final Map<String,String>    options = new HashMap<String,String>();
        
        final ConfigConfig  config =
            getDomainConfig().createConfigConfig( name, options );
            
        return config;
    
public com.sun.appserv.management.config.StandaloneServerConfigcreateServer(java.lang.String name, int basePort, java.lang.String nodeAgentName, java.lang.String configName)

        final Map<String,String>    options = new HashMap<String,String>();
        
        setupServerPorts( options, basePort );
        
        final StandaloneServerConfig  server =
            getDomainConfig().createStandaloneServerConfig(
                name, nodeAgentName, configName, options );
            
        return server;
    
public com.sun.appserv.management.config.DomainConfiggetDomainConfig()

        return mDomainRoot.getDomainConfig();
    
public booleanremoveConfig(java.lang.String name)

       boolean exists = getDomainConfig().getConfigConfigMap().get( name ) != null;
        
        if ( exists )
        {
            getDomainConfig().removeConfigConfig( name );
        }
        
       return exists;
    
public booleanremoveServer(java.lang.String name)

        boolean exists = getDomainConfig().getStandaloneServerConfigMap().get( name ) != null;

        if ( exists )
        {
            getDomainConfig().removeStandaloneServerConfig( name );
        }

        return exists;
    
public voidsetupServerPorts(java.util.Map options, int basePort)

        if ( basePort > 0 )
        {
            options.put( ServerConfigKeys.HTTP_LISTENER_1_PORT_KEY, "" + (basePort + 0) );
            options.put( ServerConfigKeys.HTTP_LISTENER_2_PORT_KEY, "" + (basePort + 1) );
            options.put( ServerConfigKeys.ORB_LISTENER_1_PORT_KEY, "" + (basePort + 2) );
            options.put( ServerConfigKeys.SSL_PORT_KEY, "" + (basePort + 3) );
            options.put( ServerConfigKeys.SSL_MUTUALAUTH_PORT_KEY, "" + (basePort + 4) );
            options.put( ServerConfigKeys.JMX_SYSTEM_CONNECTOR_PORT_KEY, "" + (basePort + 5) );
            options.put( ServerConfigKeys.JMS_PROVIDER_PORT_KEY, "" + (basePort + 6) );
            options.put( ServerConfigKeys.ADMIN_LISTENER_PORT_KEY, "" + (basePort + 7) );
        }