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

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

public class XMLComponentProfileCreator
extends XMLProfileCreator

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

Constructor Summary
XMLComponentProfileCreator()
           
 
Method Summary
 ComponentProfile createComponentProfile(Configuration config)
          Creation of a ComponentProfile from an XML configuration.
 ComponentProfile createComponentProfile(String classname, Configuration config, String name)
          Creation of a ComponentProfile from an XML configuration.
 ComponentProfile createComponentProfile(String base, String classname, Configuration config)
          Creation of a ComponentProfile from an XML configuration.
protected  int getCollectionPolicy(Configuration config)
          Get the collection policy from a configuration.
 ContextDirective getContextDirective(Configuration config)
          Utility method to create a new context directive.
protected  DependencyDirective getDependencyDirective(Configuration config)
           
protected  DependencyDirective[] getDependencyDirectives(Configuration config)
           
protected  EntryDirective[] getEntries(Configuration[] configs)
          Utility method to create a set of entry directives.
protected  Parameter getParameter(Configuration config)
          Utility method to create a new parameter directive.
protected  Parameters getParameters(Configuration config)
           
protected  Parameter[] getParameters(Configuration[] configs)
          Utility method to create a set of parameter directive.
protected  SelectionDirective getSelectionDirective(Configuration config)
           
protected  StageDirective getStageDirective(Configuration config)
           
protected  StageDirective[] getStageDirectives(Configuration config)
           
 
Methods inherited from class org.apache.avalon.composition.data.builder.XMLProfileCreator
getActivationDirective, getActivationDirective, getCategoriesDirective, getCategoryDirective, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLComponentProfileCreator

public XMLComponentProfileCreator()
Method Detail

createComponentProfile

public ComponentProfile createComponentProfile(Configuration config)
                                        throws Exception
Creation of a ComponentProfile from an XML configuration.

Parameters:
config - the configuration instance describing the component deployment scenario
Returns:
the deployment profile
Throws:
Exception

createComponentProfile

public ComponentProfile createComponentProfile(String base,
                                               String classname,
                                               Configuration config)
                                        throws Exception
Creation of a ComponentProfile from an XML configuration.

Parameters:
base - the default name
config - the configuration describing the component deployment scenario
Returns:
the deployment profile
Throws:
Exception

createComponentProfile

public ComponentProfile createComponentProfile(String classname,
                                               Configuration config,
                                               String name)
                                        throws Exception
Creation of a ComponentProfile from an XML configuration.

Parameters:
classname - the name of the class identifying the underlying component type
config - the configuration describing the component deployment scenario
Returns:
the deployment profile
Throws:
Exception

getCollectionPolicy

protected int getCollectionPolicy(Configuration config)
Get the collection policy from a configuration. If the collection policy is not declared a null is returned indicating that the collection policy shall default to the component type collection policy.

Parameters:
config - a configuration fragment holding a collection attribute
Returns:
collection policy

getDependencyDirectives

protected DependencyDirective[] getDependencyDirectives(Configuration config)
                                                 throws ConfigurationException
Throws:
ConfigurationException

getDependencyDirective

protected DependencyDirective getDependencyDirective(Configuration config)
                                              throws ConfigurationException
Throws:
ConfigurationException

getStageDirectives

protected StageDirective[] getStageDirectives(Configuration config)
                                       throws ConfigurationException
Throws:
ConfigurationException

getStageDirective

protected StageDirective getStageDirective(Configuration config)
                                    throws ConfigurationException
Throws:
ConfigurationException

getSelectionDirective

protected SelectionDirective getSelectionDirective(Configuration config)
                                            throws ConfigurationException
Throws:
ConfigurationException

getParameters

protected Parameters getParameters(Configuration config)
                            throws ConfigurationException
Throws:
ConfigurationException

getContextDirective

public ContextDirective getContextDirective(Configuration config)
                                     throws ConfigurationException
Utility method to create a new context directive.

Parameters:
config - the context directive configuration
Returns:
the context directive
Throws:
ConfigurationException - if an error occurs

getEntries

protected EntryDirective[] getEntries(Configuration[] configs)
                               throws ConfigurationException
Utility method to create a set of entry directives.

Parameters:
configs - the entry directive configurations
Returns:
the entry directives
Throws:
ConfigurationException - if an error occurs

getParameters

protected Parameter[] getParameters(Configuration[] configs)
                             throws ConfigurationException
Utility method to create a set of parameter directive.

Parameters:
configs - the parameter directive configurations
Returns:
the parameter directives
Throws:
ConfigurationException - if an error occurs

getParameter

protected Parameter getParameter(Configuration config)
                          throws ConfigurationException
Utility method to create a new parameter directive.

Parameters:
config - the parameter directive configuration
Returns:
the parameter directive
Throws:
ConfigurationException - if an error occurs


Copyright © The Apache Software Foundation. All Rights Reserved.