notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r1186 - in development/main: metro/private/composition/test/src/main/net/dpml/composition/test metro/private/system/impl/src/main/net/dpml/system/impl metro/tools/unit/src/main/net/dpml/metro/unit metro/tutorials/main/src/main/tutorial transit/handler/src/main/net/dpml/transit
- From: mcconnell AT netcompartner.com
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r1186 - in development/main: metro/private/composition/test/src/main/net/dpml/composition/test metro/private/system/impl/src/main/net/dpml/system/impl metro/tools/unit/src/main/net/dpml/metro/unit metro/tutorials/main/src/main/tutorial transit/handler/src/main/net/dpml/transit
- Date: Thu, 16 Dec 2004 02:19:50 +0100
Author: mcconnell
Date: Thu Dec 16 02:19:49 2004
New Revision: 1186
Modified:
development/main/metro/private/composition/test/src/main/net/dpml/composition/test/CompositionTestCase.java
development/main/metro/private/system/impl/src/main/net/dpml/system/impl/DefaultSystemContextFactory.java
development/main/metro/tools/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
development/main/metro/tutorials/main/src/main/tutorial/Main.java
development/main/transit/handler/src/main/net/dpml/transit/Main.java
Log:
housekeeping
Modified:
development/main/metro/private/composition/test/src/main/net/dpml/composition/test/CompositionTestCase.java
==============================================================================
---
development/main/metro/private/composition/test/src/main/net/dpml/composition/test/CompositionTestCase.java
(original)
+++
development/main/metro/private/composition/test/src/main/net/dpml/composition/test/CompositionTestCase.java
Thu Dec 16 02:19:49 2004
@@ -21,6 +21,7 @@
import java.io.File;
import java.net.URI;
import java.util.HashMap;
+import java.util.Hashtable;
import java.util.Map;
import junit.framework.TestCase;
@@ -93,7 +94,9 @@
URI uri = new URI( "@TRANSIT-IMPL-SPEC@" );
ClassLoader classloader = CompositionTestCase.class.getClassLoader();
- Factory systemfactory = (Factory) repo.getPlugin( classloader, uri,
new Object[0] );
+ Map data = new Hashtable();
+ data.put( "urn:transit.debug.policy", new Boolean( false ) );
+ Factory systemfactory = (Factory) repo.getPlugin( classloader, uri,
new Object[]{data} );
Map systemCriteria = systemfactory.createDefaultCriteria();
systemCriteria.put( "dpml.system.dir", WORK );
SystemContext system = (SystemContext) systemfactory.create(
systemCriteria );
Modified:
development/main/metro/private/system/impl/src/main/net/dpml/system/impl/DefaultSystemContextFactory.java
==============================================================================
---
development/main/metro/private/system/impl/src/main/net/dpml/system/impl/DefaultSystemContextFactory.java
(original)
+++
development/main/metro/private/system/impl/src/main/net/dpml/system/impl/DefaultSystemContextFactory.java
Thu Dec 16 02:19:49 2004
@@ -87,7 +87,6 @@
//
------------------------------------------------------------------------
private final Repository m_repository;
- private final Monitor[] m_monitors;
private CommandLine m_line;
private String[] m_remainder;
private final Properties m_properties;
@@ -101,12 +100,12 @@
//
------------------------------------------------------------------------
public DefaultSystemContextFactory(
- Map map, Repository repository, Monitor[] monitors, String[] args )
+ Map map, Repository repository, String[] args )
throws Exception
{
+ assertNotNull( "map", map );
assertNotNull( "repository", repository );
assertNotNull( "args", args );
- assertNotNull( "map", map );
m_params = map;
@@ -120,12 +119,10 @@
String[] arguments = pair.getSelection();
CommandLineParser parser = new GnuParser();
m_line = parser.parse( options, arguments, false );
- //m_DebugMode = m_line.hasOption( "debug" );
m_InfoMode = m_line.hasOption( "info" );
m_remainder = pair.getRemainder();
m_repository = createRepository();
- m_monitors = monitors;
try
{
@@ -355,20 +352,6 @@
}
}
- private Monitor getMonitor( Monitor[] monitors, Class clazz )
- {
- for( int i=0; i<monitors.length; i++ )
- {
- Monitor monitor = monitors[i];
-
- if( clazz.isAssignableFrom( monitor.getClass() ) )
- {
- return monitor;
- }
- }
- return null;
- }
-
private File normalize( File file )
{
if( null == file )
Modified:
development/main/metro/tools/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
==============================================================================
---
development/main/metro/tools/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
(original)
+++
development/main/metro/tools/unit/src/main/net/dpml/metro/unit/CompositionTestCase.java
Thu Dec 16 02:19:49 2004
@@ -21,6 +21,7 @@
import java.io.File;
import java.net.URI;
import java.util.HashMap;
+import java.util.Hashtable;
import java.util.Map;
import junit.framework.TestCase;
@@ -96,7 +97,10 @@
URI uri = Artifact.createArtifact( "@SYSTEM-PLUGIN-URI@" ).toURI();
ClassLoader classloader = CompositionTestCase.class.getClassLoader();
- Factory systemfactory = (Factory) repo.getPlugin( classloader, uri,
new Object[0] );
+
+ Map data = new Hashtable();
+ data.put( "urn:transit.debug.policy", new Boolean( false ) ); //
TODO check in supplied map
+ Factory systemfactory = (Factory) repo.getPlugin( classloader, uri,
new Object[]{data} );
Map systemCriteria = systemfactory.createDefaultCriteria();
systemCriteria.put( "dpml.system.dir", WORK );
Modified: development/main/metro/tutorials/main/src/main/tutorial/Main.java
==============================================================================
--- development/main/metro/tutorials/main/src/main/tutorial/Main.java
(original)
+++ development/main/metro/tutorials/main/src/main/tutorial/Main.java Thu
Dec 16 02:19:49 2004
@@ -18,6 +18,8 @@
package tutorial;
import java.net.URI;
+import java.util.Map;
+import java.util.Hashtable;
import net.dpml.composition.model.ContainmentModel;
import net.dpml.composition.provider.CompositionCriteria;
@@ -50,7 +52,10 @@
URI uri = Artifact.createArtifact( "@SYSTEM-PLUGIN-URI@"
).toURI();
ClassLoader classloader = Main.class.getClassLoader();
- Factory systemfactory = (Factory) repo.getPlugin( classloader,
uri, new Object[0] );
+ Map data = new Hashtable();
+ data.put( "urn:transit.debug.policy", new Boolean( false ) );
+
+ Factory systemfactory = (Factory) repo.getPlugin( classloader,
uri, new Object[]{data} );
SystemContext system = (SystemContext) systemfactory.create();
//
Modified: development/main/transit/handler/src/main/net/dpml/transit/Main.java
==============================================================================
--- development/main/transit/handler/src/main/net/dpml/transit/Main.java
(original)
+++ development/main/transit/handler/src/main/net/dpml/transit/Main.java
Thu Dec 16 02:19:49 2004
@@ -160,10 +160,10 @@
data.put( "urn:transit.repository.monitor", repoMonitor );
data.put( "urn:transit.cache.monitor", cacheMonitor );
data.put( "urn:transit.network.monitor", netMonitor );
+ data.put( "urn:transit.args", arguments );
Map map = new Dictionary( data );
- Monitor[] monitors = new Monitor[]{repoMonitor, cacheMonitor,
netMonitor};
- Object[] params = new Object[]{map, monitors, arguments};
+ Object[] params = new Object[]{map, arguments};
adapter.debug( "Starting transit." );
adapter.debug( uri.toString() );
- svn commit: r1186 - in development/main: metro/private/composition/test/src/main/net/dpml/composition/test metro/private/system/impl/src/main/net/dpml/system/impl metro/tools/unit/src/main/net/dpml/metro/unit metro/tutorials/main/src/main/tutorial transit/handler/src/main/net/dpml/transit, mcconnell, 12/15/2004
Archive powered by MHonArc 2.6.24.