1 23 package com.sun.enterprise.management.config; 24 25 import java.util.Map ; 26 import java.util.Properties ; 27 28 import javax.management.ObjectName ; 29 30 import javax.management.Attribute ; 31 import javax.management.AttributeList ; 32 33 import com.sun.appserv.management.base.XTypes; 34 35 import com.sun.appserv.management.util.jmx.JMXUtil; 36 37 import com.sun.enterprise.management.support.oldconfig.OldSecurityServiceMBean; 38 39 41 public final class JACCProviderConfigFactory extends ConfigFactory 42 { 43 private static final String POLICY_PROVIDER_KEY = "PolicyProvider"; 44 45 private static final String POLICY_CONFIGURATION_FACTORY_PROVIDER_KEY = 46 "PolicyConfigurationFactoryProvider"; 47 48 private final OldSecurityServiceMBean mOldSecurityService; 49 50 53 public 54 JACCProviderConfigFactory(final ConfigFactoryCallback callbacks ) 55 { 56 super( callbacks ); 57 58 mOldSecurityService = 59 getOldConfigProxies().getOldSecurityServiceMBean( getConfigName() ); 60 } 61 62 70 public ObjectName 71 create( 72 String name, 73 String policyProvider, 74 String policyConfigurationFactoryProvider, 75 Map <String ,String > reservedForFutureUse ) 76 { 77 final String [] requiredParams = { 78 POLICY_PROVIDER_KEY, policyProvider, 79 POLICY_CONFIGURATION_FACTORY_PROVIDER_KEY, policyConfigurationFactoryProvider, 80 }; 81 82 if ( name == null ) 83 { 84 throw new IllegalArgumentException ( "" + null ); 85 } 86 87 final Map <String ,String > params = initParams( name, requiredParams, reservedForFutureUse ); 88 89 final ObjectName amxName = createNamedChild( name, params ); 90 91 return amxName; 92 } 93 94 public void 95 removeByName( final String name ) 96 { 97 mOldSecurityService.removeJaccProviderByName( name ); 98 } 99 100 103 protected ObjectName 104 createOldChildConfig( final AttributeList translatedAttrs ) 105 { 106 trace( "createOldChildConfig: attrs: " + stringify( translatedAttrs ) ); 107 108 final ObjectName objectName = 109 mOldSecurityService.createJaccProvider( translatedAttrs ); 110 111 return( objectName ); 112 } 113 } 114 115 116 117 118 | Popular Tags |