org.apache.avalon.composition.data.builder
Class XMLProfileCreator

java.lang.Object
  extended byorg.apache.avalon.composition.data.builder.XMLProfileCreator
Direct Known Subclasses:
XMLComponentProfileCreator, XMLContainmentProfileCreator

public abstract class XMLProfileCreator
extends Object

Version:
$Revision: 1.7 $ $Date: 2004/03/17 10:39:11 $
Author:
Avalon Development Team

Constructor Summary
XMLProfileCreator()
           
 
Method Summary
protected  int getActivationDirective(Configuration config)
          Get the activation policy from a configuration.
protected  int getActivationDirective(Configuration config, int fallback)
          Get the activation policy from a configuration.
 CategoriesDirective getCategoriesDirective(Configuration config)
          Creation of a single categories directive instance from a supplied configuration fragment.
 CategoryDirective getCategoryDirective(Configuration config)
           
protected  String getName(String base, Configuration config, String defaultName)
          Get the profile name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLProfileCreator

public XMLProfileCreator()
Method Detail

getName

protected String getName(String base,
                         Configuration config,
                         String defaultName)
Get the profile name.

Parameters:
config - a configuration fragment describing the profile.

getActivationDirective

protected int getActivationDirective(Configuration config)
Get the activation policy from a configuration. If no activation attribute is present the value return defaults to FALSE (i.e. activation is deferred).

Parameters:
config - a configuration fragment holding a activation attribute
Returns:
TRUE is the value of the activation attribute is 'true' or 'startup' otherwise the return value is FALSE

getActivationDirective

protected int getActivationDirective(Configuration config,
                                     int fallback)
Get the activation policy from a configuration.

Parameters:
config - a configuration fragment holding a activation attribute
fallback - the default policy
Returns:
activation policy

getCategoriesDirective

public CategoriesDirective getCategoriesDirective(Configuration config)
                                           throws ConfigurationException
Creation of a single categories directive instance from a supplied configuration fragment.

Parameters:
config - the configuration fragment
Returns:
the categories directive
Throws:
ConfigurationException

getCategoryDirective

public CategoryDirective getCategoryDirective(Configuration config)
                                       throws ConfigurationException
Throws:
ConfigurationException


Copyright © The Apache Software Foundation. All Rights Reserved.