Skip to Content.
Sympa Menu

notify-dpml - r1199 - in trunk/main: central/src/docs/depot/cli central/src/docs/depot/library central/src/docs/depot/tools/listeners depot/library/etc/test/dpml metro metro/component metro/install metro/model metro/part metro/test/src/main/net/dpml/test metro/test/src/main/net/dpml/test/part metro/test/src/test/net/dpml metro/test/src/test/net/dpml/test metro/test/src/test/net/dpml/test/part

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1199 - in trunk/main: central/src/docs/depot/cli central/src/docs/depot/library central/src/docs/depot/tools/listeners depot/library/etc/test/dpml metro metro/component metro/install metro/model metro/part metro/test/src/main/net/dpml/test metro/test/src/main/net/dpml/test/part metro/test/src/test/net/dpml metro/test/src/test/net/dpml/test metro/test/src/test/net/dpml/test/part
  • Date: Fri, 17 Mar 2006 07:20:34 +0100

Author: mcconnell
Date: 2006-03-17 07:20:04 +0100 (Fri, 17 Mar 2006)
New Revision: 1199

Added:
trunk/main/metro/component/
trunk/main/metro/test/src/main/net/dpml/test/part/
trunk/main/metro/test/src/main/net/dpml/test/part/ColorManager.java
trunk/main/metro/test/src/main/net/dpml/test/part/ExampleComponent.java
trunk/main/metro/test/src/main/net/dpml/test/part/package.html
trunk/main/metro/test/src/test/net/dpml/test/
trunk/main/metro/test/src/test/net/dpml/test/part/
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java
Removed:
trunk/main/metro/part/api/
Modified:
trunk/main/central/src/docs/depot/cli/consumers.xml
trunk/main/central/src/docs/depot/cli/patterns.xml
trunk/main/central/src/docs/depot/library/dependencies.xml
trunk/main/central/src/docs/depot/library/projects.xml
trunk/main/central/src/docs/depot/library/properties.xml
trunk/main/central/src/docs/depot/library/types.xml
trunk/main/central/src/docs/depot/tools/listeners/plugin.xml
trunk/main/depot/library/etc/test/dpml/module.xml
trunk/main/metro/component/build.xml
trunk/main/metro/install/build.xml
trunk/main/metro/model/build.xml
trunk/main/metro/module.xml
Log:
complete package finalization

Modified: trunk/main/central/src/docs/depot/cli/consumers.xml
===================================================================
--- trunk/main/central/src/docs/depot/cli/consumers.xml 2006-03-17 04:47:47
UTC (rev 1198)
+++ trunk/main/central/src/docs/depot/cli/consumers.xml 2006-03-17 06:20:04
UTC (rev 1199)
@@ -31,7 +31,7 @@
<source>Selection: [14]

[1] project:dpml/metro/dpml-state-impl
- [2] project:dpml/metro/dpml-part-api
+ [2] project:dpml/metro/dpml-metro-component
[3] project:dpml/metro/dpml-metro-model
[4] project:dpml/metro/dpml-metro-runtime
[5] project:dpml/metro/dpml-metro-tools

Modified: trunk/main/central/src/docs/depot/cli/patterns.xml
===================================================================
--- trunk/main/central/src/docs/depot/cli/patterns.xml 2006-03-17 04:47:47
UTC (rev 1198)
+++ trunk/main/central/src/docs/depot/cli/patterns.xml 2006-03-17 06:20:04
UTC (rev 1199)
@@ -32,7 +32,7 @@

[1] project:dpml/metro/dpml-state-api
[2] project:dpml/metro/dpml-state-impl
- [3] project:dpml/metro/dpml-part-api
+ [3] project:dpml/metro/dpml-metro-component
[4] project:dpml/metro/dpml-metro-model
[5] project:dpml/metro/dpml-metro-runtime
[6] project:dpml/metro/dpml-metro-tools
@@ -190,7 +190,7 @@
project:dpml/util/dpml-parameters-api
project:dpml/util/dpml-configuration-api
resource:dpml/transit/dpml-transit-main
- project:dpml/metro/dpml-part-api
+ project:dpml/metro/dpml-metro-component
test providers: (12)
resource:ant/ant-launcher
resource:ant/ant-trax

