Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2824 - in qa/main/2450fork-rc/metro: . classic/activation/impl classic/activation/impl/etc/test classic/activation/impl/etc/test/system classic/activation/impl/src/main/net/dpml/activation/impl classic/activation/providers/avalon classic/activation/providers/metro/src/main/net/dpml/activation/metro classic/activation/test classic/activation/test/etc/test classic/composition/api/src/main/net/dpml/composition/data classic/composition/api/src/main/net/dpml/composition/model classic/composition/impl/src/main/net/dpml/composition/data/builder classic/composition/impl/src/main/net/dpml/composition/model/impl classic/composition/test classic/composition/test/etc/test classic/composition/test/src/test/net/dpml/composition/model/impl/test classic/meta/api/src/main/net/dpml/meta classic/meta/api/src/main/net/dpml/meta/info classic/meta/api/src/test/net/dpml/meta/info/test classic/meta/impl/src/main/net/dpml/meta/info/builder/impl classic/meta/impl/src/main/net/dpml/meta/info/impl classic/meta/impl/src/main/net/dpml/meta/info/writer/impl classic/meta/tools/src/main/net/dpml/meta/info/ant classic/meta/tools/src/main/net/dpml/meta/info/tags classic/meta/tools/src/test/net/dpml/meta/test classic/testing/includes classic/testing/includes/src/main/BLOCK-INF classic/testing/playground/src/main/net/dpml/test/playground classic/testing/playground/src/main/net/dpml/test/playground/basic classic/testing/testa/src/main/net/dpml/test/testa composition/builder/src/main/net/dpml/composition/builder composition/part/src/main/net/dpml/composition/data composition/part/src/main/net/dpml/composition/info composition/part/src/test/net/dpml/composition/info/test configuration/api/src/main/net/dpml/configuration configuration/impl/src/main/net/dpml/configuration/impl context/api/src/main/net/dpml/context logging/providers/log4j/impl logging/providers/log4j/test/etc/test logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test logging/providers/logkit/impl logging/providers/logkit/impl/src/main/net/dpml/logging/logkit/util logging/providers/logkit/test/src/test/net/dpml/logging/logkit/test logging/spi/src/main/net/dpml/logging/provider main/src/main/net/dpml/metro parameters/impl/src/main/net/dpml/parameters/impl

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT hedhman.org
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2824 - in qa/main/2450fork-rc/metro: . classic/activation/impl classic/activation/impl/etc/test classic/activation/impl/etc/test/system classic/activation/impl/src/main/net/dpml/activation/impl classic/activation/providers/avalon classic/activation/providers/metro/src/main/net/dpml/activation/metro classic/activation/test classic/activation/test/etc/test classic/composition/api/src/main/net/dpml/composition/data classic/composition/api/src/main/net/dpml/composition/model classic/composition/impl/src/main/net/dpml/composition/data/builder classic/composition/impl/src/main/net/dpml/composition/model/impl classic/composition/test classic/composition/test/etc/test classic/composition/test/src/test/net/dpml/composition/model/impl/test classic/meta/api/src/main/net/dpml/meta classic/meta/api/src/main/net/dpml/meta/info classic/meta/api/src/test/net/dpml/meta/info/test classic/meta/impl/src/main/net/dpml/meta/info/builder/impl classic/meta/impl/src/main/net/dpml/meta/info/impl classic/meta/impl/src/main/net/dpml/meta/info/writer/impl classic/meta/tools/src/main/net/dpml/meta/info/ant classic/meta/tools/src/main/net/dpml/meta/info/tags classic/meta/tools/src/test/net/dpml/meta/test classic/testing/includes classic/testing/includes/src/main/BLOCK-INF classic/testing/playground/src/main/net/dpml/test/playground classic/testing/playground/src/main/net/dpml/test/playground/basic classic/testing/testa/src/main/net/dpml/test/testa composition/builder/src/main/net/dpml/composition/builder composition/part/src/main/net/dpml/composition/data composition/part/src/main/net/dpml/composition/info composition/part/src/test/net/dpml/composition/info/test configuration/api/src/main/net/dpml/configuration configuration/impl/src/main/net/dpml/configuration/impl context/api/src/main/net/dpml/context logging/providers/log4j/impl logging/providers/log4j/test/etc/test logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test logging/providers/logkit/impl logging/providers/logkit/impl/src/main/net/dpml/logging/logkit/util logging/providers/logkit/test/src/test/net/dpml/logging/logkit/test logging/spi/src/main/net/dpml/logging/provider main/src/main/net/dpml/metro parameters/impl/src/main/net/dpml/parameters/impl
  • Date: Sat, 11 Jun 2005 03:37:39 -0400

Author: niclas AT hedhman.org
Date: Sat Jun 11 03:37:38 2005
New Revision: 2824

Removed:
qa/main/2450fork-rc/metro/classic/activation/providers/avalon/
Modified:
qa/main/2450fork-rc/metro/classic/activation/impl/build.xml
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/logging.xml
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/playground.xml
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/secure.xml

qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/system/logging.xml
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/test.properties

qa/main/2450fork-rc/metro/classic/activation/impl/src/main/net/dpml/activation/impl/DefaultRuntime.java

qa/main/2450fork-rc/metro/classic/activation/impl/src/main/net/dpml/activation/impl/Resources.properties

qa/main/2450fork-rc/metro/classic/activation/providers/metro/src/main/net/dpml/activation/metro/DefaultServiceManager.java

qa/main/2450fork-rc/metro/classic/activation/providers/metro/src/main/net/dpml/activation/metro/Resources.properties
qa/main/2450fork-rc/metro/classic/activation/test/build.xml
qa/main/2450fork-rc/metro/classic/activation/test/etc/test/logging.xml

qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ComponentProfile.java

qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ContextDirective.java

qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/FilesetDirective.java

qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ImportDirective.java

qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/model/ModelSelector.java

qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/data/builder/XMLComponentProfileCreator.java

qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java

qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContextModel.java

qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultImportModel.java

qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultModelFactory.java

qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/Resources.properties

qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/Scanner.java
qa/main/2450fork-rc/metro/classic/composition/test/build.xml
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/context.xml
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/cyclicdeps.xml
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/dependency.xml
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/dynamics.xml

qa/main/2450fork-rc/metro/classic/composition/test/etc/test/metro.properties

qa/main/2450fork-rc/metro/classic/composition/test/etc/test/schemavalidation.xml

qa/main/2450fork-rc/metro/classic/composition/test/etc/test/schemavalidation_failing.xml
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/targets.xml

qa/main/2450fork-rc/metro/classic/composition/test/src/test/net/dpml/composition/model/impl/test/ContextTestCase.java

qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/info/CategoryDescriptor.java

qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/info/InfoDescriptor.java

qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/package.html

qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/ContextDescriptorTestCase.java

qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/InfoDescriptorTestCase.java

qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/TypeTestCase.java

qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/builder/impl/XMLTypeCreator.java

qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/impl/ConfigurationBuilder.java

qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/writer/impl/XMLTypeWriter.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/ant/MetaTask.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/ant/package.html

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/AbstractTag.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/AttributeTag.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ContextTag.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/DependencyTag.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/LoggerTag.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/SchemaTag.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ServiceTag.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ServicesTag.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/Tags.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/TypeTag.java

qa/main/2450fork-rc/metro/classic/meta/tools/src/test/net/dpml/meta/test/MetaTestCase.java
qa/main/2450fork-rc/metro/classic/testing/includes/build.xml

qa/main/2450fork-rc/metro/classic/testing/includes/src/main/BLOCK-INF/block.xml

qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/ComplexComponent.xprofile

qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/DemoManager.xprofile

qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/ExploitationManager.xprofile

qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/SimpleComponent.xconfig

qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/SimpleComponent.xprofile

qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/TerminalComponent.xprofile

qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicComponent.xconfig

qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicComponent.xprofile

qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicService.java

qa/main/2450fork-rc/metro/classic/testing/testa/src/main/net/dpml/test/testa/TestA.java

qa/main/2450fork-rc/metro/composition/builder/src/main/net/dpml/composition/builder/TypeBuilderTask.java

qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/ComponentProfile.java

qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/ContextDirective.java

qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/FilesetDirective.java

qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/info/CategoryDescriptor.java

qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/info/InfoDescriptor.java

qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/ContextDescriptorTestCase.java

qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/InfoDescriptorTestCase.java

qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/TypeTestCase.java

qa/main/2450fork-rc/metro/configuration/api/src/main/net/dpml/configuration/Configuration.java

qa/main/2450fork-rc/metro/configuration/api/src/main/net/dpml/configuration/package.html

qa/main/2450fork-rc/metro/configuration/impl/src/main/net/dpml/configuration/impl/package.html

qa/main/2450fork-rc/metro/context/api/src/main/net/dpml/context/Context.java
qa/main/2450fork-rc/metro/index.xml
qa/main/2450fork-rc/metro/logging/providers/log4j/impl/build.properties

qa/main/2450fork-rc/metro/logging/providers/log4j/test/etc/test/logging.properties
qa/main/2450fork-rc/metro/logging/providers/log4j/test/etc/test/logging.xml

qa/main/2450fork-rc/metro/logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test/AlternateLoggingManagerTestCase.java

qa/main/2450fork-rc/metro/logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test/DefaultLoggingManagerTestCase.java
qa/main/2450fork-rc/metro/logging/providers/logkit/impl/build.properties

qa/main/2450fork-rc/metro/logging/providers/logkit/impl/src/main/net/dpml/logging/logkit/util/package.html

qa/main/2450fork-rc/metro/logging/providers/logkit/test/src/test/net/dpml/logging/logkit/test/DefaultLoggingManagerTestCase.java

qa/main/2450fork-rc/metro/logging/spi/src/main/net/dpml/logging/provider/LoggingManager.java
qa/main/2450fork-rc/metro/main/src/main/net/dpml/metro/Metro.java
qa/main/2450fork-rc/metro/main/src/main/net/dpml/metro/Resources.properties

qa/main/2450fork-rc/metro/parameters/impl/src/main/net/dpml/parameters/impl/DefaultParameters.java
Log:
Removed the Avalon compatibility layer, since it is uncertain how well it is
supported. Merlin support may be added later, if interest exists.

Modified: qa/main/2450fork-rc/metro/classic/activation/impl/build.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/activation/impl/build.xml (original)
+++ qa/main/2450fork-rc/metro/classic/activation/impl/build.xml Sat Jun 11
03:37:38 2005
@@ -8,8 +8,6 @@
<target name="init" depends="standard.init">
<x:filter key="dpml-activation-metro-provider" feature="plugin"
token="METRO-RUNTIME-PROVIDER-SPEC"/>
- <x:filter key="dpml-activation-avalon-provider" feature="plugin"
- token="AVALON-RUNTIME-PROVIDER-SPEC"/>
</target>

<target name="package" depends="standard.package">

Modified:
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/logging.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/logging.xml
(original)
+++ qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/logging.xml
Sat Jun 11 03:37:38 2005
@@ -4,7 +4,7 @@

<factories>
<factory type="file"
- class="org.apache.avalon.logging.logkit.factory.FileTargetFactory"/>
+ class="net.dpml.logging.logkit.factory.FileTargetFactory"/>
</factories>

<targets>

Modified:
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/playground.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/playground.xml
(original)
+++ qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/playground.xml
Sat Jun 11 03:37:38 2005
@@ -14,18 +14,18 @@
</classloader>

<services>
- <service type="org.apache.avalon.test.playground.basic.BasicService"
version="1.1"/>
+ <service type="net.dpml.test.playground.basic.BasicService"
version="1.1"/>
</services>

<container name="subsidiary">

<component name="complex"
- class="org.apache.avalon.test.playground.ComplexComponent">
+ class="net.dpml.test.playground.ComplexComponent">
<categories priority="INFO"/>
</component>

<container name="test">
- <component name="simple"
class="org.apache.avalon.test.playground.SimpleComponent"/>
+ <component name="simple"
class="net.dpml.test.playground.SimpleComponent"/>
</container>

</container>
@@ -36,20 +36,20 @@
-->
<!--
<component name="demo"
- class="org.apache.avalon.test.playground.DemoManager"/>
+ class="net.dpml.test.playground.DemoManager"/>

<component name="exploitation"
- class="org.apache.avalon.test.playground.ExploitationManager"/>
+ class="net.dpml.test.playground.ExploitationManager"/>

<component name="basic"
- class="org.apache.avalon.test.playground.basic.BasicComponent"
+ class="net.dpml.test.playground.basic.BasicComponent"
activation="startup">
- <context
class="org.apache.avalon.test.playground.basic.BasicContextImp">
+ <context class="net.dpml.test.playground.basic.BasicContextImp">
<entry key="location">
<constructor>My Place</constructor>
</entry>
<entry key="home">
- <import key="urn:avalon:home"/>
+ <import key="urn:metro:home"/>
</entry>
</context>
</component>

Modified:
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/secure.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/secure.xml
(original)
+++ qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/secure.xml
Sat Jun 11 03:37:38 2005
@@ -23,18 +23,18 @@

<container name="Component1" >
<services>
- <service type="org.apache.avalon.test.components.TestService">
+ <service type="net.dpml.test.components.TestService">
<source>test</source>
</service>
</services>
<component name="test"
- class="org.apache.avalon.test.components.TestComponent"
+ class="net.dpml.test.components.TestComponent"
activation="startup"/>
</container>

<container name="Component2" >
<component name="anothertest"
- class="org.apache.avalon.test.components.AnotherTestComponent"
+ class="net.dpml.test.components.AnotherTestComponent"
activation="startup">
</component>
</container>

Modified:
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/system/logging.xml
==============================================================================
---
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/system/logging.xml
(original)
+++
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/system/logging.xml
Sat Jun 11 03:37:38 2005
@@ -9,7 +9,7 @@

<factories>
<factory type="file"
- class="org.apache.avalon.logging.logkit.factory.FileTargetFactory"/>
+ class="net.dpml.logging.logkit.factory.FileTargetFactory"/>
</factories>

<targets>

Modified:
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/test.properties
==============================================================================
---
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/test.properties
(original)
+++
qa/main/2450fork-rc/metro/classic/activation/impl/etc/test/test.properties
Sat Jun 11 03:37:38 2005
@@ -1 +0,0 @@
-avalon.repository.online = false
\ No newline at end of file

Modified:
qa/main/2450fork-rc/metro/classic/activation/impl/src/main/net/dpml/activation/impl/DefaultRuntime.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/activation/impl/src/main/net/dpml/activation/impl/DefaultRuntime.java
(original)
+++
qa/main/2450fork-rc/metro/classic/activation/impl/src/main/net/dpml/activation/impl/DefaultRuntime.java
Sat Jun 11 03:37:38 2005
@@ -53,9 +53,6 @@
private static final String METRO_RUNTIME =
"@METRO-RUNTIME-PROVIDER-SPEC@";

- private static final String AVALON_RUNTIME =
- "@AVALON-RUNTIME-PROVIDER-SPEC@";
-
//--------------------------------------------------------------
// immutable state
//--------------------------------------------------------------
@@ -68,7 +65,6 @@
//--------------------------------------------------------------

private RuntimeFactory m_metro;
- private RuntimeFactory m_avalon;

//--------------------------------------------------------------
// constructor
@@ -169,14 +165,7 @@
else
{
ComponentModel component = (ComponentModel) model;
- if( component.getType().getInfo().isNative() )
- {
- return getMetroRuntimeFactory();
- }
- else
- {
- return getAvalonRuntimeFactory();
- }
+ return getMetroRuntimeFactory();
}
}

@@ -205,41 +194,11 @@
}
}

- private RuntimeFactory getAvalonRuntimeFactory()
- {
- if( null != m_avalon )
- {
- return m_avalon ;
- }
- else
- {
- try
- {
- ClassLoader classloader = Appliance.class.getClassLoader();
- URI uri = getAvalonRuntimeArtifact();
- Object[] params = new Object[]{ m_system };
- m_avalon = (RuntimeFactory)
m_system.getRepository().getPlugin( classloader, uri, params );
- return m_avalon;
- }
- catch( Throwable e )
- {
- final String error =
- "Bugger, bugger, bugger";
- throw new LifestyleRuntimeException( error, e );
- }
- }
- }
-
private URI getMetroRuntimeArtifact() throws URISyntaxException
{
return Artifact.createArtifact( METRO_RUNTIME ).toURI();
}

