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

ServerConfigBase

public class ServerConfigBase extends com.sun.enterprise.management.config.AMXConfigImplBase

Fields Summary
private static final String
TEMPLATE_PREFIX
Constructors Summary
public ServerConfigBase(String j2eeType, com.sun.enterprise.management.support.Delegate delegate)

		super( delegate);
		
	
Methods Summary
protected voidaddCustomMappings(com.sun.enterprise.management.support.AMXAttributeNameMapper mapper)

	    super.addCustomMappings( mapper );
	    
		// these require custom mappings due to different names...
		mapper.matchName( "ReferencedConfigName", "ConfigRef");
		mapper.matchName( "ReferencedNodeAgentName", "NodeAgentRef" );
	
public booleanisTemplateString(java.lang.String s)

		 
	    
	
		// at least one character must be between the {} 
		return( s != null &&
			s.startsWith( TEMPLATE_PREFIX ) &&
			s.indexOf( "}" ) >= TEMPLATE_PREFIX.length() + 1 );
	
public java.lang.StringresolveTemplateString(java.lang.String template)

		String	result	= template;
		
		if ( isTemplateString( template ) )
		{
			final String			myName		= getName();
			final OldDomainMBean	oldDomain	= getOldConfigProxies().getOldDomainMBean();
			
   			try
   			{
   				result	= oldDomain.resolveTokens( template, myName);
   			}
   			catch( Exception e )
   			{
   				getMBeanLogger().warning( "Can't resolve: " + template + ", " + e);
   				e.printStackTrace();
   				throw new IllegalArgumentException( template );
   			}
		}
		return( result );