Modified: trunk/main/central/src/docs/depot/library/dependencies.xml
===================================================================
--- trunk/main/central/src/docs/depot/library/dependencies.xml 2006-03-17
04:47:47 UTC (rev 1198)
+++ trunk/main/central/src/docs/depot/library/dependencies.xml 2006-03-17
06:20:04 UTC (rev 1199)
@@ -149,7 +149,7 @@
<include key="dpml-state-api"/>
<include ref="dpml/util/dpml-parameters-api"/>
<include ref="dpml/util/dpml-configuration-api"/>
- <include key="dpml-part-api"/>
+ <include key="dpml-metro-component"/>
</dependencies>
<dependencies scope="test">
<include ref="ant/ant-junit"/>

Modified: trunk/main/central/src/docs/depot/library/projects.xml
===================================================================
--- trunk/main/central/src/docs/depot/library/projects.xml 2006-03-17
04:47:47 UTC (rev 1198)
+++ trunk/main/central/src/docs/depot/library/projects.xml 2006-03-17
06:20:04 UTC (rev 1199)
@@ -129,7 +129,7 @@
<include ref="dpml/util/dpml-parameters-impl"/>
<include ref="dpml/util/dpml-configuration-impl"/>
<include key="dpml-state-impl"/>
- <include key="dpml-part-api" tag="protected"/>
+ <include key="dpml-metro-component" tag="protected"/>
<include key="dpml-metro-model" tag="protected"/>
</dependencies>
<dependencies scope="test">

Modified: trunk/main/central/src/docs/depot/library/properties.xml
===================================================================
--- trunk/main/central/src/docs/depot/library/properties.xml 2006-03-17
04:47:47 UTC (rev 1198)
+++ trunk/main/central/src/docs/depot/library/properties.xml 2006-03-17
06:20:04 UTC (rev 1199)
@@ -101,7 +101,7 @@
<include ref="dpml/util/dpml-parameters-impl"/>
<include ref="dpml/util/dpml-configuration-impl"/>
<include key="dpml-state-impl"/>
- <include key="dpml-part-api" tag="protected"/>
+ <include key="dpml-metro-component" tag="protected"/>
<include key="dpml-metro-model" tag="protected"/>
</dependencies>
</project>

Modified: trunk/main/central/src/docs/depot/library/types.xml
===================================================================
--- trunk/main/central/src/docs/depot/library/types.xml 2006-03-17 04:47:47
UTC (rev 1198)
+++ trunk/main/central/src/docs/depot/library/types.xml 2006-03-17 06:20:04
UTC (rev 1199)
@@ -101,7 +101,7 @@
<include ref="dpml/util/dpml-parameters-impl"/>
<include ref="dpml/util/dpml-configuration-impl"/>
<include key="dpml-state-impl"/>
- <include key="dpml-part-api" tag="protected"/>
+ <include key="dpml-metro-component" tag="protected"/>
<include key="dpml-metro-model" tag="protected"/>
</dependencies>
<dependencies scope="test">

Modified: trunk/main/central/src/docs/depot/tools/listeners/plugin.xml
===================================================================
--- trunk/main/central/src/docs/depot/tools/listeners/plugin.xml
2006-03-17 04:47:47 UTC (rev 1198)
+++ trunk/main/central/src/docs/depot/tools/listeners/plugin.xml
2006-03-17 06:20:04 UTC (rev 1199)
@@ -66,7 +66,7 @@
# SPI dependencies.
#
dpml.artifact.dependency.spi.0 =
artifact:jar:dpml/metro/dpml-composition-model#SNAPSHOT
-dpml.artifact.dependency.spi.1 =
artifact:jar:dpml/metro/dpml-part-api#SNAPSHOT
+dpml.artifact.dependency.spi.1 =
artifact:jar:dpml/metro/dpml-metro-component#SNAPSHOT

#
# Implementation dependencies.

Modified: trunk/main/depot/library/etc/test/dpml/module.xml
===================================================================
--- trunk/main/depot/library/etc/test/dpml/module.xml 2006-03-17 04:47:47
UTC (rev 1198)
+++ trunk/main/depot/library/etc/test/dpml/module.xml 2006-03-17 06:20:04
UTC (rev 1199)
@@ -138,7 +138,7 @@
</dependencies>
</project>