- private URI getAvalonRuntimeArtifact() throws URISyntaxException
- {
- return Artifact.createArtifact( AVALON_RUNTIME ).toURI();
- }
-
private class BlockFactory implements RuntimeFactory
{
private final Map m_map = new Hashtable();

Modified:
qa/main/2450fork-rc/metro/classic/activation/impl/src/main/net/dpml/activation/impl/Resources.properties
==============================================================================
---
qa/main/2450fork-rc/metro/classic/activation/impl/src/main/net/dpml/activation/impl/Resources.properties
(original)
+++
qa/main/2450fork-rc/metro/classic/activation/impl/src/main/net/dpml/activation/impl/Resources.properties
Sat Jun 11 03:37:38 2005
@@ -17,7 +17,7 @@
lifecycle.error.stage.creator=Creation stage handler error raised by
extension id: [{0}].
lifestyle.error.new=Unable to create a new component instance in appliance
[{0}] due to a component deployment failure.
lifestyle.error.contextualization=Internal error while attempting to resolve
contexualization handler from the appliance [{0}].
-lifecycle.error.avalon-contextualization=Contextualization failure in [{0}].
+lifecycle.error.metro-contextualization=Contextualization failure in [{0}].
lifecycle.error.custom-contextualization=Contextualization failure in [{0}]
using custom handler [{1}].

#

Modified:
qa/main/2450fork-rc/metro/classic/activation/providers/metro/src/main/net/dpml/activation/metro/DefaultServiceManager.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/activation/providers/metro/src/main/net/dpml/activation/metro/DefaultServiceManager.java
(original)
+++
qa/main/2450fork-rc/metro/classic/activation/providers/metro/src/main/net/dpml/activation/metro/DefaultServiceManager.java
Sat Jun 11 03:37:38 2005
@@ -34,7 +34,7 @@
import net.dpml.service.ServiceManager;

/**
- * Default implementation of the framework {@link ServiceManager} interface.
+ * Default implementation of the {@link ServiceManager} interface.
* @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
*/
class DefaultServiceManager implements ServiceManager
@@ -222,7 +222,7 @@
catch( Throwable e )
{
//
- // TODO: framework states that ServiceException is thrown
+ // TODO: the specification states that ServiceException is thrown
// if the service is not found - and in this case that isn't
// the issue - in effect we have a good key, but we simply
// have not been able to go from key to instance -

Modified:
qa/main/2450fork-rc/metro/classic/activation/providers/metro/src/main/net/dpml/activation/metro/Resources.properties
==============================================================================
---
qa/main/2450fork-rc/metro/classic/activation/providers/metro/src/main/net/dpml/activation/metro/Resources.properties
(original)
+++
qa/main/2450fork-rc/metro/classic/activation/providers/metro/src/main/net/dpml/activation/metro/Resources.properties
Sat Jun 11 03:37:38 2005
@@ -17,7 +17,7 @@
lifecycle.error.stage.creator=Creation stage handler error raised by
extension id: [{0}].
lifestyle.error.new=Unable to create a new component instance in appliance
[{0}] due to a component deployment failure.
lifestyle.error.contextualization=Internal error while attempting to resolve
contexualization handler from the appliance [{0}].
-lifecycle.error.avalon-contextualization=Contextualization failure in [{0}].
+lifecycle.error.metro-contextualization=Contextualization failure in [{0}].
lifecycle.error.custom-contextualization=Contextualization failure in [{0}]
using custom handler [{1}].

#

Modified: qa/main/2450fork-rc/metro/classic/activation/test/build.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/activation/test/build.xml (original)
+++ qa/main/2450fork-rc/metro/classic/activation/test/build.xml Sat Jun 11
03:37:38 2005
@@ -12,10 +12,6 @@
token="TEST-PLAYGROUND-SPEC"/>
<x:filter key="dpml-test-components" feature="uri"
token="TEST-COMPONENTS-SPEC"/>
- <x:filter key="avalon-framework-api" feature="uri"
- token="AVALON-API-SPEC"/>
- <x:filter key="avalon-framework-impl" feature="uri"
- token="AVALON-IMPL-SPEC"/>
<x:filter key="dpml-logging-api" feature="uri"
token="LOGGING-API-SPEC"/>
<x:filter key="dpml-context-api" feature="uri"

Modified:
qa/main/2450fork-rc/metro/classic/activation/test/etc/test/logging.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/activation/test/etc/test/logging.xml
(original)
+++ qa/main/2450fork-rc/metro/classic/activation/test/etc/test/logging.xml
Sat Jun 11 03:37:38 2005
@@ -9,7 +9,7 @@

<factories>
<factory type="file"
- class="org.apache.avalon.logging.logkit.factory.FileTargetFactory"/>
+ class="net.dpml.logging.logkit.factory.FileTargetFactory"/>
</factories>

<targets>

Modified:
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ComponentProfile.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ComponentProfile.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ComponentProfile.java
Sat Jun 11 03:37:38 2005
@@ -48,7 +48,7 @@
may be serviced by components declared in parent container.
--&gt;</i></font>

-&lt;component name="<font color="darkred">complex</font>" class="<font
color="darkred">org.apache.avalon.playground.ComplexComponent</font>"
activation="<font color="darkred">startup</font>"&gt;
+&lt;component name="<font color="darkred">complex</font>" class="<font
color="darkred">net.dpml.playground.ComplexComponent</font>"
activation="<font color="darkred">startup</font>"&gt;

<font color="gray"><i>&lt;!--
Priority and target assignments for component specific logging categrories.
@@ -66,13 +66,13 @@
container. The following two context directives for "location" and "home"
demonstrate
programatics creation of context values. The first entry declares that
the context
value to be assigned to the key "location" shall be the String value
"Paris". The second
- context enty assignes the container's context value for "urn:avalon:home"
to the component's
+ context enty assignes the container's context value for "urn:metro:home"
to the component's
context key of "home".
--&gt;</i></font>

&lt;context&gt;
&lt;entry key="<font color="darkred">location</font>"&gt;<font
color="darkred">Paris</font>&lt;/entry&gt;
- &lt;include name="<font color="darkred">urn:avalon:home</font>"
key="<font color="darkred">home</font>"/&gt;
+ &lt;include name="<font color="darkred">urn:metro:home</font>"
key="<font color="darkred">home</font>"/&gt;
&lt;/context&gt;

<font color="gray"><i>&lt;!--

Modified:
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ContextDirective.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ContextDirective.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ContextDirective.java
Sat Jun 11 03:37:38 2005
@@ -32,7 +32,7 @@
* <pre>
* &lt;context class="<font color="darkred">MyContextClass</font>"&gt;
* &lt;entry key="<font color="darkred">special</font>"&gt;
- * &lt;import key="<font
color="darkred">urn:avalon:classloader</font>"/&gt;
+ * &lt;import key="<font
color="darkred">urn:metro:classloader</font>"/&gt;
* &lt;/entry&gt;
* &lt;entry key="<font color="darkred">xxx</font>"&gt;
* &lt;param class="<font color="darkred">MySpecialClass</font>"&gt;

Modified:
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/FilesetDirective.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/FilesetDirective.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/FilesetDirective.java
Sat Jun 11 03:37:38 2005
@@ -28,7 +28,6 @@
* <p><b>XML</b></p>
* <pre>
* &lt;fileset dir="<font color="darkred">lib</font>"&gt;
- * &lt;include name="<font
color="darkred">avalon-framework.jar</font>"/&gt;
* &lt;include name="<font color="darkred">logkit.jar</font>"/&gt;
* &lt;exclude name="<font color="darkred">servlet.jar</font>"/&gt;
* &lt;/dirset&gt;
@@ -206,7 +205,7 @@
* context.</p>
* <pre>
* <font color="gray">&lt;fileset dir="lib"&gt;</font>
- * &lt;exclude name="<font
color="darkred">avalon-framework.jar</font>" /&gt;
+ * &lt;exclude name="<font color="darkred">servlet.jar</font>"/&gt;
* <font color="gray">&lt;/fileset&gt;</font>
* </pre>
*
@@ -285,7 +284,7 @@
* context.</p>
* <pre>
* <font color="gray">&lt;fileset dir="lib"&gt;</font>
- * &lt;include name="<font
color="darkred">avalon-framework.jar</font>" /&gt;
+ * &lt;include name="<font color="darkred">servlet.jar</font>"/&gt;
* <font color="gray">&lt;/fileset&gt;</font>
* </pre>
*

Modified:
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ImportDirective.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ImportDirective.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/data/ImportDirective.java
Sat Jun 11 03:37:38 2005
@@ -35,13 +35,13 @@
*
* <font color="gray">
* &lt;--
- * Declare the import of the value of "urn:avalon:home" as a keyed context
+ * Declare the import of the value of "urn:metro:home" as a keyed context
* entry using the key "home".
* --&gt;</font>
*
* <font color="gray">&lt;context&gt;</font>
* <font color="gray">&lt;entry key="home">&gt;</font>
- * &lt;import key="<font color="darkred">urn:avalon:home</font>"/&gt;
+ * &lt;import key="<font color="darkred">urn:metro:home</font>"/&gt;
* <font color="gray">&lt;/entry&gt;</font>
* <font color="gray">&lt;/context&gt;</font>
* </pre>

Modified:
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/model/ModelSelector.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/model/ModelSelector.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/api/src/main/net/dpml/composition/model/ModelSelector.java
Sat Jun 11 03:37:38 2005
@@ -27,7 +27,7 @@
* candidate service providers in an automated assembly process.
* A component author may declare a selection class explicitly via a
* service dependency attribute with the attribute name of
- * <code>urn:avalon:profile.selector</code> (but this will change to a model
+ * <code>urn:metro:profile.selector</code> (but this will change to a model
* driven approach).
*
* @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>

Modified:
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/data/builder/XMLComponentProfileCreator.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/data/builder/XMLComponentProfileCreator.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/data/builder/XMLComponentProfileCreator.java
Sat Jun 11 03:37:38 2005
@@ -195,7 +195,7 @@
final String error =
"The 'context' tag format has changed."
+ " Please check Merlin home for details "
- + "http://avalon.apache.org/merlin";;
+ + "http://www.dpml.net/metro/latest/guide/context/index.html";;
throw new ConfigurationException( error );
}


Modified:
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
Sat Jun 11 03:37:38 2005
@@ -75,16 +75,16 @@
private static final Configuration EMPTY_CONFIGURATION =
new DefaultConfiguration( "configuration",
ComponentModel.class.getName() );

- private static final String AVALON_CONFIGURABLE_CLASSNAME =
+ private static final String METRO_CONFIGURABLE_CLASSNAME =
"net.dpml.configuration.Configurable";

- private static final String AVALON_CONFIGURATION_CLASSNAME =
+ private static final String METRO_CONFIGURATION_CLASSNAME =
"net.dpml.configuration.Configuration";

- private static final String AVALON_PARAMETERIZABLE_CLASSNAME =
+ private static final String METRO_PARAMETERIZABLE_CLASSNAME =
"net.dpml.parameters.Parameterizable";

- private static final String AVALON_PARAMETERS_CLASSNAME =
+ private static final String METRO_PARAMETERS_CLASSNAME =
"net.dpml.parameters.Parameters";

private static final String SCHEMA_TAG_W3CSCHEMA = "xmlschema";
@@ -484,29 +484,9 @@
*/
public boolean isParameterizable()
{
- if ( getType().getInfo().isNative() )
- {
- return ( Parameterizable.class
- .isAssignableFrom( getDeploymentClass() ) ||
isaConstructorArg( Parameters.class ) );
- }
- else
- {
- try
- {
- Class parameterizable = m_classloader.loadClass(
AVALON_PARAMETERIZABLE_CLASSNAME );
- Class parameters = m_classloader.loadClass(
AVALON_PARAMETERS_CLASSNAME );
- return ( parameterizable
- .isAssignableFrom( getDeploymentClass() ) ||
isaConstructorArg( parameters ) );
- }
- catch ( Throwable e )
- {
- final String error = "The component type " + getType()
- + " is based on the Avalon component model "
- + "however the required classes are not available "
- + "withing the containing classloader.";
- throw new ModelRuntimeException( error, e );
- }
- }
+ boolean isAssignable = Parameterizable.class.isAssignableFrom(
getDeploymentClass() );
+ boolean hasConstructorParemeter = isaConstructorArg(
Parameters.class );
+ return isAssignable || hasConstructorParemeter;
}

/**
@@ -601,27 +581,9 @@
*/
public boolean isConfigurable()
{
- if ( getType().getInfo().isNative() )
- {
- return ( Configurable.class.isAssignableFrom(
getDeploymentClass() ) || isaConstructorArg( Configuration.class ) );
- }
- else
- {
- try
- {
- Class configurable = m_classloader.loadClass(
AVALON_CONFIGURABLE_CLASSNAME );
- Class configuration = m_classloader.loadClass(
AVALON_CONFIGURATION_CLASSNAME );
- return ( configurable.isAssignableFrom( getDeploymentClass()
) || isaConstructorArg( configuration ) );
- }
- catch ( Throwable e )
- {
- final String error = "The component type " + getType()
- + " is based on the Avalon component model "
- + "however the required classes are not available "
- + "withing the containing classloader.";
- throw new ModelRuntimeException( error, e );
- }
- }
+ boolean isAssignable = Configurable.class.isAssignableFrom(
getDeploymentClass() );
+ boolean hasConstructorParameter = isaConstructorArg(
Configuration.class );
+ return isAssignable || hasConstructorParameter ;
}

/**

Modified:
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContextModel.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContextModel.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContextModel.java
Sat Jun 11 03:37:38 2005
@@ -56,10 +56,9 @@

public static boolean isaStandardKey( String key )
{
- return (
- key.startsWith( "urn:avalon:" )
- || key.startsWith( "urn:composition:" )
- || key.startsWith( "urn:metro:" ) );
+ boolean isMetro = key.startsWith( "urn:metro:" );
+ boolean isComposition = key.startsWith( "urn:composition:" );
+ return isMetro || isComposition;
}

//==============================================================

Modified:
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultImportModel.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultImportModel.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultImportModel.java
Sat Jun 11 03:37:38 2005
@@ -128,10 +128,6 @@
{
return getStandardMetroEntry( key );
}
- if( key.startsWith( "urn:avalon:" ) )
- {
- return getStandardAvalonEntry( key );
- }
else if( key.startsWith( "urn:composition:" ) )
{
return getStandardCompositionEntry( key );
@@ -169,31 +165,6 @@
return null;
}

- private Object getStandardAvalonEntry( String key )
- {
- if( key.equals( "urn:avalon:name" ) )
- {
- return m_context.getName();
- }
- else if( key.equals( "urn:avalon:partition" ) )
- {
- return m_context.getPartitionName();
- }
- else if( key.equals( "urn:avalon:classloader" ) )
- {
- return m_context.getClassLoader();
- }
- else if( key.equals( "urn:avalon:home" ) )
- {
- return m_context.getWorkingDirectory();
- }
- else if( key.equals( "urn:avalon:temp" ) )
- {
- return m_context.getTempDirectory();
- }
- return null;
- }
-
private Object getStandardCompositionEntry( String key )
{
if( key.equals( ContainmentModel.KEY ) )

Modified:
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultModelFactory.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultModelFactory.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/DefaultModelFactory.java
Sat Jun 11 03:37:38 2005
@@ -76,11 +76,6 @@

private static final String DEFAULT_PROFILE_NAME = "default";

- private static final String AVALON_API =
- "artifact:jar:avalon-framework/avalon-framework-api#4.2.0";
- private static final String AVALON_LIFECYCLE_API =
- "artifact:jar:avalon/util/avalon-util-lifecycle#1.1.1";
-
//-------------------------------------------------------------------
// immutable state
//-------------------------------------------------------------------

Modified:
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/Resources.properties
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/Resources.properties
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/Resources.properties
Sat Jun 11 03:37:38 2005
@@ -60,7 +60,7 @@
assembly.reassembly.error=Illegal attempt to re-assemble the model [{0}].
assembly.dissassembly.transitional.error=Illegal attempt to dissassemble
[{0}] while the model is in a state of transition.
assembly.dissassembly.state.error=Illegal attempt to dissassemble a
dissassembled model [{0}].
-assembly.context-strategy.bad-class.error=Context strategy handler class
[{0}] does not implement the
org.apache.avalon.activation.lifecycle.ContextualizationHandler interface
defined in the container classloader.
+assembly.context-strategy.bad-class.error=Context strategy handler class
[{0}] does not implement the
net.dpml.activation.lifecycle.ContextualizationHandler interface defined in
the container classloader.


# DefaultSystemContext
@@ -114,9 +114,9 @@
#DefaultContextModel
# ==================
context.strategy.custom=custom strategy: {0}
-context.strategy.avalon=avalon strategy
+context.strategy.metro=metro strategy
context.non-standard-key.error=The component has requested a context entry
that is not know within the family of standard context keys. The offending
key is: {0}.
-context.non-standard-avalon-key.error=The component has requested a Avalon
context entry that is not know within the family of standard Avalon context
keys. The offending key is: {0}.
+context.non-standard-metro-key.error=The component has requested a Metro
context entry that is not know within the family of standard Metro context
keys. The offending key is: {0}.
context.non-standard-system-key.error=The component has requested a system
context entry that is not know within the family of standard context keys.
The offending key is: {0}.
context.unknown-system-key.error=The component has requested a system
context entry that is not know within the family of standard Merlin context
keys. The offending key is: {0}.
context.missing-directive.error=The component has requested a non-standard
context entry. The container cannot resolve this request because no entry
directive can be found the matches the key: {0}.
@@ -125,8 +125,8 @@
context.custom-unexpected.error=Unexpected error occured while attempting to
construct a custom context using the class [{0}].
context.strategy.custom.missing.error=Custom stategy class [{0}] is not
present in the classpath.
context.strategy.custom.unexpected.error=Unable to load the custom stategy
class [{0}] due to an unexpected error.
-context.strategy.avalon.missing.error=Classic Avalon context stategy class
[{0}] is not present in the classpath.
-context.strategy.avalon.unexpected.error=Unable to load the classic Avalon
stategy class [{0}] due to an unexpected error.
+context.strategy.metro.missing.error=Classic Metro context stategy class
[{0}] is not present in the classpath.
+context.strategy.metro.unexpected.error=Unable to load the classic Metro
stategy class [{0}] due to an unexpected error.

# DefaultContext
# ==============

Modified:
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/Scanner.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/Scanner.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/impl/src/main/net/dpml/composition/model/impl/Scanner.java
Sat Jun 11 03:37:38 2005
@@ -481,9 +481,8 @@

/**
* Return the set of interface classes for a given type that are declared
- * or default to the "native" service access protocol and where the
- * service access model is undefined (i.e. native implementation).
- * access mode.
+ * or default to the service access protocol and where the
+ * service access model is undefined.
*
* @param type the component type
* @return an array of classes represnting the type's service interfaces
@@ -496,10 +495,9 @@
for( int i = 0; i < services.length; i++ )
{
ServiceDescriptor service = services[i];
- if( (service.getAttribute(
- "urn:avalon:service.protocol", "native" ).equals( "native" ))
- && ( service.getAttribute(
- "urn:avalon:service.accessor", null ) == null) )
+ String serviceProt = service.getAttribute(
"urn:metro:service.protocol", "" );
+ String serviceAccess = service.getAttribute(
"urn:metro:service.accessor", null );
+ if( serviceProt.equals( "" ) && serviceAccess == null )
{
list.add( getServiceClass( services[i] ) );
}

Modified: qa/main/2450fork-rc/metro/classic/composition/test/build.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/composition/test/build.xml
(original)
+++ qa/main/2450fork-rc/metro/classic/composition/test/build.xml Sat
Jun 11 03:37:38 2005
@@ -8,8 +8,6 @@
<target name="init" depends="standard.init">
<x:filter feature="plugin" key="dpml-classic-impl"
token="COMPOSITION_IMPL_URI"/>
<x:filter feature="plugin" key="dpml-system-impl"
token="TRANSIT-IMPL-SPEC"/>
- <x:filter feature="uri" key="avalon-framework-api"
token="AVALON-API-SPEC"/>
- <x:filter feature="uri" key="avalon-framework-impl"
token="AVALON-IMPL-SPEC"/>
<x:filter feature="uri" key="dpml-test-testa" token="TEST-A-SPEC"/>
<x:filter feature="uri" key="dpml-test-testb" token="TEST-B-SPEC"/>
<x:filter feature="uri" key="dpml-test-testc" token="TEST-C-SPEC"/>

Modified:
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/context.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/composition/test/etc/test/context.xml
(original)
+++ qa/main/2450fork-rc/metro/classic/composition/test/etc/test/context.xml
Sat Jun 11 03:37:38 2005
@@ -4,7 +4,6 @@

<classloader>
<classpath>
- <artifact>@AVALON-API-SPEC@</artifact>
<artifact>@TEST-A-SPEC@</artifact>
</classpath>
</classloader>
@@ -13,7 +12,7 @@
<context class="net.dpml.test.testa.DefaultFacade">
<entry key="home">
<constructor class="java.io.File">
- <param class="java.io.File">${urn:avalon:home}</param>
+ <param class="java.io.File">${urn:metro:home}</param>
<param>xxx</param>
</constructor>
</entry>
@@ -21,7 +20,7 @@
<constructor class="java.util.Date"/>
</entry>
<entry key="path">
- <import key="urn:avalon:partition"/>
+ <import key="urn:metro:partition"/>
</entry>
</context>
</component>

Modified:
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/cyclicdeps.xml
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/cyclicdeps.xml
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/cyclicdeps.xml
Sat Jun 11 03:37:38 2005
@@ -2,8 +2,6 @@
<container name="test">
<classloader>
<classpath>
- <artifact>@AVALON-API-SPEC@</artifact>
- <artifact>@AVALON-IMPL-SPEC@</artifact>
<artifact>@TEST-CYCLIC-SPEC@</artifact>
</classpath>
</classloader>

Modified:
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/dependency.xml
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/dependency.xml
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/dependency.xml
Sat Jun 11 03:37:38 2005
@@ -4,8 +4,6 @@

<classloader>
<classpath>
- <artifact>@AVALON-API-SPEC@</artifact>
- <artifact>@AVALON-IMPL-SPEC@</artifact>
<artifact>@TEST-A-SPEC@</artifact>
<artifact>@TEST-B-SPEC@</artifact>
<artifact>@TEST-C-SPEC@</artifact>
@@ -16,7 +14,7 @@
<context class="net.dpml.test.testa.DefaultFacade">
<entry key="home">
<constructor class="java.io.File">
- <param class="java.io.File">${urn:avalon:home}</param>
+ <param class="java.io.File">${urn:metro:home}</param>
<param>xxx</param>
</constructor>
</entry>
@@ -24,7 +22,7 @@
<constructor class="java.util.Date"/>
</entry>
<entry key="path">
- <import key="urn:avalon:partition"/>
+ <import key="urn:metro:partition"/>
</entry>
</context>
</component>

Modified:
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/dynamics.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/composition/test/etc/test/dynamics.xml
(original)
+++ qa/main/2450fork-rc/metro/classic/composition/test/etc/test/dynamics.xml
Sat Jun 11 03:37:38 2005
@@ -2,8 +2,6 @@
<container name="test">
<classloader>
<classpath>
- <artifact>@AVALON-API-SPEC@</artifact>
- <artifact>@AVALON-IMPL-SPEC@</artifact>
<artifact>@TEST-DYNAMICS-SPEC@</artifact>
</classpath>
</classloader>

Modified:
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/metro.properties
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/metro.properties
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/metro.properties
Sat Jun 11 03:37:38 2005
@@ -1,4 +1,3 @@

metro.info = false
-metro.avalon = true
-color = red
\ No newline at end of file
+color = red

Modified:
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/schemavalidation.xml
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/schemavalidation.xml
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/schemavalidation.xml
Sat Jun 11 03:37:38 2005
@@ -1,8 +1,6 @@
<container name="test">
<classloader>
<classpath>
- <artifact>@AVALON-API-SPEC@</artifact>
- <artifact>@AVALON-IMPL-SPEC@</artifact>
<artifact>@TEST-SCHEMA-SPEC@</artifact>
</classpath>
</classloader>
@@ -13,4 +11,4 @@
</configuration>
</component>
</container>
-</container>
\ No newline at end of file
+</container>

Modified:
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/schemavalidation_failing.xml
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/schemavalidation_failing.xml
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/schemavalidation_failing.xml
Sat Jun 11 03:37:38 2005
@@ -1,8 +1,6 @@
<container name="test">
<classloader>
<classpath>
- <artifact>@AVALON-API-SPEC@</artifact>
- <artifact>@AVALON-IMPL-SPEC@</artifact>
<artifact>@TEST-SCHEMA-SPEC@</artifact>
</classpath>
</classloader>
@@ -10,4 +8,4 @@
<component name="ConfigB"
class="net.dpml.test.testschema.ConfigurableB">
</component>
</container>
-</container>
\ No newline at end of file
+</container>

Modified:
qa/main/2450fork-rc/metro/classic/composition/test/etc/test/targets.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/composition/test/etc/test/targets.xml
(original)
+++ qa/main/2450fork-rc/metro/classic/composition/test/etc/test/targets.xml
Sat Jun 11 03:37:38 2005
@@ -1,22 +1,20 @@
-
-<container name="test">
-
- <classloader>
- <classpath>
- <artifact>@AVALON-API-SPEC@</artifact>
- <artifact>@AVALON-IMPL-SPEC@</artifact>
- <artifact>@TEST-A-SPEC@</artifact>
- </classpath>
- </classloader>
-
- <component name="aaa" class="net.dpml.test.testa.ConfigurableComponent" />
-
- <component name="bbb" class="net.dpml.test.testa.ConfigurableComponent" />
-
- <container name="ccc">
- <container name="sss">
- <component name="xxx"
class="net.dpml.test.testa.ConfigurableComponent" />
- </container>
- </container>
-
-</container>
+
+<container name="test">
+
+ <classloader>
+ <classpath>
+ <artifact>@TEST-A-SPEC@</artifact>
+ </classpath>
+ </classloader>
+
+ <component name="aaa" class="net.dpml.test.testa.ConfigurableComponent" />
+
+ <component name="bbb" class="net.dpml.test.testa.ConfigurableComponent" />
+
+ <container name="ccc">
+ <container name="sss">
+ <component name="xxx"
class="net.dpml.test.testa.ConfigurableComponent" />
+ </container>
+ </container>
+
+</container>

Modified:
qa/main/2450fork-rc/metro/classic/composition/test/src/test/net/dpml/composition/model/impl/test/ContextTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/composition/test/src/test/net/dpml/composition/model/impl/test/ContextTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/classic/composition/test/src/test/net/dpml/composition/model/impl/test/ContextTestCase.java
Sat Jun 11 03:37:38 2005
@@ -95,11 +95,11 @@
{
try
{
- ClassLoader loader = (ClassLoader) m_map.get(
"urn:avalon:classloader" );
+ ClassLoader loader = (ClassLoader) m_map.get(
"urn:metro:classloader" );
}
catch( Throwable e )
{
- fail( "urn:avalon:classloader" );
+ fail( "urn:metro:classloader" );
}
}

@@ -107,11 +107,11 @@
{
try
{
- File home = (File) m_map.get( "urn:avalon:home" );
+ File home = (File) m_map.get( "urn:metro:home" );
}
catch( Throwable e )
{
- assertTrue( "urn:avalon:home", false );
+ assertTrue( "urn:metro:home", false );
}
}

@@ -119,11 +119,11 @@
{
try
{
- File temp = (File) m_map.get( "urn:avalon:temp" );
+ File temp = (File) m_map.get( "urn:metro:temp" );
}
catch( Throwable e )
{
- assertTrue( "urn:avalon:temp", false );
+ assertTrue( "urn:metro:temp", false );
}
}

@@ -131,11 +131,11 @@
{
try
{
- String partition = (String) m_map.get( "urn:avalon:partition" );
+ String partition = (String) m_map.get( "urn:metro:partition" );
}
catch( Throwable e )
{
- fail( "urn:avalon:partition" );
+ fail( "urn:metro:partition" );
}
}


Modified:
qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/info/CategoryDescriptor.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/info/CategoryDescriptor.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/info/CategoryDescriptor.java
Sat Jun 11 03:37:38 2005
@@ -22,7 +22,7 @@
import java.util.Properties;

/**
- * A descriptor describing an Avalon Logger
+ * A descriptor describing a Logger
* child instances that the component will create using the
* <code>net.dpml.logging.Logger#getChildLogger</code>
* method. The name of each category is relative to the component. For

Modified:
qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/info/InfoDescriptor.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/info/InfoDescriptor.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/info/InfoDescriptor.java
Sat Jun 11 03:37:38 2005
@@ -108,12 +108,6 @@
private final int m_collection;

/**
- * Flag indicating if this is a native metro descriptor or avalon
descriptor.
- * TODO: change this to a versioned service protocol spec
- */
- private final boolean m_native;
-
- /**
* Flag indicating if the type is threadsafe.
*/
private final boolean m_threadsafe;
@@ -133,7 +127,7 @@
public InfoDescriptor( final String name, final String classname )
throws IllegalArgumentException, NullPointerException
{
- this( name, classname, null, null, null, null, false, true, null );
+ this( name, classname, null, null, null, null, false, null );
}

/**
@@ -147,7 +141,6 @@
* @param collection the garbage collection policy for the component
* @param threadsafe if TRUE the type is declaring itself as threadsafe
* @param schema the configuration schema
- * @param flag native metro flag
* @param attributes a set of attributes associated with the component
type
* @exception IllegalArgumentException if the implementation key is not
a classname
* @exception NullArgumentException if the classname argument is null.
@@ -160,13 +153,10 @@
final String collection,
final String schema,
final boolean threadsafe,
- final boolean flag,
final Properties attributes )
throws IllegalArgumentException, NullPointerException
{
super( attributes );
-
- m_native = flag;
m_threadsafe = threadsafe;

if ( null == classname )
@@ -373,16 +363,6 @@
}

/**
- * Ruturn TRUE is this is a native descriptor else FALSE.
- *
- * @return the native status
- */
- public boolean isNative()
- {
- return m_native;
- }
-
- /**
* Return a string representation of the info descriptor.
* @return the stringified type
*/
@@ -402,7 +382,6 @@
if (isEqual)
{
InfoDescriptor info = (InfoDescriptor)other;
- isEqual = isEqual && m_native == info.m_native;
isEqual = isEqual && m_threadsafe == info.m_threadsafe;
isEqual = isEqual && m_classname.equals( info.m_classname );
isEqual = isEqual && ( m_collection == info.m_collection );
@@ -430,14 +409,6 @@
{
int hash = super.hashCode();

- if( m_native )
- {
- hash = hash + 818972391;
- }
- else
- {
- hash = hash - 293741397;
- }
if( m_threadsafe )
{
hash = hash + 383972391;

Modified:
qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/package.html
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/package.html
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/api/src/main/net/dpml/meta/package.html
Sat Jun 11 03:37:38 2005
@@ -2,7 +2,7 @@
<body>
<p>
Generic build resources related to meta content generation. See
-<a
href="http://avalon.apache.org/avalon/meta/";>http://avalon.apache.org/avalon/meta/</a>
+<a
href="http://www.dpml.net/metro/latest/composition/descriptors/index.html";>http://www.dpml.net/metro/latest/composition/descriptors/index.html</a>
for more information.
</p>
</body>

Modified:
qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/ContextDescriptorTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/ContextDescriptorTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/ContextDescriptorTestCase.java
Sat Jun 11 03:37:38 2005
@@ -94,7 +94,7 @@

public void setUp()
{
- m_classname = "org.apache.avalon.playground.MyContext";
+ m_classname = "net.dpml.playground.MyContext";
m_entries = new EntryDescriptor[]{
new EntryDescriptor( "key", String.class.getName() )
};

Modified:
qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/InfoDescriptorTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/InfoDescriptorTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/InfoDescriptorTestCase.java
Sat Jun 11 03:37:38 2005
@@ -37,7 +37,6 @@
private final String m_lifestyle = InfoDescriptor.SINGLETON;
private final String m_collection = InfoDescriptor.WEAK;
private final String m_schema = "schema";
- private final boolean m_native = true;
private final boolean m_threadsafe = false;

public InfoDescriptorTestCase ( String name )
@@ -48,7 +47,7 @@
protected Descriptor getDescriptor()
{
return new InfoDescriptor(
- m_name, m_classname, m_version, m_lifestyle, m_collection,
m_schema, m_threadsafe, m_native, getProperties());
+ m_name, m_classname, m_version, m_lifestyle, m_collection,
m_schema, m_threadsafe, getProperties());
}

protected void checkDescriptor( Descriptor desc )
@@ -69,7 +68,7 @@
try
{
new InfoDescriptor(
- m_name, null, m_version, m_lifestyle, m_collection, m_schema,
m_threadsafe, m_native, getProperties() );
+ m_name, null, m_version, m_lifestyle, m_collection, m_schema,
m_threadsafe, getProperties() );
fail("Did not throw the proper NullPointerException");
}
catch( NullPointerException npe )
@@ -81,7 +80,7 @@
{
new InfoDescriptor(
m_name, "foo/fake/ClassName", m_version, m_lifestyle,
m_collection,
- m_schema, m_threadsafe, m_native, getProperties());
+ m_schema, m_threadsafe, getProperties());
fail("Did not throw the proper IllegalArgumentException");
}
catch( IllegalArgumentException iae )
@@ -93,19 +92,19 @@
{
new InfoDescriptor(
m_name, m_classname, m_version, InfoDescriptor.SINGLETON,
m_collection,
- m_schema, m_threadsafe, m_native, getProperties() );
+ m_schema, m_threadsafe, getProperties() );
new InfoDescriptor(
m_name, m_classname, m_version, InfoDescriptor.THREAD,
m_collection,
- m_schema, m_threadsafe, m_native, getProperties() );
+ m_schema, m_threadsafe, getProperties() );
new InfoDescriptor(
m_name, m_classname, m_version, InfoDescriptor.TRANSIENT,
m_collection,
- m_schema, m_threadsafe, m_native, getProperties() );
+ m_schema, m_threadsafe, getProperties() );

// All these should pass.

new InfoDescriptor(
m_name, m_classname, m_version, "Fake Lifestyle", m_collection,
- m_schema, m_threadsafe, m_native, getProperties() );
+ m_schema, m_threadsafe, getProperties() );

