notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1302 - in trunk/main: central/src/docs/about/download metro metro/builder metro/runtime/src/main/net/dpml/metro/runtime metro/test/src/test/net/dpml/test/part planet/http transit/core/src/main/net/dpml/part transit/core/src/main/net/dpml/transit
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1302 - in trunk/main: central/src/docs/about/download metro metro/builder metro/runtime/src/main/net/dpml/metro/runtime metro/test/src/test/net/dpml/test/part planet/http transit/core/src/main/net/dpml/part transit/core/src/main/net/dpml/transit
- Date: Fri, 31 Mar 2006 06:36:03 +0200
Author: mcconnell
Date: 2006-03-31 06:35:55 +0200 (Fri, 31 Mar 2006)
New Revision: 1302
Modified:
trunk/main/central/src/docs/about/download/archive.xml
trunk/main/metro/builder/build.xml
trunk/main/metro/module.xml
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java
trunk/main/planet/http/module.xml
trunk/main/transit/core/src/main/net/dpml/part/PartDecoder.java
trunk/main/transit/core/src/main/net/dpml/part/PartStrategyDecoder.java
trunk/main/transit/core/src/main/net/dpml/part/PartStrategyEncoder.java
trunk/main/transit/core/src/main/net/dpml/part/ValueEncoder.java
trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
Log:
Resolve bug in part strategy encoding of supplementary parameters. Add link
to the component builder as the dpml-component xsi handler. Implementation of
part handler functionality into the Metro controller.
Modified: trunk/main/central/src/docs/about/download/archive.xml
===================================================================
--- trunk/main/central/src/docs/about/download/archive.xml 2006-03-30
17:33:40 UTC (rev 1301)
+++ trunk/main/central/src/docs/about/download/archive.xml 2006-03-31
04:35:55 UTC (rev 1302)
@@ -25,6 +25,9 @@
<ul>
<li>Documentation improvements.</li>
+ <li>Resolve bug in part strategy encoding of supplimentary
parameters.</li>
+ <li>Add link to the component builder as the dpml-component xsi
handler.</li>
+ <li>Implementation of part handler functionlity into the Metro
controller.</li>
</ul>
<table>
Modified: trunk/main/metro/builder/build.xml
===================================================================
--- trunk/main/metro/builder/build.xml 2006-03-30 17:33:40 UTC (rev 1301)
+++ trunk/main/metro/builder/build.xml 2006-03-31 04:35:55 UTC (rev 1302)
@@ -32,6 +32,12 @@
<x:filter token="BUILDER-URI" type="part" feature="uri"/>
</target>
+ <target name="install" depends="standard.install">
+ <x:property feature="uri" type="part" name="builder.uri"/>
+ <mkdir dir="${dpml.cache}/dpml/lang/parts"/>
+ <echo file="${dpml.cache}/dpml/lang/parts/dpml-component.part.link"
message="${builder.uri}"/>
+ </target>
+
</project>
Modified: trunk/main/metro/module.xml
===================================================================
--- trunk/main/metro/module.xml 2006-03-30 17:33:40 UTC (rev 1301)
+++ trunk/main/metro/module.xml 2006-03-31 04:35:55 UTC (rev 1302)
@@ -90,7 +90,9 @@
<project name="dpml-metro-runtime" basedir="runtime">
<types>
<type id="jar"/>
- <part:plugin alias="true"
class="net.dpml.metro.runtime.CompositionController"/>
+ <part:plugin alias="true"
class="net.dpml.metro.runtime.CompositionController">
+ <part:param class="net.dpml.component.InitialContext"/>
+ </part:plugin>
</types>
<dependencies>
<include ref="dpml/util/dpml-logging-api" tag="public"/>
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
2006-03-30 17:33:40 UTC (rev 1301)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
2006-03-31 04:35:55 UTC (rev 1302)
@@ -259,7 +259,9 @@
+ "] at position " + i
+ " for the component ["
+ handler.getPath()
- + "].";
+ + "] ("
+ + subject.getName()
+ + ").";
throw new ControllerException( error );
}
}
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
2006-03-30 17:33:40 UTC (rev 1301)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
2006-03-31 04:35:55 UTC (rev 1302)
@@ -157,7 +157,8 @@
ComponentDirective directive = (ComponentDirective) data;
ComponentModel model = m_controller.createComponentModel(
classpath, directive );
ClassLoader classloader = getClassLoader( anchor, classpath );
- return m_controller.createDefaultComponentHandler( classloader,
model, true );
+ Component component =
m_controller.createDefaultComponentHandler( classloader, model, true );
+ return component.getProvider().getValue( true );
}
else
{
Modified:
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-30 17:33:40 UTC (rev 1301)
+++
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java
2006-03-31 04:35:55 UTC (rev 1302)
@@ -50,8 +50,6 @@
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();
}
/**
Modified: trunk/main/planet/http/module.xml
===================================================================
--- trunk/main/planet/http/module.xml 2006-03-30 17:33:40 UTC (rev 1301)
+++ trunk/main/planet/http/module.xml 2006-03-31 04:35:55 UTC (rev 1302)
@@ -50,6 +50,7 @@
<include key="dpml-http-server"/>
</dependencies>
<dependencies scope="test">
+ <include ref="dpml/transit/dpml-transit-main"/>
<include ref="dpml/metro/dpml-metro-model"/>
<include ref="ant/ant-junit"/>
</dependencies>
Modified: trunk/main/transit/core/src/main/net/dpml/part/PartDecoder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartDecoder.java
2006-03-30 17:33:40 UTC (rev 1301)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartDecoder.java
2006-03-31 04:35:55 UTC (rev 1302)
@@ -82,8 +82,6 @@
throw new NullPointerException( "base" );
}
- //System.out.println( "# LOAD PART: " + uri );
-
try
{
final Document document = DOCUMENT_BUILDER.parse( uri );
Modified:
trunk/main/transit/core/src/main/net/dpml/part/PartStrategyDecoder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartStrategyDecoder.java
2006-03-30 17:33:40 UTC (rev 1301)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartStrategyDecoder.java
2006-03-31 04:35:55 UTC (rev 1302)
@@ -79,7 +79,7 @@
if( "plugin".equals( type ) )
{
String classname = ElementHelper.getAttribute( element, "class"
);
- Element[] elements = ElementHelper.getChildren( element, "param"
);
+ Element[] elements = ElementHelper.getChildren( element );
Value[] values = VALUE_DECODER.decodeValues( elements );
Plugin plugin = new Plugin( classname, values );
return new Strategy( DecoderFactory.LOCAL_URI,
TRANSIT_DIRECTIVE, plugin, alias );
Modified:
trunk/main/transit/core/src/main/net/dpml/part/PartStrategyEncoder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartStrategyEncoder.java
2006-03-30 17:33:40 UTC (rev 1301)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartStrategyEncoder.java
2006-03-31 04:35:55 UTC (rev 1302)
@@ -61,17 +61,6 @@
* Externalize a strategy.
* @param writer the output stream writer
* @param strategy the strategy
- * @exception IOException if an IO error occurs
- */
- //public void write( Writer writer, Strategy strategy ) throws
IOException
- //{
- // encodeStrategy( writer, strategy, "" );
- //}
-
- /**
- * Externalize a strategy.
- * @param writer the output stream writer
- * @param strategy the strategy
* @param pad the character offset
* @exception IOException if an IO error occurs
*/
@@ -82,13 +71,15 @@
{
Plugin plugin = (Plugin) data;
String classname = plugin.getClassname();
- writer.write( "\n <strategy xsi:type=\"plugin\" class=\"" );
+ writer.write( "\n" + pad + "<strategy xsi:type=\"plugin\"
class=\"" );
writer.write( classname );
writer.write( "\"" );
if( plugin.getValues().length > 0 )
{
+ writer.write( ">" );
Value[] values = plugin.getValues();
VALUE_ENCODER.encodeValues( writer, values, " " );
+ writer.write( "\n" + pad + "</strategy>" );
}
else
{
Modified: trunk/main/transit/core/src/main/net/dpml/part/ValueEncoder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/ValueEncoder.java
2006-03-30 17:33:40 UTC (rev 1301)
+++ trunk/main/transit/core/src/main/net/dpml/part/ValueEncoder.java
2006-03-31 04:35:55 UTC (rev 1302)
@@ -83,7 +83,7 @@
else
{
String v = construct.getBaseValue();
- if( null != value )
+ if( null != v )
{
writer.write( " value=\"" + v + "\"" );
}
Modified:
trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
2006-03-30 17:33:40 UTC (rev 1301)
+++ trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
2006-03-31 04:35:55 UTC (rev 1302)
@@ -288,20 +288,6 @@
* @exception InvocationTargetException if a plugin constructor
invocation error occurs
* @exception NullArgumentException if the class or args argument is null
*/
- //private Object createPlugin( Class clazz, Object[] args )
- // throws IOException, NullArgumentException,
InvocationTargetException
- //{
- // if( null == clazz )
- // {
- // throw new NullArgumentException( "clazz" );
- // }
- // if( null == args )
- // {
- // throw new NullArgumentException( "args" );
- // }
- // return instantiate( clazz, args );
- //}
-
public Object instantiate( Class clazz, Object[] args ) throws
RepositoryException, InvocationTargetException
{
if( null == clazz )
- r1302 - in trunk/main: central/src/docs/about/download metro metro/builder metro/runtime/src/main/net/dpml/metro/runtime metro/test/src/test/net/dpml/test/part planet/http transit/core/src/main/net/dpml/part transit/core/src/main/net/dpml/transit, mcconnell at BerliOS, 03/30/2006
Archive powered by MHonArc 2.6.24.