FileDocCategorySizeDatePackage
AuthRealmConfigFactory.javaAPI DocGlassfish v2 API5594Fri May 04 22:23:16 BST 2007com.sun.enterprise.management.config

AuthRealmConfigFactory

public final class AuthRealmConfigFactory extends ConfigFactory

Fields Summary
static final String
CLASSNAME_KEY
Constructors Summary
public AuthRealmConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
		
		assert( FileRealm.JAAS_CONTEXT_PARAM.equals(
		    StringUtil.stripPrefix( JAAS_CONTEXT_PROPERTY_KEY,
		            PropertiesAccess.PROPERTY_PREFIX ) ) );
		            
		assert( FileRealm.PARAM_KEYFILE.equals(
		    StringUtil.stripPrefix( KEY_FILE_PROPERTY_KEY,
		            PropertiesAccess.PROPERTY_PREFIX ) ) );
	
Methods Summary
private voidcheckDefaultProps(java.util.Map optional)

	
	     
	    
	
        final String    keyFile = optional == null ?
                            null : (String)optional.get( KEY_FILE_PROPERTY_KEY );
        if ( keyFile == null )
        {
            throw new IllegalArgumentException(
                "Must specify a key file using KEY_FILE_PROPERTY_KEY in options Map" );
        }
        
        final String    jaasContext = optional == null ?
                            null : (String)optional.get( JAAS_CONTEXT_PROPERTY_KEY );
        if ( jaasContext == null )
        {
            throw new IllegalArgumentException(
                "Must specify a JAAS context file using JAAS_CONTEXT_PROPERTY_KEY in options Map" );
        }
	
public javax.management.ObjectNamecreate(java.lang.String name, java.lang.String className, java.util.Map optional)

	    if ( className.equals( DEFAULT_REALM_CLASSNAME ) )
	    {
	        checkDefaultProps( optional );
	    }
	    
		final String[] requiredParams = { CLASSNAME_KEY, className,	};

		final Map<String,String> params =
		    initParams( name, requiredParams, optional );

		final ObjectName amxName = createNamedChild( name, params );

		return amxName;
	
protected javax.management.ObjectNamecreateOldChildConfig(javax.management.AttributeList translatedAttrs, java.util.Properties props)
The caller is responsible for dealing with any Properties.

		final String	target	= getConfigName();
		
		final ObjectName	objectName	=
		    getOldConfigsMBean().createAuthRealm(
		        translatedAttrs, props, target);
		
		return( objectName );
	
private final com.sun.enterprise.management.support.oldconfig.OldConfigsMBeangetOldConfigsMBean()

		final OldConfigsMBean	oldConfigs =
			getOldConfigProxies().getOldConfigsMBean();
		return( oldConfigs );
	
private final com.sun.enterprise.management.support.oldconfig.OldSecurityServiceMBeangetOldSecurityServiceMBean()

		final OldSecurityServiceMBean	oldSecurityService =
			getOldConfigProxies().getOldSecurityServiceMBean( getConfigName() );
		return( oldSecurityService );
	
protected final voidremoveByName(java.lang.String authLayer)

		getOldSecurityServiceMBean().removeAuthRealmByName( authLayer );