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

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

public class XMLDeploymentProfileCreator
extends XMLProfileCreator

Version:
$Revision: 1.7 $ $Date: 2004/01/01 23:34:45 $
Author:
Avalon Development Team

Constructor Summary
XMLDeploymentProfileCreator()
           
 
Method Summary
 DeploymentProfile createDeploymentProfile(Configuration config)
          Creation of a DeploymentProfile from an XML configuration.
 DeploymentProfile createDeploymentProfile(String classname, Configuration config, String name)
          Creation of a DeploymentProfile from an XML configuration.
 DeploymentProfile createDeploymentProfile(String base, String classname, Configuration config)
          Creation of a DeploymentProfile 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
getActivationPolicy, getActivationPolicy, getCategoriesDirective, getCategoryDirective, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDeploymentProfileCreator

public XMLDeploymentProfileCreator()
Method Detail

createDeploymentProfile

public DeploymentProfile createDeploymentProfile(Configuration config)
                                          throws Exception
Creation of a DeploymentProfile from an XML configuration.

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

createDeploymentProfile

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

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

createDeploymentProfile

public DeploymentProfile createDeploymentProfile(String classname,
                                                 Configuration config,
                                                 String name)
                                          throws Exception
Creation of a DeploymentProfile 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 © Apache Software Foundation. All Rights Reserved.