- <project name="dpml-part-api" basedir="part">
+ <project name="dpml-metro-component" basedir="part">
<properties>
<property name="project.template" value="${basedir}/builder.xml"/>
</properties>
@@ -166,7 +166,7 @@
<include ref="dpml/util/dpml-parameters-api" tag="public"/>
<include ref="dpml/util/dpml-configuration-api" tag="public"/>
<include key="dpml-state-api" tag="public"/>
- <include key="dpml-part-api" tag="public"/>
+ <include key="dpml-metro-component" tag="public"/>
</dependencies>
<dependencies scope="test">
<include ref="ant/ant-junit"/>

Copied: trunk/main/metro/component (from rev 1197, trunk/main/metro/part/api)

Modified: trunk/main/metro/component/build.xml
===================================================================
--- trunk/main/metro/part/api/build.xml 2006-03-17 04:37:47 UTC (rev 1197)
+++ trunk/main/metro/component/build.xml 2006-03-17 06:20:04 UTC (rev
1199)
@@ -17,7 +17,7 @@
limitations under the License.
-->

-<project name="dpml-part-api"
+<project name="dpml-metro-component"
xmlns:transit="antlib:net.dpml.transit"
xmlns:x="dpml:depot"
default="install">

Modified: trunk/main/metro/install/build.xml
===================================================================
--- trunk/main/metro/install/build.xml 2006-03-17 04:47:47 UTC (rev 1198)
+++ trunk/main/metro/install/build.xml 2006-03-17 06:20:04 UTC (rev 1199)
@@ -6,10 +6,10 @@
<transit:import uri="local:template:dpml/tools/standard"/>

<target name="init" depends="standard.init">
- <x:property name="part.name" feature="name" key="dpml-part-api"/>
- <x:property name="part.version" feature="version" key="dpml-part-api"/>
- <x:property name="part.group" feature="group" key="dpml-part-api"/>
- <x:property name="part.uri" feature="uri" type="plugin"
key="dpml-part-api"/>
+ <x:property name="part.name" feature="name" key="dpml-metro-component"/>
+ <x:property name="part.version" feature="version"
key="dpml-metro-component"/>
+ <x:property name="part.group" feature="group"
key="dpml-metro-component"/>
+ <x:property name="part.uri" feature="uri" type="plugin"
key="dpml-metro-component"/>
<filter token="PRODUCTION_URI" value="${part.uri}"/>
</target>


Modified: trunk/main/metro/model/build.xml
===================================================================
--- trunk/main/metro/model/build.xml 2006-03-17 04:47:47 UTC (rev 1198)
+++ trunk/main/metro/model/build.xml 2006-03-17 06:20:04 UTC (rev 1199)
@@ -17,7 +17,7 @@
limitations under the License.
-->

-<project name="dpml-part-api"
+<project name="dpml-metro-component"
xmlns:transit="antlib:net.dpml.transit"
xmlns:x="dpml:depot"
default="install">

Modified: trunk/main/metro/module.xml
===================================================================
--- trunk/main/metro/module.xml 2006-03-17 04:47:47 UTC (rev 1198)
+++ trunk/main/metro/module.xml 2006-03-17 06:20:04 UTC (rev 1199)
@@ -23,7 +23,7 @@
</dependencies>
</project>

- <project name="dpml-part-api" basedir="part/api">
+ <project name="dpml-metro-component" basedir="component">
<types>
<type id="jar"/>
</types>
@@ -36,7 +36,7 @@
</dependencies>
</project>

- <project name="dpml-part-content" basedir="content">
+ <project name="dpml-metro-content" basedir="content">
<types>
<type id="jar"/>
<part:plugin alias="true"
class="net.dpml.metro.content.PartContentHandler"/>
@@ -45,7 +45,7 @@
<include key="dpml-metro-runtime"/>
</dependencies>
<dependencies>
- <include key="dpml-part-api"/>
+ <include key="dpml-metro-component"/>
<include ref="dpml/util/dpml-logging-api"/>
</dependencies>
<dependencies scope="test">
@@ -61,7 +61,7 @@
<include key="dpml-state-api"/>
<include ref="dpml/util/dpml-parameters-api"/>
<include ref="dpml/util/dpml-configuration-api"/>
- <include key="dpml-part-api"/>
+ <include key="dpml-metro-component"/>
</dependencies>
<dependencies scope="test">
<include ref="ant/ant-junit"/>
@@ -95,7 +95,7 @@
<include ref="dpml/util/dpml-logging-api" tag="public"/>
<include ref="dpml/util/dpml-parameters-impl"/>
<include ref="dpml/util/dpml-configuration-impl"/>
- <include key="dpml-part-api" tag="protected"/>
+ <include key="dpml-metro-component" tag="protected"/>
<include key="dpml-metro-model" tag="protected"/>
<include key="dpml-state-impl"/>
<include key="dpml-metro-builder"/>
@@ -120,6 +120,9 @@
</project>

