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

ProviderConfigFactory

public final class ProviderConfigFactory extends ConfigFactory

Fields Summary
private final com.sun.enterprise.management.support.oldconfig.OldSecurityServiceMBean
mOldSecurityServiceMBean
private final com.sun.enterprise.management.support.oldconfig.OldMessageSecurityConfigMBean
mOldMessageSecurityConfigMBean
Constructors Summary
public ProviderConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
		
        // the type=message-security MBean just doesn't work; we must use
        // the type=security-service MBean instead.
		mOldSecurityServiceMBean	=
			getOldConfigProxies().getOldSecurityServiceMBean( getConfigName() );
		
		mOldMessageSecurityConfigMBean   = getOldMessageSecurityConfigMBean();
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String name, java.lang.String providerType, java.lang.String providerClassname, java.util.Map optional)
The underlying API is function-oriented mess. We actually have to "create" a new message security (which might already exist) in order to create a provider-config. This is a special-case compared to all the other ones.

        final MessageSecurityConfig msc = (MessageSecurityConfig)getFactoryContainer();
        final SecurityServiceConfig ss  = (SecurityServiceConfig)(msc.getContainer());
        
        final MessageSecurityConfig newMSC  = 
            ss.createMessageSecurityConfig( msc.getAuthLayer(), name, providerType, providerClassname, optional );
        // 'newMSC' and 'msc' should be the same.
        
        final ProviderConfig providerConfig = newMSC.getProviderConfigMap().get( name );
        
		return Util.getObjectName( providerConfig );
	
private final com.sun.enterprise.management.support.oldconfig.OldMessageSecurityConfigMBeangetOldMessageSecurityConfigMBean()

		final String name   = getFactoryContainer().getName();
		return getOldConfigProxies().getOldMessageSecurityConfigMBean( name );
	
protected final voidremoveByName(java.lang.String name)

		getOldMessageSecurityConfigMBean().removeProviderConfigByProviderId( name );