fail( "Did not throw the proper IllegalArgumentException" );
}

Modified:
qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/TypeTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/TypeTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/api/src/test/net/dpml/meta/info/test/TypeTestCase.java
Sat Jun 11 03:37:38 2005
@@ -154,6 +154,6 @@

private static InfoDescriptor createSimpleInfo( String classname )
{
- return new InfoDescriptor( null, classname, null, null, null, null,
false, true, null );
+ return new InfoDescriptor( null, classname, null, null, null, null,
false, null );
}
}

Modified:
qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/builder/impl/XMLTypeCreator.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/builder/impl/XMLTypeCreator.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/builder/impl/XMLTypeCreator.java
Sat Jun 11 03:37:38 2005
@@ -367,7 +367,6 @@
final String classname, final Configuration info )
throws BuildException
{
- final boolean isNative = info.getAttributeAsBoolean( "native", false
);
final boolean threadsafe = info.getAttributeAsBoolean( "threadsafe",
false );

final String name =
@@ -386,7 +385,7 @@
info.getChild( "collection" ).getValue( collectionLegacy );

return new InfoDescriptor(
- name, classname, version, lifestyle, collection, schema,
threadsafe, isNative, attributes );
+ name, classname, version, lifestyle, collection, schema,
threadsafe, attributes );
}

/**
@@ -394,7 +393,7 @@
* resolved by retrieving the &lt;lifestyle&gt; element value, however,
for
* backward compatability - if the lifecycle element is not present, we
will
* attempt to resolve the lifestyle using the attribute value relative to
the
- * key urn:avalon:lifestyle.
+ * key urn:metro:lifestyle.
*
* @param info the info configuration fragment
* @param attributes the component attributes
@@ -409,7 +408,7 @@
}
else
{
- return attributes.getProperty( "urn:avalon:lifestyle" );
+ return attributes.getProperty( "urn:metro:lifestyle" );
}
}


Modified:
qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/impl/ConfigurationBuilder.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/impl/ConfigurationBuilder.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/impl/ConfigurationBuilder.java
Sat Jun 11 03:37:38 2005
@@ -53,18 +53,6 @@
new DTDInfo( "@SERVICE-DTD-PUBLIC-ID@",
"@SERVICE-DTD-SYSTEM-ID@",
"net/dpml/meta/service.dtd" ),
- new DTDInfo( "-//AVALON/Component Type DTD Version 1.0//EN",
- "http://avalon.apache.org/dtds/meta/type_1_0.dtd";,
- "net/dpml/meta/type.dtd" ),
- new DTDInfo( "-//AVALON/Component Type DTD Version 1.1//EN",
- "http://avalon.apache.org/dtds/meta/type_1_1.dtd";,
- "net/dpml/meta/type.dtd" ),
- new DTDInfo( "-//AVALON/Service DTD Version 1.0//EN",
- "http://avalon.apache.org/dtds/meta/service_1_0.dtd";,
- "net/dpml/meta/service.dtd" ),
- new DTDInfo( "-//PHOENIX/Block Info DTD Version 1.0//EN",
-
"http://avalon.apache.org/dtds/phoenix/blockinfo_1.0.dtd";,
- "net/dpml/meta/blockinfo.dtd" ),
};

private static final DTDResolver DTD_RESOLVER =

Modified:
qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/writer/impl/XMLTypeWriter.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/writer/impl/XMLTypeWriter.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/impl/src/main/net/dpml/meta/info/writer/impl/XMLTypeWriter.java
Sat Jun 11 03:37:38 2005
@@ -44,9 +44,6 @@
public class XMLTypeWriter
implements TypeWriter
{
- private static final String AVALON_CONTEXT_CLASS =
- "net.dpml.context.Context";
-
private static final String METRO_CONTEXT_CLASS =
"net.dpml.context.Context";

@@ -62,11 +59,11 @@
{
final Writer writer = new OutputStreamWriter( outputStream );
writeHeader( writer );
- writeDoctype( writer, "type", type.getInfo().isNative() );
+ writeDoctype( writer, "type" );
writer.write( "\n\n<type>" );
writeInfo( writer, type.getInfo() );
writeLoggers( writer, type.getCategories() );
- writeContext( writer, type.getContext(), type.getInfo().isNative() );
+ writeContext( writer, type.getContext() );
writeServices( writer, type.getServices() );
writeDependencies( writer, type.getDependencies() );
writer.write( "\n</type>" );
@@ -92,25 +89,14 @@
* @throws IOException if unable to write xml
*/
private void writeDoctype( final Writer writer,
- final String root, boolean flag )
+ final String root )
throws IOException
{
- if( flag )
- {
- final String doctype =
- "\n<!DOCTYPE " + root
- + " PUBLIC \"@TYPE-DTD-PUBLIC-ID@\" "
- + "\"@TYPE-DTD-SYSTEM-ID@\" >";
- writer.write( doctype );
- }
- else
- {
- final String doctype =
- "\n<!DOCTYPE " + root
- + " PUBLIC \"-//AVALON/Type DTD Version 1.0//EN\" "
- + "\"http://avalon.apache.org/dtds/meta/type_1_1.dtd\"; >";
- writer.write( doctype );
- }
+ final String doctype =
+ "\n<!DOCTYPE " + root
+ + " PUBLIC \"@TYPE-DTD-PUBLIC-ID@\" "
+ + "\"@TYPE-DTD-SYSTEM-ID@\" >";
+ writer.write( doctype );
}