<project name="dpml-metro-test" basedir="test">
+ <properties>
+ <property name="project.test.fork" value="true"/>
+ </properties>
<types>
<type id="jar"/>
</types>
@@ -131,8 +134,8 @@
<include key="dpml-metro-tools"/>
</dependencies>
</project>
-
- <project name="dpml-metro-exec" basedir="exec">
+
+ <project name="dpml-metro-exec" basedir="exec">
<types>
<type id="jar"/>
<part:plugin class="net.dpml.metro.exec.ApplicationHandler"/>
@@ -145,7 +148,7 @@
<include ref="dpml/util/dpml-configuration-api"/>
<include ref="dpml/util/dpml-configuration-impl"/>
<include ref="dpml/transit/dpml-transit-main"/>
- <include ref="dpml/metro/dpml-part-api"/>
+ <include ref="dpml/metro/dpml-metro-component"/>
<include ref="dpml/metro/dpml-station-api"/>
<include ref="dpml/metro/dpml-metro-model"/>
</dependencies>
@@ -157,7 +160,7 @@
</types>
<dependencies>
<include ref="dpml/transit/dpml-transit-main"/>
- <include ref="dpml/metro/dpml-part-api"/>
+ <include ref="dpml/metro/dpml-metro-component"/>
</dependencies>
<dependencies scope="test">
<include ref="junit/junit"/>
@@ -185,7 +188,7 @@
<part:plugin class="net.dpml.station.server.StationServerPlugin"/>
</types>
<dependencies>
- <include ref="dpml/metro/dpml-part-api" tag="public"/>
+ <include ref="dpml/metro/dpml-metro-component" tag="public"/>
<include key="dpml-station-api" tag="public"/>
<include ref="dpml/transit/dpml-transit-main" tag="public"/>
<include ref="dpml/metro/dpml-station-builder" tag="protected"/>

Added: trunk/main/metro/test/src/main/net/dpml/test/part/ColorManager.java
===================================================================
--- trunk/main/metro/test/src/main/net/dpml/test/part/ColorManager.java
2006-03-17 04:47:47 UTC (rev 1198)
+++ trunk/main/metro/test/src/main/net/dpml/test/part/ColorManager.java
2006-03-17 06:20:04 UTC (rev 1199)
@@ -0,0 +1,36 @@
+/*
+ * Copyright 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.test.part;
+
+import java.awt.Color;
+
+/**
+ * Minimal interface using in testing the component handler.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface ColorManager
+{
+ /**
+ * Return a color.
+ * @return the color
+ */
+ Color getColor();
+}

Added: trunk/main/metro/test/src/main/net/dpml/test/part/ExampleComponent.java
===================================================================
--- trunk/main/metro/test/src/main/net/dpml/test/part/ExampleComponent.java
2006-03-17 04:47:47 UTC (rev 1198)
+++ trunk/main/metro/test/src/main/net/dpml/test/part/ExampleComponent.java
2006-03-17 06:20:04 UTC (rev 1199)
@@ -0,0 +1,107 @@
+/*
+ * Copyright 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.test.part;
+
+import java.awt.Color;
+
+import net.dpml.logging.Logger;
+
+/**
+ * Component implementation that demonstrates the use of a context
inner-class.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public class ExampleComponent implements ColorManager
+{
+ //------------------------------------------------------------------
+ // concerns
+ //------------------------------------------------------------------
+
+ /**
+ * Component driven context criteria specification.
+ */
+ public interface Context
+ {
+ /**
+ * Return a non-optional color value.
+ * @return the color
+ */
+ Color getColor();
+ }
+
+ //------------------------------------------------------------------
+ // state
+ //------------------------------------------------------------------
+
+ /**
+ * The logging channel.
+ */
+ private final Logger m_logger;
+
+ /**
+ * The assigned context instance.
+ */
+ private final Context m_context;
+
+ //------------------------------------------------------------------
+ // constructor
+ //------------------------------------------------------------------
+
+ /**
+ * Creation of a new <tt>ExampleComponent</tt> using a supplied
+ * logging channel and context.
+ *
+ * @param logger the assigned logging channel
+ * @param context the assigned context
+ */
+ public ExampleComponent( final Logger logger, final Context context )
+ {
+ m_context = context;
+ m_logger = logger;
+
+ getLogger().debug( "example component created" );
+ }
+
+ //------------------------------------------------------------------
+ // Example
+ //------------------------------------------------------------------
+
+ /**
+ * Return the color value from the supplied context.
+ * @return the color value
+ */
+ public Color getColor()
+ {
+ return m_context.getColor();
+ }
+
+ //------------------------------------------------------------------
+ // internal
+ //------------------------------------------------------------------
+
+ /**
+ * Return the assigned logging channel.
+ * @return the logging channel
+ */
+ private Logger getLogger()
+ {
+ return m_logger;
+ }
+}

