FileDocCategorySizeDatePackage
ConfigConfigFactory.javaAPI DocGlassfish v2 API5287Fri May 04 22:23:18 BST 2007com.sun.enterprise.management.config

ConfigConfigFactory

public final class ConfigConfigFactory extends ConfigFactory

Fields Summary
private String
mSrcConfigName
private String
mNewConfigName
private final Set
LEGAL_OPTIONAL_KEYS
Constructors Summary
public ConfigConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
		
		mSrcConfigName  = null;
		mNewConfigName  = null;
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String name, java.util.Map optional)

		final String[] requiredParams = new String[] {};
		final Map<String,String> params = initParams(name, requiredParams, optional);
		
		mNewConfigName  = name;
        mSrcConfigName   = (String)optional.get( ConfigConfigKeys.SRC_CONFIG_NAME_KEY );
        if ( mSrcConfigName == null )
        {
            mSrcConfigName   = ConfigConfigKeys.DEFAULT_SRC_CONFIG_NAME;
        }
        
        
		final ObjectName amxName = createNamedChild(name, params);
		
        
		// set any optional params
		if ( amxName != null )
		{
		    final ConfigConfig  config  = getCallbacks().getProxyFactory().getProxy( amxName, ConfigConfig.class);
		    
    		Object value;
    		
    		value   = optional.get( ConfigConfigKeys.DYNAMIC_RECONFIGURATION_ENABLED_KEY );
    		if ( value != null )
    		{
    		    config.setDynamicReconfigurationEnabled( Boolean.parseBoolean( "" + value ) );
    		}
		}
		
		return( amxName );
	
protected javax.management.ObjectNamecreateOldChildConfig(javax.management.AttributeList translatedAttrs, java.util.Properties props)

		trace( "ConfigConfigFactory.createOldChildConfig: creating using: " +
		    stringify( translatedAttrs ) );

        final OldConfigsMBean  old = getOldConfigProxies().getOldConfigsMBean();
        
		final ObjectName objectName = old.copyConfiguration( mSrcConfigName, mNewConfigName, props);

		return( objectName );
	
protected java.util.SetgetLegalOptionalCreateKeys()

	
	     
	
	
		return( LEGAL_OPTIONAL_KEYS );
	
protected voidremoveByName(java.lang.String name)

		getOldConfigProxies().getOldConfigsMBean().deleteConfiguration(name);