/**
@@ -123,7 +109,7 @@
private void writeInfo( final Writer writer, final InfoDescriptor info )
throws IOException
{
- writer.write( "\n <info native=\"" + info.isNative() + "\"
threadsafe=\"" + info.isThreadsafe() + "\">" );
+ writer.write( "\n <info threadsafe=\"" + info.isThreadsafe() +
"\">" );

writer.write( "\n <name>");
writer.write( info.getName() );
@@ -216,13 +202,13 @@
* @throws IOException if unable to write xml
*/
private void writeContext( final Writer writer,
- final ContextDescriptor context, boolean flag
)
+ final ContextDescriptor context )
throws IOException
{
final String type = context.getContextInterfaceClassname();
final EntryDescriptor[] entrys = context.getEntries();
final int count = context.getAttributeNames().length;
- if( getContextClassname( flag ).equals( type )
+ if( getContextClassname().equals( type )
&& 0 == count
&& 0 == entrys.length )
{
@@ -437,16 +423,9 @@
writer.write( "\"/>" );
}

- private String getContextClassname( boolean flag )
+ private String getContextClassname()
{
- if( flag )
- {
- return METRO_CONTEXT_CLASS;
- }
- else
- {
- return AVALON_CONTEXT_CLASS;
- }
+ return METRO_CONTEXT_CLASS;
}



Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/ant/MetaTask.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/ant/MetaTask.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/ant/MetaTask.java
Sat Jun 11 03:37:38 2005
@@ -155,19 +155,6 @@
return m_postfix;
}

- private boolean getNativeMode()
- {
- String namespace = getProject().getProperty( "dpml.meta.namespace" );
- if( "avalon".equals( namespace ) )
- {
- return false;
- }
- else
- {
- return true;
- }
- }
-
private String validatePostfix( String postfix )
{
if( postfix.equalsIgnoreCase( "xtype" )
@@ -294,7 +281,6 @@
*/
private Counter writeMetaData() throws IOException
{
- boolean flag = getNativeMode();
int services = 0;
int types = 0;
final int size = allClasses.size();
@@ -316,7 +302,7 @@
}
}

- Service service = new ServiceTag( javaClass, flag
).getService();
+ Service service = new ServiceTag( javaClass ).getService();
if( service == null )
{
continue;
@@ -356,7 +342,7 @@
}
}

- Type type = new TypeTag( javaClass, flag ).getType();
+ Type type = new TypeTag( javaClass ).getType();
if( type == null )
{
continue;

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/ant/package.html
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/ant/package.html
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/ant/package.html
Sat Jun 11 03:37:38 2005
@@ -2,7 +2,7 @@

<p>Metro component meta-info generation for Ant.</p>

- <p>The meta info generator task scans sources files for the presence of
an avalon.meta tags and based on the tag set specification, generates either
XML or serialized meta-info descriptors.</p>
+ <p>The meta info generator task scans sources files for the presence of
tags and based on the tag set specification, generates either XML or
serialized meta-info descriptors.</p>

<div class="h4">

@@ -27,7 +27,7 @@
<td>format</td>
<td>false</td>
<td>
-The output format may be one of <strong>xml</strong> or
<strong>serial</strong>. The xml format is less compact but more portable.
The serial format is appropriate when usage is know to be in the context of
the Avalon Meta API. The serial format is a serialized representation of the
corresponding Task or Service instance.
+The output format may be one of <strong>xml</strong> or
<strong>serial</strong>. The xml format is less compact but more portable.
The serial format is appropriate when usage is know to be in the context of
the Meta API. The serial format is a serialized representation of the
corresponding Task or Service instance.
</td>
</tr>
<tr class="a">
@@ -72,7 +72,7 @@
<pre>
&lt;target name="meta" description="Generates the XML descriptors"
depends="build"&gt;
&lt;mkdir dir="${meta.dir}" /&gt;
- &lt;taskdef name="meta"
classname="org.apache.avalon.meta.tools.ant.MetaTask"&gt;
+ &lt;taskdef name="meta" classname="net.dpml.meta.tools.ant.MetaTask"&gt;
&lt;classpath refid="project.class.path" /&gt;
&lt;/taskdef&gt;
&lt;meta destDir="${meta.dir}" format="xml"&gt;
@@ -98,59 +98,60 @@

import java.io.File;

-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.context.ContextException;
+import net.dpml.logging.Logger;
+import net.dpml.logging.LogEnabled;
+import net.dpml.service.Serviceable;
+import net.dpml.service.ServiceManager;
+import net.dpml.service.ServiceException;
+import net.dpml.context.Context;
+import net.dpml.context.Contextualizable;
+import net.dpml.context.ContextException;

/**
* An example component containing meta info under javadoc tags.
*
- * @avalon.component name="secondary-component"
- * version="2.4" lifestyle="singleton"
- * @avalon.service type="SecondaryService" version="0.1"
+ * @metro.component name="secondary-component" lifestyle="singleton"
+ * version="1.0"
+ * @metro.service type="SecondaryService" version="1.1"
*/
-public class Secondary extends AbstractLogEnabled
- implements Serviceable, SecondaryService, Contextualizable
+public class Secondary
+ implements Serviceable, SecondaryService, Contextualizable, LogEnabled
{
- private Logger m_system = null;
+ private Logger m_baseLogger;
+ private Logger m_systemLogger;
private File m_home = null;
private PrimaryService m_primary = null;

/**
* Supply of a logging channel to the component.
* @param logger the logging channel
- * @avalon.logger name="system"
+ * @metro.logger name="system"
*/
public void enableLogging( Logger logger )
{
- super.enableLogging( logger );
- m_system = logger.getChildLogger( "system" );
+ m_baseLogger = logger;
+ m_systemLogger = logger.getChildLogger( "system" );
}

/**
* Supply of the runtime context by the container.
* @param context the runtime context
- * @avalon.entry key="home" type="java.io.File"
+ * @metro.entry key="urn:metro:dir" type="java.io.File"
*/
public void contextualize( Context context ) throws ContextException
{
- m_home = (File) context.get("home");
+ m_home = (File) context.get("urn:metro:dir");
}

/**
* Supply of dependent services to this component by the container.
* @param manager the service manager
- * @avalon.dependency type="PrimaryService" version="1.3" key="primary"
+ * @metro.dependency type="PrimaryService" key="primary" version="1.2"
*/
public void service( ServiceManager manager ) throws ServiceException
{
- m_primary = (PrimaryService) manager.lookup( "primary" );
- m_system.info( "resolved primary service reference" );
+ m_primary = (PrimaryService) manager.lookup( "primary" );
+ m_system.info( "resolved primary service reference" );
}
}
</pre>
@@ -169,26 +170,27 @@
<div id="source">
<pre>
&lt;?xml version="1.0" ?&gt;
-&lt;!DOCTYPE type PUBLIC "-//AVALON/Type DTD Version 1.0//EN"
- "http://avalon.apache.org/dtds/meta/type_1_1.dtd"; &gt;
+&lt;!DOCTYPE type
+ PUBLIC "@TYPE-DTD-PUBLIC-ID@"
+ @TYPE-DTD-SYSTEM-ID@ &gt;

&lt;type&gt;
&lt;info&gt;
&lt;name&gt;secondary-component&lt;/name&gt;
- &lt;version&gt;2.4.0&lt;/version&gt;
+ &lt;version&gt;1.0&lt;/version&gt;
&lt;lifestyle&gt;singleton&lt;/lifestyle&gt;
&lt;/info&gt;
&lt;loggers&gt;
&lt;logger name="system"/&gt;
&lt;/loggers&gt;
&lt;context&gt;
- &lt;entry key="home" type="java.io.File"/&gt;
+ &lt;entry key="urn:metro:dir" type="java.io.File"/&gt;
&lt;/context&gt;
&lt;services&gt;
- &lt;service type="SecondaryService" version="0.1.0"/&gt;
+ &lt;service type="SecondaryService" version="1.1"/&gt;
&lt;/services&gt;
&lt;dependencies&gt;
- &lt;dependency key="primary" type="PrimaryService" version="1.3.0"/&gt;
+ &lt;dependency key="primary" type="PrimaryService" version="1.2"/&gt;
&lt;/dependencies&gt;
&lt;/type&gt;
</pre>

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/AbstractTag.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/AbstractTag.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/AbstractTag.java
Sat Jun 11 03:37:38 2005
@@ -49,19 +49,16 @@

private JavaClass m_class;

- private final boolean m_native;
-
- /**
+ /**
* Class constructor.
* @param clazz the javadoc class descriptor
*/
- public AbstractTag( final JavaClass clazz, boolean flag )
+ public AbstractTag( final JavaClass clazz )
{
m_class = clazz;
- m_native = flag;
}

- /**
+ /**
* Return the javadoc class descriptor.
* @return the javadoc class descriptor
*/
@@ -70,35 +67,23 @@
return m_class;
}

- /**
- * Return the user defined namespace for avalon tags. The value returned
is
- * established by the javadoc tag 'avalon.namespace [namespace-value]'
where
+ /**
+ * Return the user defined namespace for tags. The value returned is
+ * established by the javadoc tag 'metro.namespace [namespace-value]'
where
* [namespace-value] is a string representing the namespace identifier.
- * @return the namespace tag used to represent the avalon.meta tag space
+ * @return the namespace tag used to represent the metro.meta tag space
* @exception IllegalArgumentException if the namespace tag is declared
by does not
* contain a value
*/
public String getNS() throws IllegalArgumentException
{
- if( m_native )
- {
- return Tags.METRO;
- }
- else
- {
- return Tags.AVALON;
- }
- }
-
- public boolean isNative()
- {
- return m_native;
+ return Tags.METRO;
}

/**
- * Return the user defined namespace for avalon tags including the
+ * Return the user defined namespace for tags including the
* standard namespace delimiter. The value returned is established
- * by the javadoc tag 'avalon.namespace [namespace-value]' where
+ * by the javadoc tag 'metro.namespace [namespace-value]' where
* [namespace-value] is a string representing the namespace identifier
* with the namespace delimiter appended.
* @return the namespace tag with delimeter

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/AttributeTag.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/AttributeTag.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/AttributeTag.java
Sat Jun 11 03:37:38 2005
@@ -51,13 +51,13 @@
* Creation of a new attribute tag.
* @param clazz the javadoc class descriptor
*/
- public AttributeTag( final JavaClass clazz, boolean flag )
+ public AttributeTag( final JavaClass clazz )
{
- super( clazz, flag );
+ super( clazz );
}

/**
- * Return the value of all Avalon 'attribute' tags as a Properties value.
+ * Return the value of all 'attribute' tags as a Properties value.
* @return the attribute set as a property instance
*/
public Properties getProperties()

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ContextTag.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ContextTag.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ContextTag.java
Sat Jun 11 03:37:38 2005
@@ -39,15 +39,9 @@
public class ContextTag extends AbstractTag
{
/**
- * The default native context class.
+ * The default context class.
*/
- protected static final String NATIVE_CONTEXT_CLASS =
- "net.dpml.context.Context";
-
- /**
- * The avalon context class.
- */
- protected static final String AVALON_CONTEXT_CLASS =
+ protected static final String CONTEXT_CLASS =
"net.dpml.context.Context";

/**
@@ -85,9 +79,9 @@
* Context tag constructor.
* @param clazz the javadoc class descriptor
*/
- public ContextTag( final JavaClass clazz, boolean flag )
+ public ContextTag( final JavaClass clazz )
{
- super( clazz, flag );
+ super( clazz );
}

/**

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/DependencyTag.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/DependencyTag.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/DependencyTag.java
Sat Jun 11 03:37:38 2005
@@ -55,15 +55,9 @@
public static final String OPTIONAL_PARAM = "optional";

/**
- * The native service manager class.
+ * The service manager class.
*/
- protected static final String NATIVE_SERVICE_MANAGER =
- "net.dpml.service.ServiceManager";
-
- /**
- * The avalon service manager class.
- */
- protected static final String AVALON_SERVICE_MANAGER =
+ protected static final String SERVICE_MANAGER =
"net.dpml.service.ServiceManager";

private JavaMethod[] m_methods;
@@ -72,9 +66,9 @@
* Class constructor.
* @param clazz the javadoc class descriptor
*/
- public DependencyTag( final JavaClass clazz, boolean flag )
+ public DependencyTag( final JavaClass clazz )
{
- super( clazz, flag );
+ super( clazz );
setMethods();
}

@@ -153,14 +147,7 @@

protected String getServiceManagerClassname()
{
- if( isNative() )
- {
- return NATIVE_SERVICE_MANAGER;
- }
- else
- {
- return AVALON_SERVICE_MANAGER;
- }
+ return SERVICE_MANAGER;
}
}


Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/LoggerTag.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/LoggerTag.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/LoggerTag.java
Sat Jun 11 03:37:38 2005
@@ -48,16 +48,9 @@
public static final String NAME_PARAM = "name";

/**
- * The avalon logger class.
+ * The logger class.
*/
- protected static final String NATIVE_LOGGER_CLASS =
- "net.dpml.logging.Logger";
-
- /**
- * The avalon logger class.
- */
- protected static final String AVALON_LOGGER_CLASS =
- "net.dpml.logging.Logger";
+ protected static final String LOGGER_CLASS = "net.dpml.logging.Logger";

private JavaMethod[] m_methods;

@@ -65,9 +58,9 @@
* The logger tag constructor.
* @param clazz the javadoc class descriptor.
*/
- public LoggerTag( final JavaClass clazz, boolean flag )
+ public LoggerTag( final JavaClass clazz )
{
- super( clazz, flag );
+ super( clazz );
setMethods();
}

@@ -114,13 +107,6 @@

protected String getLoggerClassname()
{
- if( isNative() )
- {
- return NATIVE_LOGGER_CLASS;
- }
- else
- {
- return AVALON_LOGGER_CLASS;
- }
+ return LOGGER_CLASS;
}
}

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/SchemaTag.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/SchemaTag.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/SchemaTag.java
Sat Jun 11 03:37:38 2005
@@ -47,16 +47,16 @@
* The configuration schema tag constructor.
* @param clazz the javadoc class descriptor.
*/
- public SchemaTag( final JavaClass clazz, boolean flag )
+ public SchemaTag( final JavaClass clazz )
{
- super( clazz, flag );
+ super( clazz );
setMethods();
}

/**
* Return a schema descriptor string if present else return a null
* string. The value returned corresponds to information derived from
- * the first avalon.configuration tag declared.
+ * the first metro.configuration tag declared.
*
* @return the string identifying the configuration schema
*/

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ServiceTag.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ServiceTag.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ServiceTag.java
Sat Jun 11 03:37:38 2005
@@ -45,13 +45,13 @@
* Type tag constructor.
* @param clazz the javadoc class descriptor
*/
- public ServiceTag( final JavaClass clazz, boolean flag )
+ public ServiceTag( final JavaClass clazz )
{
- super( clazz, flag );
+ super( clazz );
}

/**
- * Return the value of the Avalon 'service' tag.
+ * Return the value of the 'service' tag.
* @return the service descriptor or null if no service is declared
*/
public Service getService()
@@ -63,7 +63,7 @@
}
final Version version = Version.getVersion( getNamedParameter( tag,
VERSION_PARAM, "" ) );
final String type = getJavaClass().getFullyQualifiedName();
- final Properties properties = new AttributeTag( getJavaClass(),
isNative() ).getProperties();
+ final Properties properties = new AttributeTag( getJavaClass()
).getProperties();
final ReferenceDescriptor ref = new ReferenceDescriptor( type,
version );
return new Service( ref, properties );
}

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ServicesTag.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ServicesTag.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/ServicesTag.java
Sat Jun 11 03:37:38 2005
@@ -45,9 +45,9 @@
* The service tag constructor.
* @param clazz the javadoc class descriptor
*/
- public ServicesTag( final JavaClass clazz, boolean flag )
+ public ServicesTag( final JavaClass clazz )
{
- super( clazz, flag );
+ super( clazz );
}

/**

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/Tags.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/Tags.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/Tags.java
Sat Jun 11 03:37:38 2005
@@ -33,17 +33,8 @@
public static final String METRO = "metro";

/**
- * The default namespace for tags related to the meta package.
- */
- public static final String AVALON = "avalon";
-
- /**
* The delimiter between namespace and tag key.
*/
public static final String DELIMITER = ".";

- /**
- * The namespace tag combined with the delimiter.
- */
- //public static final String NAMESPACE_TAG = NAMESPACE + DELIMITER +
"namespace";
}

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/TypeTag.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/TypeTag.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/main/net/dpml/meta/info/tags/TypeTag.java
Sat Jun 11 03:37:38 2005
@@ -35,7 +35,7 @@

/**
* <p>A doclet tag the declares a a {@link Type} descriptor using the
- * <code>&amp;avalon.type</code> or <code>&amp;metro.component</code>
+ * <code>&amp;metro.component</code>
* javadoc tag. The &amp;metro.component is senonomouse with
&amp;metro.type.
* The &amp;metro.type tag recognizes the following attributes:<p>
*
@@ -92,13 +92,13 @@
* Type tag constructor.
* @param clazz the javadoc class descriptor
*/
- public TypeTag( final JavaClass clazz, boolean flag )
+ public TypeTag( final JavaClass clazz )
{
- super( clazz, flag );
+ super( clazz );
}

/**
- * Return the value of the Avalon 'component' tag.
+ * Return the value of the 'component' tag.
* @return the name of the component type
* @exception IllegalArgumentException if the name tag does not contain a
value
*/
@@ -116,17 +116,17 @@
final boolean threadsafe = getThreadsafe( tag );
final String collection = getLifestyleCollectionPolicy( tag );
final String type = getJavaClass().getFullyQualifiedName();
- final Properties properties = new AttributeTag( getJavaClass(),
isNative() ).getProperties();
- final String schema = new SchemaTag( getJavaClass(), isNative()
).getConfigurationSchema();
+ final Properties properties = new AttributeTag( getJavaClass()
).getProperties();
+ final String schema = new SchemaTag( getJavaClass()
).getConfigurationSchema();

final InfoDescriptor info =
new InfoDescriptor(
- name, type, version, lifestyle, collection, schema, threadsafe,
isNative(), properties );
- final ServiceDescriptor[] services = new ServicesTag(
getJavaClass(), isNative() ).getServices();
- final CategoryDescriptor[] loggers = new LoggerTag( getJavaClass(),
isNative() ).getCategories();
+ name, type, version, lifestyle, collection, schema, threadsafe,
properties );
+ final ServiceDescriptor[] services = new ServicesTag( getJavaClass()
).getServices();
+ final CategoryDescriptor[] loggers = new LoggerTag( getJavaClass()
).getCategories();
final DependencyDescriptor[] dependencies =
- new DependencyTag( getJavaClass(), isNative() ).getDependencies();
- final ContextDescriptor context = new ContextTag( getJavaClass(),
isNative() ).getContext();
+ new DependencyTag( getJavaClass() ).getDependencies();
+ final ContextDescriptor context = new ContextTag( getJavaClass()
).getContext();

//
// unsuppported elements

Modified:
qa/main/2450fork-rc/metro/classic/meta/tools/src/test/net/dpml/meta/test/MetaTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/meta/tools/src/test/net/dpml/meta/test/MetaTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/classic/meta/tools/src/test/net/dpml/meta/test/MetaTestCase.java
Sat Jun 11 03:37:38 2005
@@ -40,7 +40,7 @@
/**
* A testcase for the meta tools package. The testcase verifies the number
* and integrity of service and type defintions created as a result of a scan
- * of the working test directory for source files containing the
avalon.version
+ * of the working test directory for source files containing the
metro.version
* javadoc tag.
*
* @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
@@ -91,7 +91,7 @@
/**
* Scan the test directory for source files and build up the
* qdox JavaSource defintions from which JavaClass defintions
- * are resolved. If the class contains a avalon.version tag
+ * are resolved. If the class contains a metro.version tag
* then we build a Type or Service instance (class or interface
* respectively, and add them to the type and service lists.
*
@@ -111,7 +111,7 @@
JavaClass c = classes[j];
if( c.isInterface() )
{
- Service service = new ServiceTag( c, true ).getService();
+ Service service = new ServiceTag( c ).getService();
if( service == null )
{
fail( "encounter null service: " + c );
@@ -131,7 +131,7 @@
}
else
{
- Type type = new TypeTag( c, true ).getType();
+ Type type = new TypeTag( c ).getType();
if( type == null )
{
fail( "encounter null type: " + c );

Modified: qa/main/2450fork-rc/metro/classic/testing/includes/build.xml
==============================================================================
--- qa/main/2450fork-rc/metro/classic/testing/includes/build.xml
(original)
+++ qa/main/2450fork-rc/metro/classic/testing/includes/build.xml Sat
Jun 11 03:37:38 2005
@@ -5,13 +5,9 @@

<transit:import uri="artifact:template:dpml/magic/standard"/>

- <property name="dpml.meta.namespace" value="avalon"/>
+ <property name="dpml.meta.namespace" value="metro"/>

<target name="init" depends="standard.init">
- <x:filter key="avalon-framework-api" feature="uri"
- token="FRAMEWORK-API-SPEC"/>
- <x:filter key="avalon-framework-impl" feature="uri"
- token="FRAMEWORK-IMPL-SPEC"/>
<x:filter key="dpml-test-testa" feature="uri"
token="TEST-A-SPEC"/>
<x:filter key="dpml-test-testb" feature="uri"

Modified:
qa/main/2450fork-rc/metro/classic/testing/includes/src/main/BLOCK-INF/block.xml
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/includes/src/main/BLOCK-INF/block.xml
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/includes/src/main/BLOCK-INF/block.xml
Sat Jun 11 03:37:38 2005
@@ -17,8 +17,6 @@
<artifact>@TEST-B-SPEC@</artifact>
<artifact>@TEST-C-SPEC@</artifact>
<artifact>@TEST-D-SPEC@</artifact>
- <artifact>@FRAMEWORK-API-SPEC@</artifact>
- <artifact>@FRAMEWORK-IMPL-SPEC@</artifact>
</classpath>
</classloader>

@@ -35,8 +33,8 @@
<container name="block">
<component name="test" class="net.dpml.test.teste.TestE">
<context>
- <entry key="home">
- <import key="urn:avalon:home"/>
+ <entry key="urn:metro:dir">
+ <import key="urn:metro:dir"/>
</entry>
</context>
</component>

Modified:
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/ComplexComponent.xprofile
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/ComplexComponent.xprofile
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/ComplexComponent.xprofile
Sat Jun 11 03:37:38 2005
@@ -1,16 +1,16 @@
-<?xml version="1.0"?>
-
-<!--
-Copyright (C) The Apache Software Foundation. All rights reserved.
-This software is published under the terms of the Apache Software License
-version 1.1, a copy of which has been included with this distribution in
-the LICENSE.txt file.
-
-@author Avalon Development Team
-@version $Id$
--->
-
-<profiles>
- <profile name="complex"/>
-</profiles>
-
+<?xml version="1.0"?>
+
+<!--
+Copyright (C) The Apache Software Foundation. All rights reserved.
+This software is published under the terms of the Apache Software License
+version 1.1, a copy of which has been included with this distribution in
+the LICENSE.txt file.
+
+@author DPML Development Team
+@version $Id$
+-->
+
+<profiles>
+ <profile name="complex"/>
+</profiles>
+

Modified:
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/DemoManager.xprofile
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/DemoManager.xprofile
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/DemoManager.xprofile
Sat Jun 11 03:37:38 2005
@@ -1,16 +1,16 @@
-<?xml version="1.0"?>
-
-<!--
-Copyright (C) The Apache Software Foundation. All rights reserved.
-This software is published under the terms of the Apache Software License
-version 1.1, a copy of which has been included with this distribution in
-the LICENSE.txt file.
-
-@author Avalon Development Team
-@version $Id$
--->
-
-<profiles>
- <profile name="demo"/>
-</profiles>
-
+<?xml version="1.0"?>
+
+<!--
+Copyright (C) The Apache Software Foundation. All rights reserved.
+This software is published under the terms of the Apache Software License
+version 1.1, a copy of which has been included with this distribution in
+the LICENSE.txt file.
+
+@author DPML Development Team
+@version $Id$
+-->
+
+<profiles>
+ <profile name="demo"/>
+</profiles>
+

Modified:
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/ExploitationManager.xprofile
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/ExploitationManager.xprofile
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/ExploitationManager.xprofile
Sat Jun 11 03:37:38 2005
@@ -1,16 +1,16 @@
-<?xml version="1.0"?>
-
-<!--
-Copyright (C) The Apache Software Foundation. All rights reserved.
-This software is published under the terms of the Apache Software License
-version 1.1, a copy of which has been included with this distribution in
-the LICENSE.txt file.
-
-@author Avalon Development Team
-@version $Id$
--->
-
-<profiles>
- <profile name="exploitation"/>
-</profiles>
-
+<?xml version="1.0"?>
+
+<!--
+Copyright (C) The Apache Software Foundation. All rights reserved.
+This software is published under the terms of the Apache Software License
+version 1.1, a copy of which has been included with this distribution in
+the LICENSE.txt file.
+
+@author Metro Development Team
+@version $Id$
+-->
+
+<profiles>
+ <profile name="exploitation"/>
+</profiles>
+

Modified:
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/SimpleComponent.xconfig
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/SimpleComponent.xconfig
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/SimpleComponent.xconfig
Sat Jun 11 03:37:38 2005
@@ -6,7 +6,7 @@
version 1.1, a copy of which has been included with this distribution in
the LICENSE.txt file.

-@author Avalon Development Team
+@author DPML Development Team
@version $Id$
-->


Modified:
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/SimpleComponent.xprofile
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/SimpleComponent.xprofile
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/SimpleComponent.xprofile
Sat Jun 11 03:37:38 2005
@@ -1,16 +1,16 @@
-<?xml version="1.0"?>
-
-<!--
-Copyright (C) The Apache Software Foundation. All rights reserved.
-This software is published under the terms of the Apache Software License
-version 1.1, a copy of which has been included with this distribution in
-the LICENSE.txt file.
-
-@author Avalon Development Team
-@version $Id$
--->
-
-<profiles>
- <profile name="simple"/>
-</profiles>
-
+<?xml version="1.0"?>
+
+<!--
+Copyright (C) The Apache Software Foundation. All rights reserved.
+This software is published under the terms of the Apache Software License
+version 1.1, a copy of which has been included with this distribution in
+the LICENSE.txt file.
+
+@author DPML Development Team
+@version $Id$
+-->
+
+<profiles>
+ <profile name="simple"/>
+</profiles>
+

Modified:
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/TerminalComponent.xprofile
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/TerminalComponent.xprofile
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/TerminalComponent.xprofile
Sat Jun 11 03:37:38 2005
@@ -1,16 +1,16 @@
-<?xml version="1.0"?>
-
-<!--
-Copyright (C) The Apache Software Foundation. All rights reserved.
-This software is published under the terms of the Apache Software License
-version 1.1, a copy of which has been included with this distribution in
-the LICENSE.txt file.
-
-@author Avalon Development Team
-@version $Id$
--->
-
-<profiles>
- <profile name="terminal"/>
-</profiles>
-
+<?xml version="1.0"?>
+
+<!--
+Copyright (C) The Apache Software Foundation. All rights reserved.
+This software is published under the terms of the Apache Software License
+version 1.1, a copy of which has been included with this distribution in
+the LICENSE.txt file.
+
+@author DPML Development Team
+@version $Id$
+-->
+
+<profiles>
+ <profile name="terminal"/>
+</profiles>
+

Modified:
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicComponent.xconfig
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicComponent.xconfig
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicComponent.xconfig
Sat Jun 11 03:37:38 2005
@@ -6,7 +6,7 @@
version 1.1, a copy of which has been included with this distribution in
the LICENSE.txt file.

-@author Avalon Development Team
+@author DPML Development Team
@version $Id$
-->


Modified:
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicComponent.xprofile
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicComponent.xprofile
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicComponent.xprofile
Sat Jun 11 03:37:38 2005
@@ -6,7 +6,7 @@
version 1.1, a copy of which has been included with this distribution in
the LICENSE.txt file.

-@author Avalon Development Team
+@author DPML Development Team
@version $Id$
-->


Modified:
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicService.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicService.java
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/playground/src/main/net/dpml/test/playground/basic/BasicService.java
Sat Jun 11 03:37:38 2005
@@ -21,9 +21,9 @@
* The <code>BasicService</code> executes a prime objective.
*
* @metro.service
- * @metro.attribute key="urn:avalon:service.name" value="basic"
- * @metro.attribute key="urn:avalon:service.description"
- * value="A demonstration service used within the scope of the Avalon
playground package for educational and unit testing purpose"
+ * @metro.attribute key="urn:metro:service.name" value="basic"
+ * @metro.attribute key="urn:metro:service.description"
+ * value="A demonstration service used within the scope of the Metro
playground package for educational and unit testing purpose"
* @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
*/
public interface BasicService