Added: trunk/main/metro/test/src/main/net/dpml/test/part/package.html
===================================================================
--- trunk/main/metro/test/src/main/net/dpml/test/part/package.html
2006-03-17 04:47:47 UTC (rev 1198)
+++ trunk/main/metro/test/src/main/net/dpml/test/part/package.html
2006-03-17 06:20:04 UTC (rev 1199)
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+Component used in part tests.
+</p>
+</body>
+

Added:
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java
2006-03-17 04:47:47 UTC (rev 1198)
+++
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java
2006-03-17 06:20:04 UTC (rev 1199)
@@ -0,0 +1,98 @@
+/*
+ * Copyright 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.test.part;
+
+import java.io.File;
+import java.net.URI;
+import java.util.logging.Logger;
+
+import junit.framework.TestCase;
+
+import net.dpml.component.Directive;
+import net.dpml.component.Controller;
+import net.dpml.component.InitialContext;
+
+import net.dpml.transit.DefaultTransitModel;
+import net.dpml.transit.Transit;
+
+/**
+ * Testcase validating part loading from a uri.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public class PartLoadingTestCase extends TestCase
+{
+ private URI m_uri;
+
+ /**
+ * Testcase setup.
+ * @exception Exception if a setup error occurs
+ */
+ public void setUp() throws Exception
+ {
+ final String path = "test.part";
+ final File test = new File( System.getProperty( "project.test.dir" )
);
+ m_uri = new File( test, path ).toURI();
+ final File config = new File( test, "logging.properties" );
+ final String spec = config.toURI().toASCIIString();
+ }
+
+ /**
+ * Test part loading via a controller.
+ * @exception Exception if an error occurs
+ */
+ public void testPartLoading() throws Exception
+ {
+ Logger.global.info( "commencing test." );
+
+ // initialize transit
+
+ DefaultTransitModel model = DefaultTransitModel.getDefaultModel();
+ Transit.getInstance( model );
+
+ // initialize the controller
+
+ InitialContext context = new InitialContext();
+ Controller controller = InitialContext.createController( context );
+
+ // do stuff
+
+ Directive directive = controller.loadDirective( m_uri );
+ String classname = directive.getClass().getName();
+ assertEquals( "directive-classname",
"net.dpml.metro.data.ComponentDirective", classname );
+
+ // shutdown controller and transit
+
+ context.dispose();
+ model.dispose();
+
+ Logger.global.info( "test complete." );
+ }
+
+ static
+ {
+ System.setProperty(
+ "java.util.logging.config.class",
+ "net.dpml.transit.util.ConfigurationHandler" );
+ System.setProperty(
+ "dpml.logging.config",
+ "file:" + System.getProperty( "project.test.dir" ) +
"/logging.properties" );
+ }
+}




  • r1199 - in trunk/main: central/src/docs/depot/cli central/src/docs/depot/library central/src/docs/depot/tools/listeners depot/library/etc/test/dpml metro metro/component metro/install metro/model metro/part metro/test/src/main/net/dpml/test metro/test/src/main/net/dpml/test/part metro/test/src/test/net/dpml metro/test/src/test/net/dpml/test metro/test/src/test/net/dpml/test/part, mcconnell at BerliOS, 03/17/2006

Archive powered by MHonArc 2.6.24.

Top of Page