org.apache.avalon.meta.info.builder
Class XMLLegacyCreator

java.lang.Object
  extended byorg.apache.avalon.meta.info.builder.XMLServiceCreator
      extended byorg.apache.avalon.meta.info.builder.XMLTypeCreator
          extended byorg.apache.avalon.meta.info.builder.XMLLegacyCreator
All Implemented Interfaces:
ServiceCreator, TypeCreator, TypeFactory

public class XMLLegacyCreator
extends XMLTypeCreator
implements TypeCreator

Handles internalization of a legacy Phoenix XML based description of a Type from a Configuration object.

Version:
$Revision: 1.5 $ $Date: 2004/03/08 11:24:52 $
Author:
Avalon Development Team

Constructor Summary
XMLLegacyCreator()
           
 
Method Summary
protected  DependencyDescriptor[] buildBlockDependencies(Configuration depSet)
          A utility method to build an array of ServiceDescriptor objects from specified configuration.
protected  DependencyDescriptor buildBlockDependency(Configuration dependency)
          A utility method to build a DependencyDescriptor object from specified configuraiton.
protected  ServiceDescriptor buildBlockService(Configuration service)
          A utility method to build a ServiceDescriptor object from specified configuraiton data.
protected  ServiceDescriptor[] buildBlockServices(Configuration servicesSet)
          A utility method to build an array of ServiceDescriptor objects from specified configuraiton.
 InfoDescriptor buildInfoDescriptor(String classname, Configuration info)
          A utility method to build a InfoDescriptor object from specified configuration data and classname.
protected  ReferenceDescriptor buildReferenceDescriptor(Configuration service)
          A utility method to build a ReferenceDescriptor object from specified configuraiton data.
 Type createType(String classname, Configuration config)
          Create a Type object for specified classname and configuration.
 Type createType(String implementationKey, InputStream inputStream)
          Create a Type object for specified classname, loaded from specified InputStream.
 
Methods inherited from class org.apache.avalon.meta.info.builder.XMLTypeCreator
buildContext, buildDependencies, buildDependency, buildExtension, buildExtensions, buildLoggers, buildPhase, buildReferenceDescriptor, buildSecurityDescriptor, buildService, buildServices, buildStages, createReference, createType
 
Methods inherited from class org.apache.avalon.meta.info.builder.XMLServiceCreator
buildAttributes, buildEntries, buildEntry, buildVersion, createService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLLegacyCreator

public XMLLegacyCreator()
Method Detail

createType

public Type createType(String implementationKey,
                       InputStream inputStream)
                throws Exception
Create a Type object for specified classname, loaded from specified InputStream.

Specified by:
createType in interface TypeCreator
Overrides:
createType in class XMLTypeCreator
Parameters:
implementationKey - The classname of Component
inputStream - the InputStream to load Type from
Returns:
the created Type
Throws:
Exception - if an error occurs

createType

public Type createType(String classname,
                       Configuration config)
                throws BuildException
Create a Type object for specified classname and configuration.

Parameters:
classname - The classname of the component
config - the meta info configuration fragment
Returns:
the created Type
Throws:
ConfigurationException - if an error occurs
BuildException

buildInfoDescriptor

public InfoDescriptor buildInfoDescriptor(String classname,
                                          Configuration info)
                                   throws BuildException
A utility method to build a InfoDescriptor object from specified configuration data and classname.

Overrides:
buildInfoDescriptor in class XMLTypeCreator
Parameters:
classname - The classname of Component (used to create descriptor)
info - the component info configuration fragment
Returns:
the created InfoDescriptor
Throws:
ConfigurationException - if an error occurs
BuildException

buildBlockDependencies

protected DependencyDescriptor[] buildBlockDependencies(Configuration depSet)
                                                 throws BuildException
A utility method to build an array of ServiceDescriptor objects from specified configuration.

Parameters:
depSet - the set of dependency configurations
Returns:
the created dependency descriptor
Throws:
ConfigurationException - if an error occurs
BuildException

buildBlockServices

protected ServiceDescriptor[] buildBlockServices(Configuration servicesSet)
                                          throws BuildException
A utility method to build an array of ServiceDescriptor objects from specified configuraiton.

Parameters:
servicesSet - the services configuration
Returns:
the created ServiceDescriptor
Throws:
BuildException - if an error occurs

buildBlockService

protected ServiceDescriptor buildBlockService(Configuration service)
                                       throws BuildException
A utility method to build a ServiceDescriptor object from specified configuraiton data.

Parameters:
service - the service Configuration
Returns:
the created ServiceDescriptor
Throws:
BuildException - if an error occurs

buildReferenceDescriptor

protected ReferenceDescriptor buildReferenceDescriptor(Configuration service)
                                                throws BuildException
A utility method to build a ReferenceDescriptor object from specified configuraiton data.

Overrides:
buildReferenceDescriptor in class XMLTypeCreator
Parameters:
service - the service Configuration
Returns:
the created ReferenceDescriptor
Throws:
ConfigurationException - if an error occurs
BuildException

buildBlockDependency

protected DependencyDescriptor buildBlockDependency(Configuration dependency)
                                             throws BuildException
A utility method to build a DependencyDescriptor object from specified configuraiton.

Parameters:
dependency - the dependency configuration
Returns:
the created DependencyDescriptor
Throws:
ConfigurationException - if an error occurs
BuildException


Copyright © The Apache Software Foundation. All Rights Reserved.