Modified:
qa/main/2450fork-rc/metro/classic/testing/testa/src/main/net/dpml/test/testa/TestA.java
==============================================================================
---
qa/main/2450fork-rc/metro/classic/testing/testa/src/main/net/dpml/test/testa/TestA.java
(original)
+++
qa/main/2450fork-rc/metro/classic/testing/testa/src/main/net/dpml/test/testa/TestA.java
Sat Jun 11 03:37:38 2005
@@ -32,22 +32,22 @@
{
/**
* @metro.context type="net.dpml.test.testa.Facade"
- * @metro.entry key="urn:avalon:partition"
- * @metro.entry key="urn:avalon:classloader" type="java.lang.ClassLoader"
- * @metro.entry key="urn:avalon:home" type="java.io.File"
- * @metro.entry key="urn:avalon:temp" type="java.io.File"
- * @metro.entry key="urn:avalon:name" alias="name"
+ * @metro.entry key="urn:metro:partition"
+ * @metro.entry key="urn:metro:classloader" type="java.lang.ClassLoader"
+ * @metro.entry key="urn:metro:home" type="java.io.File"
+ * @metro.entry key="urn:metro:temp" type="java.io.File"
+ * @metro.entry key="urn:metro:name" alias="name"
* @metro.entry key="home" type="java.io.File"
* @metro.entry key="time" type="java.util.Date" volatile="true"
* @metro.entry key="path"
*/
public void contextualize( Context context ) throws ContextException
{
- getLogger().info( "name: " + context.get( "urn:avalon:name" ) );
- getLogger().info( "partition: " + context.get(
"urn:avalon:partition" ) );
- getLogger().info( "classloader: " + context.get(
"urn:avalon:classloader" ) );
- getLogger().info( "work: " + context.get( "urn:avalon:home" ) );
- getLogger().info( "temp: " + context.get( "urn:avalon:temp" ) );
+ getLogger().info( "name: " + context.get( "urn:metro:name" ) );
+ getLogger().info( "partition: " + context.get( "urn:metro:partition"
) );
+ getLogger().info( "classloader: " + context.get(
"urn:metro:classloader" ) );
+ getLogger().info( "work: " + context.get( "urn:metro:home" ) );
+ getLogger().info( "temp: " + context.get( "urn:metro:temp" ) );
}

public void initialize() throws Exception

Modified:
qa/main/2450fork-rc/metro/composition/builder/src/main/net/dpml/composition/builder/TypeBuilderTask.java
==============================================================================
---
qa/main/2450fork-rc/metro/composition/builder/src/main/net/dpml/composition/builder/TypeBuilderTask.java
(original)
+++
qa/main/2450fork-rc/metro/composition/builder/src/main/net/dpml/composition/builder/TypeBuilderTask.java
Sat Jun 11 03:37:38 2005
@@ -1,989 +1,989 @@
-/*
- * Copyright (c) 2005 Stephen J. McConnell
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.composition.builder;
-
-import java.beans.IntrospectionException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.Properties;
-
-import net.dpml.composition.info.CategoryDescriptor;
-import net.dpml.composition.info.ContextDescriptor;
-import net.dpml.composition.info.DependencyDescriptor;
-import net.dpml.composition.info.EntryDescriptor;
-import net.dpml.composition.info.InfoDescriptor;
-import net.dpml.composition.info.PartDescriptor;
-import net.dpml.composition.info.ServiceDescriptor;
-import net.dpml.composition.info.Type;
-import net.dpml.composition.info.PartDescriptor.Operation;
-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.impl.DefaultConfigurationBuilder;
-import net.dpml.magic.tasks.ProjectTask;
-
-import org.apache.tools.ant.BuildException;
-
-/**
- * The TypeTask creates a serialized descriptor of a component type.
- *
- * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
- * @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
- */
-public class TypeBuilderTask extends ProjectTask implements TypeBuilder
-{
- //---------------------------------------------------------------
- // state
- //---------------------------------------------------------------
-
- private String m_name;
- private String m_classname;
- private Class m_class;
-
- //---------------------------------------------------------------
- // setters
- //---------------------------------------------------------------
-
- public void setName( String name )
- {
- m_name = name;
- }
-
- public void setClass( String classname )
- {
- m_classname = classname;
- }
-
- //---------------------------------------------------------------
- // Builder
- //---------------------------------------------------------------
-
- /**
- * Return a urn identitifying the component type strategy that this
- * builder is supporting.
- *
- * @return a uri identifiying the type strategy
- */
- public URI getTypeHandlerURI()
- {
- return TYPE_HANDLER_URI;
- }
-
- /**
- * Return a uri identitifying the builder.
- *
- * @return a uri identifiying the type builder
- */
- public URI getBuilderURI()
- {
- return TYPE_BUILDER_URI;
- }
-
- //---------------------------------------------------------------
- // TypeBuilder
- //---------------------------------------------------------------
-
- public Type buildType( ClassLoader classloader )
- throws IntrospectionException, IOException
- {
- Class subject = loadSubjectClass( classloader );
- return buildType( subject );
- }
-
- public Type buildType( Class subject )
- throws IntrospectionException, IOException
- {
- log( "creating: " + subject.getName() );
- InfoDescriptor info = createInfoDescriptor( subject );
- ServiceDescriptor[] services = createServiceDescriptors( subject );
- DependencyDescriptor[] dependencies = new DependencyDescriptor[0];
// legacy
- CategoryDescriptor[] categories = new CategoryDescriptor[0];
- ContextDescriptor context = createContextDescriptor( subject );
- PartDescriptor[] parts = createPartDescriptors( subject );
- Configuration config = createDefaultConfiguration( subject );
- return new Type( info, categories, context, services, dependencies,
config, parts );
- }
-
- //---------------------------------------------------------------
- // Task
- //---------------------------------------------------------------
-
- public void execute()
- {
- final String error =
- "The type builder task does not support standalone operation. "
- + "Please use the 'types' task instead.";
- throw new UnsupportedOperationException( error );
- }
-
- //---------------------------------------------------------------
- // internals
- //---------------------------------------------------------------
-
- protected String getName()
- {
- if( null == m_name )
- {
- return "untitled";
- }
- return m_name;
- }
-
- protected String getClassname()
- {
- if( null == m_classname )
- {
- final String error =
- "Component type does not declare a classname.";
- throw new BuildException( error, getLocation() );
- }
- return m_classname;
- }
-
- private InfoDescriptor createInfoDescriptor( Class subject ) throws
IntrospectionException
- {
- String name = getName();
- String classname = subject.getName();
- boolean threadsafe = getThreadSafeCapability( subject );
- String lifestyle = getLifestylePreference( subject, threadsafe );
- String collection = getCollectionPolicyPreference( subject );
- String schema = getConfigurationSchema( subject );
- Properties properties = getTypeProperties( subject );
- return new InfoDescriptor(
- name, classname, null, lifestyle, collection, schema, threadsafe,
true, properties );
- }
-
- private boolean getThreadSafeCapability( Class subject ) throws
IntrospectionException
- {
- try
- {
- Field field = subject.getDeclaredField(
"TYPE_THREADSAFE_CAPABLE" );
- if( Modifier.isStatic( field.getModifiers() ) )
- {
- return field.getBoolean( null );
- }
- else
- {
- return false;
- }
- }
- catch( NoSuchFieldException e )
- {
- return false;
- }
- catch( IllegalArgumentException e )
- {
- final String error =
- "The component type ["
- + subject.getName()
- + "] declares an invalid static field TYPE_THREADSAFE_POLICY
declaration. "
- + "Could not convert the value to a boolean.";
- throw new IntrospectionException( error );
- }
- catch( Exception e )
- {
- final String error =
- "An unexpected error occured while resolving the static
TYPE_THREADSAFE_POLICY field on the type ["
- + subject.getName()
- + "].";
- throw new IntrospectionException( error );
- }
- }
-
- private String getLifestylePreference( Class subject, boolean threadsafe
) throws IntrospectionException
- {
- try
- {
- Field field = subject.getDeclaredField(
"TYPE_LIFESTYLE_PREFERENCE" );
- if( Modifier.isStatic( field.getModifiers() ) )
- {
- return (String) field.get( null );
- }
- else
- {
- if( threadsafe )
- {
- return InfoDescriptor.SINGLETON;
- }
- else
- {
- return InfoDescriptor.TRANSIENT;
- }
- }
- }
- catch( NoSuchFieldException e )
- {
- if( threadsafe )
- {
- return InfoDescriptor.SINGLETON;
- }
- else
- {
- return InfoDescriptor.TRANSIENT;
- }
- }
- catch( IllegalArgumentException e )
- {
- final String error =
- "The component type ["
- + subject.getName()
- + "] declares an invalid static field
TYPE_LIFESTYLE_PREFERENCE declaration. "
- + "Could not convert the value to an string.";
- throw new IntrospectionException( error );
- }
- catch( Exception e )
- {
- final String error =
- "An unexpected error occured while resolving the static
TYPE_LIFESTYLE_PREFERENCE field on the type ["
- + subject.getName()
- + "].";
- throw new IntrospectionException( error );
- }
- }
-
- private String getCollectionPolicyPreference( Class subject ) throws
IntrospectionException
- {
- try
- {
- Field field = subject.getDeclaredField(
"TYPE_COLLECTION_PREFERENCE" );
- if( Modifier.isStatic( field.getModifiers() ) )
- {
- return (String) field.get( null );
- }
- else
- {
- return null;
- }
- }
- catch( NoSuchFieldException e )
- {
- return null;
- }
- catch( IllegalArgumentException e )
- {
- final String error =
- "The component type ["
- + subject.getName()
- + "] declares an invalid static field
TYPE_COLLECTION_PREFERENCE declaration. "
- + "Could not convert the value to an string.";
- throw new IntrospectionException( error );
- }
- catch( Exception e )
- {
- final String error =
- "An unexpected error occured while resolving the static
TYPE_COLLECTION_PREFERENCE field on the type ["
- + subject.getName()
- + "].";
- throw new IntrospectionException( error );
- }
- }
-
- private String getConfigurationSchema( Class subject ) throws
IntrospectionException
- {
- try
- {
- Field field = subject.getDeclaredField(
"TYPE_CONFIGURATION_SCHEMA" );
- if( Modifier.isStatic( field.getModifiers() ) )
- {
- if( String.class.isAssignableFrom( field.getType() ) )
- {
- return (String) field.get( null );
- }
- else
- {
- final String error =
- "The component type ["
- + subject.getName()
- + "] declares an invalid static field
TYPE_CONFIGURATION_SCHEMA declaration. "
- + "The declared type is not assignable to a string.";
- throw new IntrospectionException( error );
- }
- }
- else
- {
- return null;
- }
- }
- catch( NoSuchFieldException e )
- {
- return null;
- }
- catch( IllegalArgumentException e )
- {
- final String error =
- "The component type ["
- + subject.getName()
- + "] declares an invalid static field
TYPE_CONFIGURATION_SCHEMA declaration. "
- + "Could not convert the value to an string.";
- throw new IntrospectionException( error );
- }
- catch( IntrospectionException e )
- {
- throw e;
- }
- catch( Exception e )
- {
- final String error =
- "An unexpected error occured while resolving the static
TYPE_CONFIGURATION_SCHEMA field on the type ["
- + subject.getName()
- + "].";
- throw new IntrospectionException( error );
- }
- }
-
- private Configuration createDefaultConfiguration( Class subject )
- {
- final String classname = subject.getName();
- final ClassLoader classloader = subject.getClassLoader();
- final String xdefaults = classname.replace( '.', '/' ) + ".xconfig";
- final InputStream input = classloader.getResourceAsStream( xdefaults
);
- if( null == input )
- {
- return null;
- }
- else
- {
- try
- {
- DefaultConfigurationBuilder builder = new
DefaultConfigurationBuilder();
- return builder.build( input );
- }
- catch( Exception e )
- {
- final String error =
- "An unexpected error occured while resolving the static
configuration ["
- + xdefaults
- + "].";
- throw new BuildException( error, e, getLocation() );
- }
- }
- }
-
- private Properties getTypeProperties( Class subject ) throws
IntrospectionException
- {
- try
- {
- Field field = subject.getDeclaredField( "TYPE_INFO_PROPERTIES" );
- if( Modifier.isStatic( field.getModifiers() ) )
- {
- if( Properties.class.isAssignableFrom( field.getType() ) )
- {
- return (Properties) field.get( null );
- }
- else
- {
- final String error =
- "The component type ["
- + subject.getName()
- + "] declares an invalid static field
TYPE_INFO_PROPERTIES declaration. "
- + "The declared type is not assignable to a
java.util.Properties value.";
- throw new IntrospectionException( error );
- }
- }
- else
- {
- return null;
- }
- }
- catch( NoSuchFieldException e )
- {
- return null;
- }
- catch( IllegalArgumentException e )
- {
- final String error =
- "The component type ["
- + subject.getName()
- + "] declares an invalid static field TYPE_INFO_PROPERTIES
declaration. "
- + "Could not convert the value to an instance of
java.util.Properties.";
- throw new IntrospectionException( error );
- }
- catch( IntrospectionException e )
- {
- throw e;
- }
- catch( Exception e )
- {
- final String error =
- "An unexpected error occured while resolving the static
TYPE_INFO_PROPERTIES field on the type ["
- + subject.getName()
- + "].";
- throw new IntrospectionException( error );
- }
- }
-
- private ServiceDescriptor[] createServiceDescriptors( Class subject )
- {
- ArrayList list = new ArrayList();
- Class[] interfaces = subject.getInterfaces();
- for( int i=0; i<interfaces.length; i++ )
- {
- Class service = interfaces[i];
- ServiceDescriptor descriptor = createServiceDescriptor( subject,
service );
- if( null != descriptor )
- {
- list.add( descriptor );
- }
- }
- return (ServiceDescriptor[]) list.toArray( new ServiceDescriptor[0]
);
- }
-
- public ServiceDescriptor createServiceDescriptor( Class type, Class
subject )
- {
- String classname = subject.getName();
- Class parent = subject.getDeclaringClass();
- if( classname.startsWith( "java." ) )
- {
- return null; // ignore java.* interfaces
- }
- else if( classname.startsWith( "net.dpml.activity." ) )
- {
- return null;
- }
- else if( type == parent )
- {
- return null; // ignore immediate inner interfaces
- }
- else
- {
- return new ServiceDescriptor( classname );
- }
- }
-
- private PartDescriptor[] createPartDescriptors( Class subject )
- throws IntrospectionException
- {
- String classname = subject.getName();
- Class[] classes = subject.getClasses();
- Class parts = locateClass( "$Parts", classes );
- if( null == parts )
- {
- return new PartDescriptor[0];
- }
- else
- {
- //
- // Based on the method declarations in the parts inner class
- // we collect a list of the unique keys where each key
represents a
- // unique part.
- //
-
- Method[] methods = parts.getMethods();
- ArrayList list = new ArrayList();
- for( int i=0; i<methods.length; i++ )
- {
- Method method = methods[i];
- String key = PartDescriptor.getPartKey( method );
- if( false == list.contains( key ) )
- {
- list.add( key );
- }
- }
-
- String[] keys = (String[]) list.toArray( new String[0] );
- PartDescriptor[] descriptors = new PartDescriptor[ keys.length ];
- for( int i=0; i<keys.length; i++ )
- {
- String key = keys[i];
- Operation[] operations = getOperations( key, methods );
- PartDescriptor descriptor = new PartDescriptor( key,
operations );
- descriptors[i] = descriptor;
- }
-
- return descriptors;
- }
- }
-
- private Operation[] getOperations( String key, Method[] methods ) throws
IntrospectionException
- {
- ArrayList list = new ArrayList();
- for( int i=0; i<methods.length; i++ )
- {
- Method method = methods[i];
- if( key.equals( PartDescriptor.getPartKey( method ) ) )
- {
- Operation operation = getOperation( key, method );
- list.add( operation );
- }
- }
- return (Operation[]) list.toArray( new Operation[0] );
- }
-
- private Operation getOperation( String key, Method method ) throws
IntrospectionException
- {
- final String name = method.getName();
- final int semantic = PartDescriptor.getPartSemantic( method );
- if( semantic == PartDescriptor.GET )
- {
- validateNoExceptions( method );
- Class returnType = method.getReturnType();
- validateNonNullReturnType( method );
- validateNonArrayReturnType( method, returnType );
- String type = returnType.getName();
- String postfix = PartDescriptor.getPartPostfix( method );
- if( PartDescriptor.COMPONENT_KEY.equals( postfix ) )
- {
- validateNonNullReturnType( method );
- validateAtMostOneParameter( method );
- }
- else if( PartDescriptor.MODEL_KEY.equals( postfix ) )
- {
- validateNonNullReturnType( method );
- validateNoParameters( method );
- }
- else
- {
- validateSelectPattern( method );
- }
- return new Operation( PartDescriptor.GET, postfix, type );
- }
- else if( semantic == PartDescriptor.RELEASE )
- {
- validateNoExceptions( method );
- Class param = validateSingleParameter( method );
- validateNonArrayParameter( method, param );
- validateNonNullParameter( method, param );
- Class returnType = method.getReturnType();
- validateNullReturnType( method, returnType );
- String classname = param.getName();
- return new Operation( PartDescriptor.RELEASE, classname );
- }
- else
- {
- final String error =
- "Unrecognized part accessor method signature ["
- + name
- + "] for the parts key ["
- + key
- + "].";
- throw new IllegalArgumentException( error );
- }
- }
-
- private ContextDescriptor createContextDescriptor( Class subject )
throws IntrospectionException
- {
- Class[] classes = subject.getClasses();
- Class param = locateClass( "$Context", classes );
- if( null == param )
- {
- return new ContextDescriptor( null, new EntryDescriptor[0] );
- }
- else
- {
- EntryDescriptor[] entries = createEntryDescriptors( subject );
- String classname = param.getName();
- return new ContextDescriptor( classname, entries );
- }
- }
-
- private EntryDescriptor[] createEntryDescriptors( Class subject )
- throws IntrospectionException
- {
- String classname = subject.getName();
- Class[] classes = subject.getClasses();
- Class param = locateClass( "$Context", classes );
- if( null == param )
- {
- return new EntryDescriptor[0];
- }
- else
- {
- //
- // For each method in the Context inner-interface we construct a
- // descriptor that establishes the part key, type, and required
status.
- //
-
- Method[] methods = param.getMethods();
- ArrayList list = new ArrayList();
- for( int i=0; i<methods.length; i++ )
- {
- Method method = methods[i];
- String name = method.getName();
- if( name.startsWith( "get" ) )
- {
- EntryDescriptor descriptor = createEntryDescriptor(
method );
- list.add( descriptor );
- }
- }
- return (EntryDescriptor[]) list.toArray( new EntryDescriptor[0]
);
- }
- }
-
- /**
- * Creation of a new parameter descriptor using a supplied method.
- * The method is the method used by the component implementation to get
the parameter
- * instance.
- */
- private EntryDescriptor createEntryDescriptor( Method method )
- throws IntrospectionException
- {
- validateMethodName( method );
- validateNoExceptions( method );
-
- String key = EntryDescriptor.getEntryKey( method );
-
- Class returnType = method.getReturnType();
- if( method.getParameterTypes().length == 0 )
- {
- //
- // required context entry
- //
-
- validateNonNullReturnType( method );
- validateNonArrayReturnType( method, returnType );
- String type = returnType.getName();
- return new EntryDescriptor( key, type, EntryDescriptor.REQUIRED
);
- }
- else if( method.getParameterTypes().length == 1 )
- {
- Class[] params = method.getParameterTypes();
- Class param = params[0];
- if( returnType.isAssignableFrom( param ) )
- {
- String type = param.getName();
- return new EntryDescriptor( key, type,
EntryDescriptor.OPTIONAL );
- }
- else
- {
- final String error =
- "Context entry assessor declares an optional default
parameter class ["
- + param.getName()
- + "] which is not assignable to the return type ["
- + returnType.getName()
- + "]";
- throw new IntrospectionException( error );
- }
- }
- else
- {
- final String error =
- "Unable to establish a required or optional context entry
method pattern on the method ["
- + method.getName()
- + "]";
- throw new IntrospectionException( error );
- }
- }
-
- private String formatKey( String key, int offset )
- {
- String k = key.substring( offset );
- return formatKey( k );
- }
-
- private String formatKey( String key )
- {
- if( key.length() < 1 )
- {
- throw new IllegalArgumentException( "key" );
- }
- String first = key.substring( 0, 1 ).toLowerCase();
- String remainder = key.substring( 1 );
- return first + remainder;
- }
-
- private Class locateClass( String postfix, Class[] classes )
- {
- for( int i=0; i<classes.length; i++ )
- {
- Class inner = classes[i];
- String name = inner.getName();
- if( name.endsWith( postfix ) )
- {
- return inner;
- }
- }
- return null;
- }
-
- private void validateMapReturnType( Method method )
- throws IntrospectionException
- {
- Class returnType = method.getReturnType();
- if( Map.class != returnType )
- {
- String name = method.getName();
- final String error =
- "The method ["
- + name
- + "] does not declare java.util.Map as a return type.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateEntryReturnType( Method method )
- throws IntrospectionException
- {
- Class returnType = method.getReturnType();
- if( Map.Entry.class != returnType )
- {
- String name = method.getName();
- final String error =
- "The method ["
- + name
- + "] does not declare java.util.Map.Entry as a return type.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateReturnTypeIsAssignable( Method method, Class type )
- throws IntrospectionException
- {
- Class c = method.getReturnType();
- if( false == type.isAssignableFrom( c ) )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] declares a return type ["
- + c.getName()
- + "] that is not assignable from the class ["
- + type.getName()
- + "].";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateNonNullParameter( Method method, Class type )
- throws IntrospectionException
- {
- if( Void.TYPE.equals( type ) )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] declares a null parameter.";
- throw new IntrospectionException( error );
- }
- }
-
-
- private void validateNonNullReturnType( Method method )
- throws IntrospectionException
- {
- Class returnType = method.getReturnType();
- if( Void.TYPE.equals( returnType ) )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] does not declare a return type.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateNullReturnType( Method method, Class returnType )
- throws IntrospectionException
- {
- if( false == Void.TYPE.equals( returnType ) )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] does not declare a null return type.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateNonArrayReturnType( Method method, Class returnType
)
- throws IntrospectionException
- {
- if( null != returnType.getComponentType() )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] declares an array return type.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateNonArrayType( Method method, Class type )
- throws IntrospectionException
- {
- if( null != type.getComponentType() )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] declares an array type.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateInterfaceReturnType( Method method, Class
returnType )
- throws IntrospectionException
- {
- if( returnType.isInterface() == false )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] declares a return type ["
- + returnType.getName()
- + "] that is not an interface.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateMethodName( Method method )
- throws IntrospectionException
- {
- if( method.getName().startsWith( "get" ) == false )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] does not start with 'get'.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateNoExceptions( Method method )
- throws IntrospectionException
- {
- Class[] exceptionTypes = method.getExceptionTypes();
- if( exceptionTypes.length > 0 )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] declares one or more exceptions.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateNoParameters( Method method )
- throws IntrospectionException
- {
- Class[] parameterTypes = method.getParameterTypes();
- if( parameterTypes.length > 0 )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] declares one or more parameters.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateAtMostOneParameter( Method method )
- throws IntrospectionException
- {
- Class[] parameterTypes = method.getParameterTypes();
- if( parameterTypes.length > 1 )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] declares more than one parameters.";
- throw new IntrospectionException( error );
- }
- }
-
- private Class validateSingleParameter( Method method )
- throws IntrospectionException
- {
- Class[] parameterTypes = method.getParameterTypes();
- if( parameterTypes.length != 1 )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] does not declare a single parameter argument type.";
- throw new IntrospectionException( error );
- }
- return parameterTypes[0];
- }
-
-
- private void validateNonArrayParameter( Method method, Class type )
- throws IntrospectionException
- {
- if( null != type.getComponentType() )
- {
- final String error =
- "Method ["
- + method.getName()
- + "] declares an array parameter type.";
- throw new IntrospectionException( error );
- }
- }
-
- private void validateSelectPattern( Method method )
- throws IntrospectionException
- {
- Class[] parameterTypes = method.getParameterTypes();
- int n = parameterTypes.length;
- if( n == 2 )
- {
- Class b = parameterTypes[1];
- if( false == Boolean.TYPE.isAssignableFrom( b ) )
- {
- String name = method.getName();
- final String error =
- "Second parameter in the select method ["
- + name
- + "] is not assignable to a boolean.";
- throw new IntrospectionException( error );
- }
- }
- }
-
- private Class loadSubjectClass( ClassLoader classloader )
- {
- if( null == m_classname )
- {
- final String error =
- "Missing component descriptor class attribute.";
- throw new IllegalStateException( error );
- }
- try
- {
- return classloader.loadClass( m_classname );
- }
- catch( ClassNotFoundException e )
- {
- final String error =
- "Cannot build a component type because the class ["
- + m_classname
- + "] is not present in the project path.";
- throw new BuildException( error );
- }
- }
-
- private static URI TYPE_HANDLER_URI = setupURI( "@TYPE-HANDLER-URI@" );
- private static URI TYPE_BUILDER_URI = setupURI( "@TYPE-BUILDER-URI@" );
-
- protected static URI setupURI( String spec )
- {
- try
- {
- return new URI( spec );
- }
- catch( URISyntaxException ioe )
- {
- return null;
- }
- }
-}
+/*
+ * Copyright (c) 2005 Stephen J. McConnell
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.composition.builder;
+
+import java.beans.IntrospectionException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.Properties;
+
+import net.dpml.composition.info.CategoryDescriptor;
+import net.dpml.composition.info.ContextDescriptor;
+import net.dpml.composition.info.DependencyDescriptor;
+import net.dpml.composition.info.EntryDescriptor;
+import net.dpml.composition.info.InfoDescriptor;
+import net.dpml.composition.info.PartDescriptor;
+import net.dpml.composition.info.ServiceDescriptor;
+import net.dpml.composition.info.Type;
+import net.dpml.composition.info.PartDescriptor.Operation;
+import net.dpml.configuration.Configuration;
+import net.dpml.configuration.impl.DefaultConfigurationBuilder;
+import net.dpml.magic.tasks.ProjectTask;
+
+import org.apache.tools.ant.BuildException;
+
+/**
+ * The TypeTask creates a serialized descriptor of a component type.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
+ */
+public class TypeBuilderTask extends ProjectTask implements TypeBuilder
+{
+ //---------------------------------------------------------------
+ // state
+ //---------------------------------------------------------------
+
+ private String m_name;
+ private String m_classname;
+ private Class m_class;
+
+ //---------------------------------------------------------------
+ // setters
+ //---------------------------------------------------------------
+
+ public void setName( String name )
+ {
+ m_name = name;
+ }
+
+ public void setClass( String classname )
+ {
+ m_classname = classname;
+ }
+
+ //---------------------------------------------------------------
+ // Builder
+ //---------------------------------------------------------------
+
+ /**
+ * Return a urn identitifying the component type strategy that this
+ * builder is supporting.
+ *
+ * @return a uri identifiying the type strategy
+ */
+ public URI getTypeHandlerURI()
+ {
+ return TYPE_HANDLER_URI;
+ }
+
+ /**
+ * Return a uri identitifying the builder.
+ *
+ * @return a uri identifiying the type builder
+ */
+ public URI getBuilderURI()
+ {
+ return TYPE_BUILDER_URI;
+ }
+
+ //---------------------------------------------------------------
+ // TypeBuilder
+ //---------------------------------------------------------------
+
+ public Type buildType( ClassLoader classloader )
+ throws IntrospectionException, IOException
+ {
+ Class subject = loadSubjectClass( classloader );
+ return buildType( subject );
+ }
+
+ public Type buildType( Class subject )
+ throws IntrospectionException, IOException
+ {
+ log( "creating: " + subject.getName() );
+ InfoDescriptor info = createInfoDescriptor( subject );
+ ServiceDescriptor[] services = createServiceDescriptors( subject );
+ DependencyDescriptor[] dependencies = new DependencyDescriptor[0];
// legacy
+ CategoryDescriptor[] categories = new CategoryDescriptor[0];
+ ContextDescriptor context = createContextDescriptor( subject );
+ PartDescriptor[] parts = createPartDescriptors( subject );
+ Configuration config = createDefaultConfiguration( subject );
+ return new Type( info, categories, context, services, dependencies,
config, parts );
+ }
+
+ //---------------------------------------------------------------
+ // Task
+ //---------------------------------------------------------------
+
+ public void execute()
+ {
+ final String error =
+ "The type builder task does not support standalone operation. "
+ + "Please use the 'types' task instead.";
+ throw new UnsupportedOperationException( error );
+ }
+
+ //---------------------------------------------------------------
+ // internals
+ //---------------------------------------------------------------
+
+ protected String getName()
+ {
+ if( null == m_name )
+ {
+ return "untitled";
+ }
+ return m_name;
+ }
+
+ protected String getClassname()
+ {
+ if( null == m_classname )
+ {
+ final String error =
+ "Component type does not declare a classname.";
+ throw new BuildException( error, getLocation() );
+ }
+ return m_classname;
+ }
+
+ private InfoDescriptor createInfoDescriptor( Class subject ) throws
IntrospectionException
+ {
+ String name = getName();
+ String classname = subject.getName();
+ boolean threadsafe = getThreadSafeCapability( subject );
+ String lifestyle = getLifestylePreference( subject, threadsafe );
+ String collection = getCollectionPolicyPreference( subject );
+ String schema = getConfigurationSchema( subject );
+ Properties properties = getTypeProperties( subject );
+ return new InfoDescriptor(
+ name, classname, null, lifestyle, collection, schema, threadsafe,
properties );
+ }
+
+ private boolean getThreadSafeCapability( Class subject ) throws
IntrospectionException
+ {
+ try
+ {
+ Field field = subject.getDeclaredField(
"TYPE_THREADSAFE_CAPABLE" );
+ if( Modifier.isStatic( field.getModifiers() ) )
+ {
+ return field.getBoolean( null );
+ }
+ else
+ {
+ return false;
+ }
+ }
+ catch( NoSuchFieldException e )
+ {
+ return false;
+ }
+ catch( IllegalArgumentException e )
+ {
+ final String error =
+ "The component type ["
+ + subject.getName()
+ + "] declares an invalid static field TYPE_THREADSAFE_POLICY
declaration. "
+ + "Could not convert the value to a boolean.";
+ throw new IntrospectionException( error );
+ }
+ catch( Exception e )
+ {
+ final String error =
+ "An unexpected error occured while resolving the static
TYPE_THREADSAFE_POLICY field on the type ["
+ + subject.getName()
+ + "].";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private String getLifestylePreference( Class subject, boolean threadsafe
) throws IntrospectionException
+ {
+ try
+ {
+ Field field = subject.getDeclaredField(
"TYPE_LIFESTYLE_PREFERENCE" );
+ if( Modifier.isStatic( field.getModifiers() ) )
+ {
+ return (String) field.get( null );
+ }
+ else
+ {
+ if( threadsafe )
+ {
+ return InfoDescriptor.SINGLETON;
+ }
+ else
+ {
+ return InfoDescriptor.TRANSIENT;
+ }
+ }
+ }
+ catch( NoSuchFieldException e )
+ {
+ if( threadsafe )
+ {
+ return InfoDescriptor.SINGLETON;
+ }
+ else
+ {
+ return InfoDescriptor.TRANSIENT;
+ }
+ }
+ catch( IllegalArgumentException e )
+ {
+ final String error =
+ "The component type ["
+ + subject.getName()
+ + "] declares an invalid static field
TYPE_LIFESTYLE_PREFERENCE declaration. "
+ + "Could not convert the value to an string.";
+ throw new IntrospectionException( error );
+ }
+ catch( Exception e )
+ {
+ final String error =
+ "An unexpected error occured while resolving the static
TYPE_LIFESTYLE_PREFERENCE field on the type ["
+ + subject.getName()
+ + "].";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private String getCollectionPolicyPreference( Class subject ) throws
IntrospectionException
+ {
+ try
+ {
+ Field field = subject.getDeclaredField(
"TYPE_COLLECTION_PREFERENCE" );
+ if( Modifier.isStatic( field.getModifiers() ) )
+ {
+ return (String) field.get( null );
+ }
+ else
+ {
+ return null;
+ }
+ }
+ catch( NoSuchFieldException e )
+ {
+ return null;
+ }
+ catch( IllegalArgumentException e )
+ {
+ final String error =
+ "The component type ["
+ + subject.getName()
+ + "] declares an invalid static field
TYPE_COLLECTION_PREFERENCE declaration. "
+ + "Could not convert the value to an string.";
+ throw new IntrospectionException( error );
+ }
+ catch( Exception e )
+ {
+ final String error =
+ "An unexpected error occured while resolving the static
TYPE_COLLECTION_PREFERENCE field on the type ["
+ + subject.getName()
+ + "].";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private String getConfigurationSchema( Class subject ) throws
IntrospectionException
+ {
+ try
+ {
+ Field field = subject.getDeclaredField(
"TYPE_CONFIGURATION_SCHEMA" );
+ if( Modifier.isStatic( field.getModifiers() ) )
+ {
+ if( String.class.isAssignableFrom( field.getType() ) )
+ {
+ return (String) field.get( null );
+ }
+ else
+ {
+ final String error =
+ "The component type ["
+ + subject.getName()
+ + "] declares an invalid static field
TYPE_CONFIGURATION_SCHEMA declaration. "
+ + "The declared type is not assignable to a string.";
+ throw new IntrospectionException( error );
+ }
+ }
+ else
+ {
+ return null;
+ }
+ }
+ catch( NoSuchFieldException e )
+ {
+ return null;
+ }
+ catch( IllegalArgumentException e )
+ {
+ final String error =
+ "The component type ["
+ + subject.getName()
+ + "] declares an invalid static field
TYPE_CONFIGURATION_SCHEMA declaration. "
+ + "Could not convert the value to an string.";
+ throw new IntrospectionException( error );
+ }
+ catch( IntrospectionException e )
+ {
+ throw e;
+ }
+ catch( Exception e )
+ {
+ final String error =
+ "An unexpected error occured while resolving the static
TYPE_CONFIGURATION_SCHEMA field on the type ["
+ + subject.getName()
+ + "].";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private Configuration createDefaultConfiguration( Class subject )
+ {
+ final String classname = subject.getName();
+ final ClassLoader classloader = subject.getClassLoader();
+ final String xdefaults = classname.replace( '.', '/' ) + ".xconfig";
+ final InputStream input = classloader.getResourceAsStream( xdefaults
);
+ if( null == input )
+ {
+ return null;
+ }
+ else
+ {
+ try
+ {
+ DefaultConfigurationBuilder builder = new
DefaultConfigurationBuilder();
+ return builder.build( input );
+ }
+ catch( Exception e )
+ {
+ final String error =
+ "An unexpected error occured while resolving the static
configuration ["
+ + xdefaults
+ + "].";
+ throw new BuildException( error, e, getLocation() );
+ }
+ }
+ }
+
+ private Properties getTypeProperties( Class subject ) throws
IntrospectionException
+ {
+ try
+ {
+ Field field = subject.getDeclaredField( "TYPE_INFO_PROPERTIES" );
+ if( Modifier.isStatic( field.getModifiers() ) )
+ {
+ if( Properties.class.isAssignableFrom( field.getType() ) )
+ {
+ return (Properties) field.get( null );
+ }
+ else
+ {
+ final String error =
+ "The component type ["
+ + subject.getName()
+ + "] declares an invalid static field
TYPE_INFO_PROPERTIES declaration. "
+ + "The declared type is not assignable to a
java.util.Properties value.";
+ throw new IntrospectionException( error );
+ }
+ }
+ else
+ {
+ return null;
+ }
+ }
+ catch( NoSuchFieldException e )
+ {
+ return null;
+ }
+ catch( IllegalArgumentException e )
+ {
+ final String error =
+ "The component type ["
+ + subject.getName()
+ + "] declares an invalid static field TYPE_INFO_PROPERTIES
declaration. "
+ + "Could not convert the value to an instance of
java.util.Properties.";
+ throw new IntrospectionException( error );
+ }
+ catch( IntrospectionException e )
+ {
+ throw e;
+ }
+ catch( Exception e )
+ {
+ final String error =
+ "An unexpected error occured while resolving the static
TYPE_INFO_PROPERTIES field on the type ["
+ + subject.getName()
+ + "].";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private ServiceDescriptor[] createServiceDescriptors( Class subject )
+ {
+ ArrayList list = new ArrayList();
+ Class[] interfaces = subject.getInterfaces();
+ for( int i=0; i<interfaces.length; i++ )
+ {
+ Class service = interfaces[i];
+ ServiceDescriptor descriptor = createServiceDescriptor( subject,
service );
+ if( null != descriptor )
+ {
+ list.add( descriptor );
+ }
+ }
+ return (ServiceDescriptor[]) list.toArray( new ServiceDescriptor[0]
);
+ }
+
+ public ServiceDescriptor createServiceDescriptor( Class type, Class
subject )
+ {
+ String classname = subject.getName();
+ Class parent = subject.getDeclaringClass();
+ if( classname.startsWith( "java." ) )
+ {
+ return null; // ignore java.* interfaces
+ }
+ else if( classname.startsWith( "net.dpml.activity." ) )
+ {
+ return null;
+ }
+ else if( type == parent )
+ {
+ return null; // ignore immediate inner interfaces
+ }
+ else
+ {
+ return new ServiceDescriptor( classname );
+ }
+ }
+
+ private PartDescriptor[] createPartDescriptors( Class subject )
+ throws IntrospectionException
+ {
+ String classname = subject.getName();
+ Class[] classes = subject.getClasses();
+ Class parts = locateClass( "$Parts", classes );
+ if( null == parts )
+ {
+ return new PartDescriptor[0];
+ }
+ else
+ {
+ //
+ // Based on the method declarations in the parts inner class
+ // we collect a list of the unique keys where each key
represents a
+ // unique part.
+ //
+
+ Method[] methods = parts.getMethods();
+ ArrayList list = new ArrayList();
+ for( int i=0; i<methods.length; i++ )
+ {
+ Method method = methods[i];
+ String key = PartDescriptor.getPartKey( method );
+ if( false == list.contains( key ) )
+ {
+ list.add( key );
+ }
+ }
+
+ String[] keys = (String[]) list.toArray( new String[0] );
+ PartDescriptor[] descriptors = new PartDescriptor[ keys.length ];
+ for( int i=0; i<keys.length; i++ )
+ {
+ String key = keys[i];
+ Operation[] operations = getOperations( key, methods );
+ PartDescriptor descriptor = new PartDescriptor( key,
operations );
+ descriptors[i] = descriptor;
+ }
+
+ return descriptors;
+ }
+ }
+
+ private Operation[] getOperations( String key, Method[] methods ) throws
IntrospectionException
+ {
+ ArrayList list = new ArrayList();
+ for( int i=0; i<methods.length; i++ )
+ {
+ Method method = methods[i];
+ if( key.equals( PartDescriptor.getPartKey( method ) ) )
+ {
+ Operation operation = getOperation( key, method );
+ list.add( operation );
+ }
+ }
+ return (Operation[]) list.toArray( new Operation[0] );
+ }
+
+ private Operation getOperation( String key, Method method ) throws
IntrospectionException
+ {
+ final String name = method.getName();
+ final int semantic = PartDescriptor.getPartSemantic( method );
+ if( semantic == PartDescriptor.GET )
+ {
+ validateNoExceptions( method );
+ Class returnType = method.getReturnType();
+ validateNonNullReturnType( method );
+ validateNonArrayReturnType( method, returnType );
+ String type = returnType.getName();
+ String postfix = PartDescriptor.getPartPostfix( method );
+ if( PartDescriptor.COMPONENT_KEY.equals( postfix ) )
+ {
+ validateNonNullReturnType( method );
+ validateAtMostOneParameter( method );
+ }
+ else if( PartDescriptor.MODEL_KEY.equals( postfix ) )
+ {
+ validateNonNullReturnType( method );
+ validateNoParameters( method );
+ }
+ else
+ {
+ validateSelectPattern( method );
+ }
+ return new Operation( PartDescriptor.GET, postfix, type );
+ }
+ else if( semantic == PartDescriptor.RELEASE )
+ {
+ validateNoExceptions( method );
+ Class param = validateSingleParameter( method );
+ validateNonArrayParameter( method, param );
+ validateNonNullParameter( method, param );
+ Class returnType = method.getReturnType();
+ validateNullReturnType( method, returnType );
+ String classname = param.getName();
+ return new Operation( PartDescriptor.RELEASE, classname );
+ }
+ else
+ {
+ final String error =
+ "Unrecognized part accessor method signature ["
+ + name
+ + "] for the parts key ["
+ + key
+ + "].";
+ throw new IllegalArgumentException( error );
+ }
+ }
+
+ private ContextDescriptor createContextDescriptor( Class subject )
throws IntrospectionException
+ {
+ Class[] classes = subject.getClasses();
+ Class param = locateClass( "$Context", classes );
+ if( null == param )
+ {
+ return new ContextDescriptor( null, new EntryDescriptor[0] );
+ }
+ else
+ {
+ EntryDescriptor[] entries = createEntryDescriptors( subject );
+ String classname = param.getName();
+ return new ContextDescriptor( classname, entries );
+ }
+ }
+
+ private EntryDescriptor[] createEntryDescriptors( Class subject )
+ throws IntrospectionException
+ {
+ String classname = subject.getName();
+ Class[] classes = subject.getClasses();
+ Class param = locateClass( "$Context", classes );
+ if( null == param )
+ {
+ return new EntryDescriptor[0];
+ }
+ else
+ {
+ //
+ // For each method in the Context inner-interface we construct a
+ // descriptor that establishes the part key, type, and required
status.
+ //
+
+ Method[] methods = param.getMethods();
+ ArrayList list = new ArrayList();
+ for( int i=0; i<methods.length; i++ )
+ {
+ Method method = methods[i];
+ String name = method.getName();
+ if( name.startsWith( "get" ) )
+ {
+ EntryDescriptor descriptor = createEntryDescriptor(
method );
+ list.add( descriptor );
+ }
+ }
+ return (EntryDescriptor[]) list.toArray( new EntryDescriptor[0]
);
+ }
+ }
+
+ /**
+ * Creation of a new parameter descriptor using a supplied method.
+ * The method is the method used by the component implementation to get
the parameter
+ * instance.
+ */
+ private EntryDescriptor createEntryDescriptor( Method method )
+ throws IntrospectionException
+ {
+ validateMethodName( method );
+ validateNoExceptions( method );
+
+ String key = EntryDescriptor.getEntryKey( method );
+
+ Class returnType = method.getReturnType();
+ if( method.getParameterTypes().length == 0 )
+ {
+ //
+ // required context entry
+ //
+
+ validateNonNullReturnType( method );
+ validateNonArrayReturnType( method, returnType );
+ String type = returnType.getName();
+ return new EntryDescriptor( key, type, EntryDescriptor.REQUIRED
);
+ }
+ else if( method.getParameterTypes().length == 1 )
+ {
+ Class[] params = method.getParameterTypes();
+ Class param = params[0];
+ if( returnType.isAssignableFrom( param ) )
+ {
+ String type = param.getName();
+ return new EntryDescriptor( key, type,
EntryDescriptor.OPTIONAL );
+ }
+ else
+ {
+ final String error =
+ "Context entry assessor declares an optional default
parameter class ["
+ + param.getName()
+ + "] which is not assignable to the return type ["
+ + returnType.getName()
+ + "]";
+ throw new IntrospectionException( error );
+ }
+ }
+ else
+ {
+ final String error =
+ "Unable to establish a required or optional context entry
method pattern on the method ["
+ + method.getName()
+ + "]";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private String formatKey( String key, int offset )
+ {
+ String k = key.substring( offset );
+ return formatKey( k );
+ }
+
+ private String formatKey( String key )
+ {
+ if( key.length() < 1 )
+ {
+ throw new IllegalArgumentException( "key" );
+ }
+ String first = key.substring( 0, 1 ).toLowerCase();
+ String remainder = key.substring( 1 );
+ return first + remainder;
+ }
+
+ private Class locateClass( String postfix, Class[] classes )
+ {
+ for( int i=0; i<classes.length; i++ )
+ {
+ Class inner = classes[i];
+ String name = inner.getName();
+ if( name.endsWith( postfix ) )
+ {
+ return inner;
+ }
+ }
+ return null;
+ }
+
+ private void validateMapReturnType( Method method )
+ throws IntrospectionException
+ {
+ Class returnType = method.getReturnType();
+ if( Map.class != returnType )
+ {
+ String name = method.getName();
+ final String error =
+ "The method ["
+ + name
+ + "] does not declare java.util.Map as a return type.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateEntryReturnType( Method method )
+ throws IntrospectionException
+ {
+ Class returnType = method.getReturnType();
+ if( Map.Entry.class != returnType )
+ {
+ String name = method.getName();
+ final String error =
+ "The method ["
+ + name
+ + "] does not declare java.util.Map.Entry as a return type.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateReturnTypeIsAssignable( Method method, Class type )
+ throws IntrospectionException
+ {
+ Class c = method.getReturnType();
+ if( false == type.isAssignableFrom( c ) )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] declares a return type ["
+ + c.getName()
+ + "] that is not assignable from the class ["
+ + type.getName()
+ + "].";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateNonNullParameter( Method method, Class type )
+ throws IntrospectionException
+ {
+ if( Void.TYPE.equals( type ) )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] declares a null parameter.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+
+ private void validateNonNullReturnType( Method method )
+ throws IntrospectionException
+ {
+ Class returnType = method.getReturnType();
+ if( Void.TYPE.equals( returnType ) )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] does not declare a return type.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateNullReturnType( Method method, Class returnType )
+ throws IntrospectionException
+ {
+ if( false == Void.TYPE.equals( returnType ) )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] does not declare a null return type.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateNonArrayReturnType( Method method, Class returnType
)
+ throws IntrospectionException
+ {
+ if( null != returnType.getComponentType() )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] declares an array return type.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateNonArrayType( Method method, Class type )
+ throws IntrospectionException
+ {
+ if( null != type.getComponentType() )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] declares an array type.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateInterfaceReturnType( Method method, Class
returnType )
+ throws IntrospectionException
+ {
+ if( returnType.isInterface() == false )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] declares a return type ["
+ + returnType.getName()
+ + "] that is not an interface.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateMethodName( Method method )
+ throws IntrospectionException
+ {
+ if( method.getName().startsWith( "get" ) == false )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] does not start with 'get'.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateNoExceptions( Method method )
+ throws IntrospectionException
+ {
+ Class[] exceptionTypes = method.getExceptionTypes();
+ if( exceptionTypes.length > 0 )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] declares one or more exceptions.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateNoParameters( Method method )
+ throws IntrospectionException
+ {
+ Class[] parameterTypes = method.getParameterTypes();
+ if( parameterTypes.length > 0 )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] declares one or more parameters.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateAtMostOneParameter( Method method )
+ throws IntrospectionException
+ {
+ Class[] parameterTypes = method.getParameterTypes();
+ if( parameterTypes.length > 1 )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] declares more than one parameters.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private Class validateSingleParameter( Method method )
+ throws IntrospectionException
+ {
+ Class[] parameterTypes = method.getParameterTypes();
+ if( parameterTypes.length != 1 )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] does not declare a single parameter argument type.";
+ throw new IntrospectionException( error );
+ }
+ return parameterTypes[0];
+ }
+
+
+ private void validateNonArrayParameter( Method method, Class type )
+ throws IntrospectionException
+ {
+ if( null != type.getComponentType() )
+ {
+ final String error =
+ "Method ["
+ + method.getName()
+ + "] declares an array parameter type.";
+ throw new IntrospectionException( error );
+ }
+ }
+
+ private void validateSelectPattern( Method method )
+ throws IntrospectionException
+ {
+ Class[] parameterTypes = method.getParameterTypes();
+ int n = parameterTypes.length;
+ if( n == 2 )
+ {
+ Class b = parameterTypes[1];
+ if( false == Boolean.TYPE.isAssignableFrom( b ) )
+ {
+ String name = method.getName();
+ final String error =
+ "Second parameter in the select method ["
+ + name
+ + "] is not assignable to a boolean.";
+ throw new IntrospectionException( error );
+ }
+ }
+ }
+
+ private Class loadSubjectClass( ClassLoader classloader )
+ {
+ if( null == m_classname )
+ {
+ final String error =
+ "Missing component descriptor class attribute.";
+ throw new IllegalStateException( error );
+ }
+ try
+ {
+ return classloader.loadClass( m_classname );
+ }
+ catch( ClassNotFoundException e )
+ {
+ final String error =
+ "Cannot build a component type because the class ["
+ + m_classname
+ + "] is not present in the project path.";
+ throw new BuildException( error );
+ }
+ }
+
+ private static URI TYPE_HANDLER_URI = setupURI( "@TYPE-HANDLER-URI@" );
+ private static URI TYPE_BUILDER_URI = setupURI( "@TYPE-BUILDER-URI@" );
+
+ protected static URI setupURI( String spec )
+ {
+ try
+ {
+ return new URI( spec );
+ }
+ catch( URISyntaxException ioe )
+ {
+ return null;
+ }
+ }
+}

Modified:
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/ComponentProfile.java
==============================================================================
---
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/ComponentProfile.java
(original)
+++
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/ComponentProfile.java
Sat Jun 11 03:37:38 2005
@@ -48,7 +48,7 @@
may be serviced by components declared in parent container.
--&gt;</i></font>

-&lt;component name="<font color="darkred">complex</font>" class="<font
color="darkred">org.apache.avalon.playground.ComplexComponent</font>"
activation="<font color="darkred">startup</font>"&gt;
+&lt;component name="<font color="darkred">complex</font>" class="<font
color="darkred">net.dpml.playground.ComplexComponent</font>"
activation="<font color="darkred">startup</font>"&gt;

<font color="gray"><i>&lt;!--
Priority and target assignments for component specific logging categrories.
@@ -66,13 +66,13 @@
container. The following two context directives for "location" and "home"
demonstrate
programatics creation of context values. The first entry declares that
the context
value to be assigned to the key "location" shall be the String value
"Paris". The second
- context enty assignes the container's context value for "urn:avalon:home"
to the component's
+ context enty assignes the container's context value for "urn:metro:home"
to the component's
context key of "home".
--&gt;</i></font>

&lt;context&gt;
&lt;entry key="<font color="darkred">location</font>"&gt;<font
color="darkred">Paris</font>&lt;/entry&gt;
- &lt;include name="<font color="darkred">urn:avalon:home</font>"
key="<font color="darkred">home</font>"/&gt;
+ &lt;include name="<font color="darkred">urn:metro:home</font>"
key="<font color="darkred">home</font>"/&gt;
&lt;/context&gt;

<font color="gray"><i>&lt;!--

Modified:
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/ContextDirective.java
==============================================================================
---
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/ContextDirective.java
(original)
+++
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/ContextDirective.java
Sat Jun 11 03:37:38 2005
@@ -32,7 +32,7 @@
* <pre>
* &lt;context class="<font color="darkred">MyContextClass</font>"&gt;
* &lt;entry key="<font color="darkred">special</font>"&gt;
- * &lt;import key="<font
color="darkred">urn:avalon:classloader</font>"/&gt;
+ * &lt;import key="<font
color="darkred">urn:metro:classloader</font>"/&gt;
* &lt;/entry&gt;
* &lt;entry key="<font color="darkred">xxx</font>"&gt;
* &lt;param class="<font color="darkred">MySpecialClass</font>"&gt;

Modified:
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/FilesetDirective.java
==============================================================================
---
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/FilesetDirective.java
(original)
+++
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/data/FilesetDirective.java
Sat Jun 11 03:37:38 2005
@@ -28,7 +28,6 @@
* <p><b>XML</b></p>
* <pre>
* &lt;fileset dir="<font color="darkred">lib</font>"&gt;
- * &lt;include name="<font
color="darkred">avalon-framework.jar</font>"/&gt;
* &lt;include name="<font color="darkred">logkit.jar</font>"/&gt;
* &lt;exclude name="<font color="darkred">servlet.jar</font>"/&gt;
* &lt;/dirset&gt;
@@ -206,7 +205,7 @@
* context.</p>
* <pre>
* <font color="gray">&lt;fileset dir="lib"&gt;</font>
- * &lt;exclude name="<font
color="darkred">avalon-framework.jar</font>" /&gt;
+ * &lt;exclude name="<font color="darkred">servlet.jar</font>"/&gt;
* <font color="gray">&lt;/fileset&gt;</font>
* </pre>
*
@@ -285,7 +284,7 @@
* context.</p>
* <pre>
* <font color="gray">&lt;fileset dir="lib"&gt;</font>
- * &lt;include name="<font
color="darkred">avalon-framework.jar</font>" /&gt;
+ * &lt;include name="<font color="darkred">servlet.jar</font>"/&gt;
* <font color="gray">&lt;/fileset&gt;</font>
* </pre>
*

Modified:
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/info/CategoryDescriptor.java
==============================================================================
---
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/info/CategoryDescriptor.java
(original)
+++
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/info/CategoryDescriptor.java
Sat Jun 11 03:37:38 2005
@@ -22,7 +22,7 @@
import java.util.Properties;

/**
- * A descriptor describing an Avalon Logger
+ * A descriptor describing a Logger
* child instances that the component will create using the
* <code>net.dpml.logging.Logger#getChildLogger</code>
* method. The name of each category is relative to the component. For

Modified:
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/info/InfoDescriptor.java
==============================================================================
---
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/info/InfoDescriptor.java
(original)
+++
qa/main/2450fork-rc/metro/composition/part/src/main/net/dpml/composition/info/InfoDescriptor.java
Sat Jun 11 03:37:38 2005
@@ -108,12 +108,6 @@
private final int m_collection;

/**
- * Flag indicating if this is a native metro descriptor or avalon
descriptor.
- * TODO: change this to a versioned service protocol spec
- */
- private final boolean m_native;
-
- /**
* Flag indicating if the type is threadsafe.
*/
private final boolean m_threadsafe;
@@ -133,7 +127,7 @@
public InfoDescriptor( final String name, final String classname )
throws IllegalArgumentException, NullPointerException
{
- this( name, classname, null, null, null, null, false, true, null );
+ this( name, classname, null, null, null, null, false, null );
}

/**
@@ -147,7 +141,6 @@
* @param collection the garbage collection policy for the component
* @param threadsafe if TRUE the type is declaring itself as threadsafe
* @param schema the configuration schema
- * @param flag native metro flag
* @param attributes a set of attributes associated with the component
type
* @exception IllegalArgumentException if the implementation key is not
a classname
* @exception NullArgumentException if the classname argument is null.
@@ -160,13 +153,11 @@
final String collection,
final String schema,
final boolean threadsafe,
- final boolean flag,
final Properties attributes )
throws IllegalArgumentException, NullPointerException
{
super( attributes );

- m_native = flag;
m_threadsafe = threadsafe;

if ( null == classname )
@@ -373,16 +364,6 @@
}

/**
- * Ruturn TRUE is this is a native descriptor else FALSE.
- *
- * @return the native status
- */
- public boolean isNative()
- {
- return m_native;
- }
-
- /**
* Return a string representation of the info descriptor.
* @return the stringified type
*/
@@ -402,7 +383,6 @@
if (isEqual)
{
InfoDescriptor info = (InfoDescriptor)other;
- isEqual = isEqual && m_native == info.m_native;
isEqual = isEqual && m_threadsafe == info.m_threadsafe;
isEqual = isEqual && m_classname.equals( info.m_classname );
isEqual = isEqual && ( m_collection == info.m_collection );
@@ -430,14 +410,6 @@
{
int hash = super.hashCode();

- if( m_native )
- {
- hash = hash + 818972391;
- }
- else
- {
- hash = hash - 293741397;
- }
if( m_threadsafe )
{
hash = hash + 383972391;

Modified:
qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/ContextDescriptorTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/ContextDescriptorTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/ContextDescriptorTestCase.java
Sat Jun 11 03:37:38 2005
@@ -94,7 +94,7 @@

public void setUp()
{
- m_classname = "org.apache.avalon.playground.MyContext";
+ m_classname = "net.dpml.playground.MyContext";
m_entries = new EntryDescriptor[]{
new EntryDescriptor( "key", String.class.getName() )
};

Modified:
qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/InfoDescriptorTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/InfoDescriptorTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/InfoDescriptorTestCase.java
Sat Jun 11 03:37:38 2005
@@ -37,7 +37,6 @@
private final String m_lifestyle = InfoDescriptor.SINGLETON;
private final String m_collection = InfoDescriptor.WEAK;
private final String m_schema = "schema";
- private final boolean m_native = true;
private final boolean m_threadsafe = false;

public InfoDescriptorTestCase ( String name )
@@ -48,7 +47,7 @@
protected Descriptor getDescriptor()
{
return new InfoDescriptor(
- m_name, m_classname, m_version, m_lifestyle, m_collection,
m_schema, m_threadsafe, m_native, getProperties());
+ m_name, m_classname, m_version, m_lifestyle, m_collection,
m_schema, m_threadsafe, getProperties());
}

protected void checkDescriptor( Descriptor desc )
@@ -69,7 +68,7 @@
try
{
new InfoDescriptor(
- m_name, null, m_version, m_lifestyle, m_collection, m_schema,
m_threadsafe, m_native, getProperties() );
+ m_name, null, m_version, m_lifestyle, m_collection, m_schema,
m_threadsafe, getProperties() );
fail("Did not throw the proper NullPointerException");
}
catch( NullPointerException npe )
@@ -81,7 +80,7 @@
{
new InfoDescriptor(
m_name, "foo/fake/ClassName", m_version, m_lifestyle,
m_collection,
- m_schema, m_threadsafe, m_native, getProperties());
+ m_schema, m_threadsafe, getProperties());
fail("Did not throw the proper IllegalArgumentException");
}
catch( IllegalArgumentException iae )
@@ -93,19 +92,19 @@
{
new InfoDescriptor(
m_name, m_classname, m_version, InfoDescriptor.SINGLETON,
m_collection,
- m_schema, m_threadsafe, m_native, getProperties() );
+ m_schema, m_threadsafe, getProperties() );
new InfoDescriptor(
m_name, m_classname, m_version, InfoDescriptor.THREAD,
m_collection,
- m_schema, m_threadsafe, m_native, getProperties() );
+ m_schema, m_threadsafe, getProperties() );
new InfoDescriptor(
m_name, m_classname, m_version, InfoDescriptor.TRANSIENT,
m_collection,
- m_schema, m_threadsafe, m_native, getProperties() );
+ m_schema, m_threadsafe, getProperties() );

// All these should pass.

new InfoDescriptor(
m_name, m_classname, m_version, "Fake Lifestyle", m_collection,
- m_schema, m_threadsafe, m_native, getProperties() );
+ m_schema, m_threadsafe, getProperties() );

fail( "Did not throw the proper IllegalArgumentException" );
}

Modified:
qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/TypeTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/TypeTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/composition/part/src/test/net/dpml/composition/info/test/TypeTestCase.java
Sat Jun 11 03:37:38 2005
@@ -154,6 +154,6 @@

private static InfoDescriptor createSimpleInfo( String classname )
{
- return new InfoDescriptor( null, classname, null, null, null, null,
false, true, null );
+ return new InfoDescriptor( null, classname, null, null, null, null,
false, null );
}
}

Modified:
qa/main/2450fork-rc/metro/configuration/api/src/main/net/dpml/configuration/Configuration.java
==============================================================================
---
qa/main/2450fork-rc/metro/configuration/api/src/main/net/dpml/configuration/Configuration.java
(original)
+++
qa/main/2450fork-rc/metro/configuration/api/src/main/net/dpml/configuration/Configuration.java
Sat Jun 11 03:37:38 2005
@@ -91,7 +91,7 @@
* <code>true</code></td></tr>
* <tr align="center"><td align="left">
* <code>conf.{@link #getChild getChild}("widget").{@link #getLocation
getLocation}()</code>
- * </td><td
colspan="2">file:///home/jeff/tmp/java/avalon/src/java/new.xconf:4:60</td></tr>
+ * </td><td
colspan="2">file:///home/jeff/tmp/java/dpml/src/java/new.xconf:4:60</td></tr>
* <tr align="center"><td align="left">
* <code>conf.{@link #getChild getChild}("desc").{@link #getName
getName}()</code>
* </td><td>desc (see {@link #getChild(String)})</td><td>desc</td></tr>

Modified:
qa/main/2450fork-rc/metro/configuration/api/src/main/net/dpml/configuration/package.html
==============================================================================
---
qa/main/2450fork-rc/metro/configuration/api/src/main/net/dpml/configuration/package.html
(original)
+++
qa/main/2450fork-rc/metro/configuration/api/src/main/net/dpml/configuration/package.html
Sat Jun 11 03:37:38 2005
@@ -1,7 +1,7 @@
<body bgcolor="white">
Component configuration interfaces and XML-based implementations.
<br><br>
- <p>The <code>org.apache.avalon.framework.configuration</code> package
contains primarily:</p>
+ <p>The <code>net.dpml.configuration</code> package contains
primarily:</p>
<ul>
<li>The <a href="Configurable.html">Configurable</a> interface, which
a Component implements
if it needs to be configured with externally-specified data before it
is initialized.

Modified:
qa/main/2450fork-rc/metro/configuration/impl/src/main/net/dpml/configuration/impl/package.html
==============================================================================
---
qa/main/2450fork-rc/metro/configuration/impl/src/main/net/dpml/configuration/impl/package.html
(original)
+++
qa/main/2450fork-rc/metro/configuration/impl/src/main/net/dpml/configuration/impl/package.html
Sat Jun 11 03:37:38 2005
@@ -1,7 +1,7 @@
<body bgcolor="white">
Component configuration interfaces and XML-based implementations.
<br><br>
- <p>The <code>org.apache.avalon.framework.configuration</code> package
contains primarily:</p>
+ <p>The <code>net.dpml.configuration</code> package contains
primarily:</p>
<ul>
<li>The <a href="Configurable.html">Configurable</a> interface, which
a Component implements
if it needs to be configured with externally-specified data before it
is initialized.

Modified:
qa/main/2450fork-rc/metro/context/api/src/main/net/dpml/context/Context.java
==============================================================================
---
qa/main/2450fork-rc/metro/context/api/src/main/net/dpml/context/Context.java
(original)
+++
qa/main/2450fork-rc/metro/context/api/src/main/net/dpml/context/Context.java
Sat Jun 11 03:37:38 2005
@@ -25,7 +25,7 @@
* <p>
* <i><b>Note:</b> In the text below there are several requirements that a
* component may set up for a container. It is understood that a container
- * does not have to satisfy those requirements in order to be
Avalon-compliant.
+ * does not have to satisfy those requirements in order to be compliant.
* If a component says "I require X to run" a container may reply with "I
don't
* have any X, so I'm not running you". The requirements here are the maximum
* that a component may ask for, not the minimum a container must deliver.
@@ -94,14 +94,14 @@
* </p>
*
* <p>
- * Standard Avalon context entries, their keys, types and and
- * associated semantics are defined under the framework standard
+ * Standard context entries, their keys, types and and
+ * associated semantics are defined under the standard
* attributes table.
* </p>
*
* <p>
* See: <a href="package-summary.html#attributes">
- * Avalon Standard Context Entries Specification</a>
+ * Standard Context Entries Specification</a>
* </p>
*
* <h4>Examples, where the data is specified in a sample XML format:</h4>
@@ -112,13 +112,13 @@
* When a component specifies:
* </p>
*
- * <pre><code> &lt;entry key="avalon:work"
type="java.io.File"/&gt;</code></pre>
+ * <pre><code> &lt;entry key="urn:metro:work"
type="java.io.File"/&gt;</code></pre>
*
* <p>
* It should be able to do:
* </p>
*
- * <pre><code> File workDirectory = (File) context.get( "avalon:work"
);</code></pre>
+ * <pre><code> File workDirectory = (File) context.get(
"urn:metro:work" );</code></pre>
*
* <p>
* in order to obtain the value.
@@ -130,7 +130,7 @@
* When a component specifies:
* </p>
*
- * <pre><code> &lt;entry alias="work" key="avalon:work"
type="java.io.File"/&gt;</code></pre>
+ * <pre><code> &lt;entry alias="work" key="urn:metro:work"
type="java.io.File"/&gt;</code></pre>
*
* <p>
* It should be able to do:
@@ -140,7 +140,7 @@
* </li>
* </ol>
*
- * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
* @version $Id$
*/
public interface Context

Modified: qa/main/2450fork-rc/metro/index.xml
==============================================================================
--- qa/main/2450fork-rc/metro/index.xml (original)
+++ qa/main/2450fork-rc/metro/index.xml Sat Jun 11 03:37:38 2005
@@ -772,29 +772,6 @@
</dependencies>
</project>

- <project basedir="classic/activation/providers/avalon">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-activation-avalon-provider</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-classic-api" tag="api"/>
- <include key="avalon-framework-api" tag="api"/>
- <include key="dpml-activation-api" tag="api"/>
- <include key="dpml-system-api" tag="spi"/>
- <include key="dpml-classic-spi" tag="spi"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-util-defaults"/>
- <include key="dpml-context-impl"/>
- <include key="dpml-parameters-impl"/>
- <include key="avalon-framework-impl"/>
- </dependencies>
- </project>
-
<project basedir="classic/activation/impl">
<info>
<group>dpml/metro/private</group>
@@ -810,7 +787,6 @@
<include key="dpml-classic-api" tag="api"/>
<include key="dpml-parts-api" tag="api"/>
<include key="dpml-activation-metro-provider" build="false"/>
- <include key="dpml-activation-avalon-provider" build="false"/>
<include key="dpml-system-impl" build="false"/>
</dependencies>
</project>
@@ -1051,22 +1027,6 @@

<resource>
<info>
- <group>avalon-framework</group>
- <name>avalon-framework-api</name>
- <version>4.2.0</version>
- </info>
- </resource>
-
- <resource>
- <info>
- <group>avalon-framework</group>
- <name>avalon-framework-impl</name>
- <version>4.2.0</version>
- </info>
- </resource>
-
- <resource>
- <info>
<name>xercesImpl</name>
<version>2.6.2</version>
<group>xerces</group>

Modified:
qa/main/2450fork-rc/metro/logging/providers/log4j/impl/build.properties
==============================================================================
--- qa/main/2450fork-rc/metro/logging/providers/log4j/impl/build.properties
(original)
+++ qa/main/2450fork-rc/metro/logging/providers/log4j/impl/build.properties
Sat Jun 11 03:37:38 2005
@@ -1,2 +1 @@

-avalon.artifact.export = org.apache.avalon.logging.provider.LoggingManager

Modified:
qa/main/2450fork-rc/metro/logging/providers/log4j/test/etc/test/logging.properties
==============================================================================
---
qa/main/2450fork-rc/metro/logging/providers/log4j/test/etc/test/logging.properties
(original)
+++
qa/main/2450fork-rc/metro/logging/providers/log4j/test/etc/test/logging.properties
Sat Jun 11 03:37:38 2005
@@ -9,6 +9,6 @@
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

# Print only messages of level WARN or above in the package com.foo.
-log4j.logger.org.apache.avalon.logging=DEBUG
+log4j.logger.net.dpml.logging=DEBUG
log4j.logger.kernel.logger=WARN
log4j.logger.kernel.logger.test=DEBUG

Modified:
qa/main/2450fork-rc/metro/logging/providers/log4j/test/etc/test/logging.xml
==============================================================================
---
qa/main/2450fork-rc/metro/logging/providers/log4j/test/etc/test/logging.xml
(original)
+++
qa/main/2450fork-rc/metro/logging/providers/log4j/test/etc/test/logging.xml
Sat Jun 11 03:37:38 2005
@@ -18,7 +18,7 @@
</layout>
</appender>

- <category name="org.apache.avalon.logging">
+ <category name="net.dpml.logging">
<priority value="DEBUG"/>
</category>


Modified:
qa/main/2450fork-rc/metro/logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test/AlternateLoggingManagerTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test/AlternateLoggingManagerTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test/AlternateLoggingManagerTestCase.java
Sat Jun 11 03:37:38 2005
@@ -61,7 +61,7 @@
"Intentional Exception for TestCase.",
new LoggingException(
"This is not a problem.",
- new LoggingException( "It is used to test the Logging
framework." ) ) ) );
+ new LoggingException( "It is used to test the Logging system."
) ) ) );
logger.fatalError( "If the TestCase does not fail, everything is
OK." );
}


Modified:
qa/main/2450fork-rc/metro/logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test/DefaultLoggingManagerTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test/DefaultLoggingManagerTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test/DefaultLoggingManagerTestCase.java
Sat Jun 11 03:37:38 2005
@@ -73,7 +73,7 @@
"Intentional Exception for TestCase.",
new LoggingException(
"This is not a problem.",
- new LoggingException( "It is used to test the Logging
framework." ) ) ) );
+ new LoggingException( "It is used to test the Logging system."
) ) ) );
logger.fatalError( "If the TestCase does not fail, everything is
OK." );
}


Modified:
qa/main/2450fork-rc/metro/logging/providers/logkit/impl/build.properties
==============================================================================
--- qa/main/2450fork-rc/metro/logging/providers/logkit/impl/build.properties
(original)
+++ qa/main/2450fork-rc/metro/logging/providers/logkit/impl/build.properties
Sat Jun 11 03:37:38 2005
@@ -1,2 +1 @@

-avalon.artifact.export = org.apache.metro.logging.provider.LoggingManager

Modified:
qa/main/2450fork-rc/metro/logging/providers/logkit/impl/src/main/net/dpml/logging/logkit/util/package.html
==============================================================================
---
qa/main/2450fork-rc/metro/logging/providers/logkit/impl/src/main/net/dpml/logging/logkit/util/package.html
(original)
+++
qa/main/2450fork-rc/metro/logging/providers/logkit/impl/src/main/net/dpml/logging/logkit/util/package.html
Sat Jun 11 03:37:38 2005
@@ -1,3 +1,3 @@
<html><body>
-Utilities suppporting the logging framework.
+Utilities suppporting the logging system.
</body></html>

Modified:
qa/main/2450fork-rc/metro/logging/providers/logkit/test/src/test/net/dpml/logging/logkit/test/DefaultLoggingManagerTestCase.java
==============================================================================
---
qa/main/2450fork-rc/metro/logging/providers/logkit/test/src/test/net/dpml/logging/logkit/test/DefaultLoggingManagerTestCase.java
(original)
+++
qa/main/2450fork-rc/metro/logging/providers/logkit/test/src/test/net/dpml/logging/logkit/test/DefaultLoggingManagerTestCase.java
Sat Jun 11 03:37:38 2005
@@ -75,7 +75,7 @@
"Intentional Exception for TestCase.",
new LoggingException(
"This is not a problem.",
- new LoggingException( "It is used to test the Logging
framework." ) ) ) );
+ new LoggingException( "It is used to test the Logging system."
) ) ) );
logger.fatalError( "If the TestCase does not fail, everything is
OK." );
}


Modified:
qa/main/2450fork-rc/metro/logging/spi/src/main/net/dpml/logging/provider/LoggingManager.java
==============================================================================
---
qa/main/2450fork-rc/metro/logging/spi/src/main/net/dpml/logging/provider/LoggingManager.java
(original)
+++
qa/main/2450fork-rc/metro/logging/spi/src/main/net/dpml/logging/provider/LoggingManager.java
Sat Jun 11 03:37:38 2005
@@ -31,7 +31,7 @@
/**
* Standard context key for the logging manager.
*/
- String KEY = "urn:avalon:logging.manager";
+ String KEY = "urn:metro:logging.manager";

/**
* Add a set of category entries using the supplied categories
descriptor.

Modified: qa/main/2450fork-rc/metro/main/src/main/net/dpml/metro/Metro.java
==============================================================================
--- qa/main/2450fork-rc/metro/main/src/main/net/dpml/metro/Metro.java
(original)
+++ qa/main/2450fork-rc/metro/main/src/main/net/dpml/metro/Metro.java Sat
Jun 11 03:37:38 2005
@@ -245,22 +245,7 @@

private ClassLoader getRootClassLoader( CommandLine line ) throws
IOException
{
- if( line.hasOption( "Xavalon" ) )
- {
- getLogger().debug( "including avalon apis" );
-
- URL[] urls = new URL[]
- {
- new URL(
"artifact:jar:avalon-framework/avalon-framework-api#4.2.0" ),
- new
URL("artifact:jar:avalon/util/avalon-util-lifecycle#1.1.1" )
- };
-
- return new URLClassLoader( urls,
SystemContext.class.getClassLoader() );
- }
- else
- {
- return SystemContext.class.getClassLoader();
- }
+ return SystemContext.class.getClassLoader();
}

private boolean getServerMode( CommandLine line )
@@ -505,13 +490,6 @@
options.addOption(
new Option( "test", REZ.getString( "cli-test-description" ) ) );

- //
- // avalon switch
- //
-
- options.addOption(
- new Option( "Xavalon", REZ.getString( "cli-avalon-description" ) )
);
-
return options;
}


Modified:
qa/main/2450fork-rc/metro/main/src/main/net/dpml/metro/Resources.properties
==============================================================================
---
qa/main/2450fork-rc/metro/main/src/main/net/dpml/metro/Resources.properties
(original)
+++
qa/main/2450fork-rc/metro/main/src/main/net/dpml/metro/Resources.properties
Sat Jun 11 03:37:38 2005
@@ -13,5 +13,4 @@

cli-server-description=Run the controller as a server (default)
cli-execute-description=On completion of deployment initiate a shutdown.
-cli-avalon-description=Include Avalon compatability.
cli-test-description=Run with the freight-train engine.

Modified:
qa/main/2450fork-rc/metro/parameters/impl/src/main/net/dpml/parameters/impl/DefaultParameters.java
==============================================================================
---
qa/main/2450fork-rc/metro/parameters/impl/src/main/net/dpml/parameters/impl/DefaultParameters.java
(original)
+++
qa/main/2450fork-rc/metro/parameters/impl/src/main/net/dpml/parameters/impl/DefaultParameters.java
Sat Jun 11 03:37:38 2005
@@ -774,7 +774,7 @@
}

/**
- * Creates a <code>java.util.Properties</code> object from an Avalon
+ * Creates a <code>java.util.Properties</code> object from a
* Parameters object.
*
* @param params a <code>Parameters</code> instance



  • svn commit: r2824 - in qa/main/2450fork-rc/metro: . classic/activation/impl classic/activation/impl/etc/test classic/activation/impl/etc/test/system classic/activation/impl/src/main/net/dpml/activation/impl classic/activation/providers/avalon classic/activation/providers/metro/src/main/net/dpml/activation/metro classic/activation/test classic/activation/test/etc/test classic/composition/api/src/main/net/dpml/composition/data classic/composition/api/src/main/net/dpml/composition/model classic/composition/impl/src/main/net/dpml/composition/data/builder classic/composition/impl/src/main/net/dpml/composition/model/impl classic/composition/test classic/composition/test/etc/test classic/composition/test/src/test/net/dpml/composition/model/impl/test classic/meta/api/src/main/net/dpml/meta classic/meta/api/src/main/net/dpml/meta/info classic/meta/api/src/test/net/dpml/meta/info/test classic/meta/impl/src/main/net/dpml/meta/info/builder/impl classic/meta/impl/src/main/net/dpml/meta/info/impl classic/meta/impl/src/main/net/dpml/meta/info/writer/impl classic/meta/tools/src/main/net/dpml/meta/info/ant classic/meta/tools/src/main/net/dpml/meta/info/tags classic/meta/tools/src/test/net/dpml/meta/test classic/testing/includes classic/testing/includes/src/main/BLOCK-INF classic/testing/playground/src/main/net/dpml/test/playground classic/testing/playground/src/main/net/dpml/test/playground/basic classic/testing/testa/src/main/net/dpml/test/testa composition/builder/src/main/net/dpml/composition/builder composition/part/src/main/net/dpml/composition/data composition/part/src/main/net/dpml/composition/info composition/part/src/test/net/dpml/composition/info/test configuration/api/src/main/net/dpml/configuration configuration/impl/src/main/net/dpml/configuration/impl context/api/src/main/net/dpml/context logging/providers/log4j/impl logging/providers/log4j/test/etc/test logging/providers/log4j/test/src/test/net/dpml/logging/log4j/test logging/providers/logkit/impl logging/providers/logkit/impl/src/main/net/dpml/logging/logkit/util logging/providers/logkit/test/src/test/net/dpml/logging/logkit/test logging/spi/src/main/net/dpml/logging/provider main/src/main/net/dpml/metro parameters/impl/src/main/net/dpml/parameters/impl, niclas, 06/11/2005

Archive powered by MHonArc 2.6.24.

Top of Page