Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2436 - in development/main/metro: . composition/control/src/main/net/dpml/composition/control composition/control/src/main/net/dpml/composition/model composition/testing/test composition/testing/test/src/main/net/dpml/test/state composition/testing/test/src/test/net/dpml/composition/testing composition/testing/test/src/test/net/dpml/test/config parts/src/main/net/dpml/parts/control parts/src/main/net/dpml/parts/model parts/src/main/net/dpml/parts/state

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2436 - in development/main/metro: . composition/control/src/main/net/dpml/composition/control composition/control/src/main/net/dpml/composition/model composition/testing/test composition/testing/test/src/main/net/dpml/test/state composition/testing/test/src/test/net/dpml/composition/testing composition/testing/test/src/test/net/dpml/test/config parts/src/main/net/dpml/parts/control parts/src/main/net/dpml/parts/model parts/src/main/net/dpml/parts/state
  • Date: Thu, 28 Apr 2005 12:10:03 -0400

Author: mcconnell AT dpml.net
Date: Thu Apr 28 12:09:59 2005
New Revision: 2436

Modified:

development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionClassLoader.java

development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionController.java

development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionManager.java

development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionPartHandler.java

development/main/metro/composition/control/src/main/net/dpml/composition/model/CompositionModel.java

development/main/metro/composition/control/src/main/net/dpml/composition/model/PartsTable.java
development/main/metro/composition/testing/test/build.xml

development/main/metro/composition/testing/test/src/main/net/dpml/test/state/ManagingContainer.java

development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/CompositeTestCase.java

development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/ExampleTestCase.java

development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/SimpleTestCase.java

development/main/metro/composition/testing/test/src/test/net/dpml/test/config/ConfigurationTestCase.java
development/main/metro/index.xml

development/main/metro/parts/src/main/net/dpml/parts/control/SystemManager.java
development/main/metro/parts/src/main/net/dpml/parts/model/Component.java
development/main/metro/parts/src/main/net/dpml/parts/state/StateEvent.java
Log:
Fix bug concerning classloader stack ordering, improve classloader dump
utility and incorporate under a NoClassDefFoundError, and update composition
manager to register and fire up components instead of models.

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionClassLoader.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionClassLoader.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionClassLoader.java
Thu Apr 28 12:09:59 2005
@@ -83,11 +83,6 @@

protected void listClasspath( StringBuffer buffer )
{
- ClassLoader parent = getParent();
- if( null != parent )
- {
- listClasspath( buffer, parent );
- }
listClasspath( buffer, this );
buffer.append( "\n" );
}
@@ -97,6 +92,11 @@
if( classloader instanceof CompositionClassLoader )
{
CompositionClassLoader cl = (CompositionClassLoader) classloader;
+ ClassLoader parent = cl.getParent();
+ if( null != parent )
+ {
+ listClasspath( buffer, parent );
+ }
int index = cl.getIndex();
buffer.append( "\n classpath (" + index + ")" );
appendEntries( buffer, cl );
@@ -104,6 +104,11 @@
else if( classloader instanceof URLClassLoader )
{
URLClassLoader cl = (URLClassLoader) classloader;
+ ClassLoader parent = cl.getParent();
+ if( null != parent )
+ {
+ listClasspath( buffer, parent );
+ }
buffer.append( "\n url classloader" );
appendEntries( buffer, cl );
}

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionController.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionController.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionController.java
Thu Apr 28 12:09:59 2005
@@ -229,11 +229,25 @@
throws IOException, DelegationException, ModelException,
PartNotFoundException,
HandlerNotFoundException, DelegationException
{
+ return getModel( uri, null );
+ }
+
+ /**
+ * Add a part to the collection of parts managed by this controller.
+ *
+ * @param uri a uri identifying the part to add
+ * @param key the key to assign to the model
+ * @return the model of the part
+ */
+ public Model getModel( URI uri, String key )
+ throws IOException, DelegationException, ModelException,
PartNotFoundException,
+ HandlerNotFoundException, DelegationException
+ {
Part part = loadPart( uri );
- ClassLoader anchor = net.dpml.logging.Logger.class.getClassLoader();
+ ClassLoader anchor =
net.dpml.composition.info.Type.class.getClassLoader();
URI partition = getPartition();
ClassLoader classloader = new CompositionClassLoader( partition,
anchor );
- return getModel( classloader, part, null );
+ return getModel( classloader, part, key );
}

/**
@@ -495,7 +509,7 @@
final URI local = getLocalPartition( partition, name );
final ClassLoaderDirective cld = profile.getClassLoaderDirective();
final ClasspathDirective[] cpds = cld.getClasspathDirectives();
- for( int i=0; i<cpds.length; i++ )
+ for( int i=(cpds.length - 1); i>-1; i-- )
{
ClasspathDirective cpd = cpds[i];
URI[] uris = cpd.getURIs();

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionManager.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionManager.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionManager.java
Thu Apr 28 12:09:59 2005
@@ -40,6 +40,7 @@
import net.dpml.parts.control.PartNotFoundException;
import net.dpml.parts.control.SystemManager;
import net.dpml.parts.model.Model;
+import net.dpml.parts.model.Component;
import net.dpml.parts.model.ModelException;
import net.dpml.parts.part.Part;

@@ -68,7 +69,7 @@
private final SystemContext m_context;
private final ClassLoader m_classloader;
private final URI m_partition;
- private final Set m_models = Collections.synchronizedSet( new HashSet()
);
+ private final Set m_components = Collections.synchronizedSet( new
HashSet() );
private final Map m_instances = new Hashtable();

//--------------------------------------------------------------------
@@ -144,74 +145,72 @@
// SystemManager
//--------------------------------------------------------------------

- /**
- * Add a part to the collection of parts managed by this controller.
+ /**
+ * Add a component to the collection of components managed by this
controller.
*
- * @param uri a uri identifying the part to add
- * @return the model of the part
+ * @param uri a part uri
+ * @param key the key under which the component will be registered
+ * @return the registered component
*/
- public Model addPart( URI uri )
- throws IOException, DelegationException, ModelException,
PartNotFoundException, HandlerNotFoundException
+ public Component addComponent( URI uri, String key )
+ throws IOException, DelegationException, ModelException,
PartNotFoundException, HandlerNotFoundException
{
- Model model = getModel( uri);
- addModel( model );
- return model;
+ Model model = getModel( uri, key );
+ Component component = model.getComponent();
+ addComponent( component );
+ return component;
}

/**
- * Add a part to the collection of parts managed by this controller.
- *
- * @param uri a uri identifying the part to add
- * @return the model of the part
+ * Add a part designated by a supplied uri to the system scope.
+ * @param uri a part uri
+ * @param id a component identifier
+ * @param key the key under which the component will be registered
+ * @return the registered component
*/
- public Model addPart( URI uri, String key )
+ public Component addComponent( URI uri, Object id, String key )
throws IOException, DelegationException, ModelException,
PartNotFoundException, HandlerNotFoundException
{
- Part part = loadPart( uri );
- ClassLoader classloader = getClassLoader();
- Model model = getModel( classloader, part, key );
- addModel( model );
- return model;
+ Model model = getModel( uri, key );
+ Component component = model.getComponent( id );
+ addComponent( component );
+ return component;
}

/**
- * Add a model to the management scope of the controller.
- * @param model the model to add to the controller
+ * Register a component with the system.
+ * @param component the component to register
*/
- public void addModel( Model model )
+ public void addComponent( Component component )
{
- m_models.add( model );
+ m_components.add( component );
}

- // TODO: statup means start of all registered Component instances
public synchronized void start() throws Exception
{
- // getMonitor().debug( "initiating startup in " + getURI() );
- // Model[] models = getManagedModels();
- // for( int i=0; i<models.length; i++ )
- // {
- // Model model = models[i];
- // getMonitor().debug( "starting " + model.getURI() );
- // Controller controller = model.getController();
- // Object instance = controller.resolve( model );
- // m_instances.put( model, instance );
- // }
+ getMonitor().debug( "initiating startup in " + getURI() );
+ Component[] components = getManagedComponents();
+ for( int i=(components.length-1); i>-1; i-- )
+ {
+ Component component = components[i];
+ getMonitor().debug( "starting " + component.getURI() );
+ Object instance = component.resolve();
+ m_instances.put( component, instance );
+ }
}

- // TODO: statup means stop of all registered Component instances
public synchronized void stop()
{
- // getMonitor().debug( "initiating shutdown in " + getURI() );
- // Model[] models = (Model[]) m_instances.keySet().toArray( new
Model[0] );
- // for( int i=0; i<models.length; i++ )
- // {
- // Model model = models[i];
- // getMonitor().debug( "stopping " + model.getURI() );
- // Controller controller = model.getController();
- // Object instance = m_instances.get( model );
- // controller.release( instance );
- // m_instances.remove( model );
- // }
+ getMonitor().debug( "initiating shutdown in " + getURI() );
+ Component[] components = (Component[]) m_instances.keySet().toArray(
new Component[0] );
+ for( int i=0; i<components.length; i++ )
+ {
+ Component component = components[i];
+ getMonitor().debug( "stopping " + component.getURI() );
+ Object instance = m_instances.get( component );
+ component.getManager().release( instance );
+ m_instances.remove( component );
+ }
}

//--------------------------------------------------------------------
@@ -232,9 +231,9 @@
* Return an array of managed parts.
* @return the parts array
*/
- public Model[] getManagedModels()
+ public Component[] getManagedComponents()
{
- return (Model[]) m_models.toArray( new Model[0] );
+ return (Component[]) m_components.toArray( new Component[0] );
}

/**
@@ -243,11 +242,11 @@
public void list()
{
getMonitor().info( "listing models in the controller" );
- Model[] models = getManagedModels();
- for( int i=0; i<models.length; i++ )
+ Component[] components = getManagedComponents();
+ for( int i=0; i<components.length; i++ )
{
- Model model = models[i];
- getMonitor().info( "model: " + model );
+ Component component = components[i];
+ getMonitor().info( "component: " + component );
}
}

@@ -304,13 +303,13 @@
{
try
{
- addPart( uri, "root" );
+ addComponent( uri, "root" );
}
catch( Throwable e )
{
URI control = getURI();
final String error =
- "Unable to establish the model for the part."
+ "Unable to establish a component for the part."
+ "\nPart: " + uri
+ "\nController: " + getURI();
throw new ControlRuntimeException( control, error, e );

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionPartHandler.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionPartHandler.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/CompositionPartHandler.java
Thu Apr 28 12:09:59 2005
@@ -271,7 +271,7 @@

private PartHandler loadHandler( URI uri ) throws
HandlerNotFoundException
{
- ClassLoader classloader = PartHandler.class.getClassLoader();
+ ClassLoader classloader = Type.class.getClassLoader();
ConsoleMonitor monitor = new ConsoleMonitor( "manager", true );
try
{

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/model/CompositionModel.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/model/CompositionModel.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/model/CompositionModel.java
Thu Apr 28 12:09:59 2005
@@ -416,6 +416,15 @@
{
throw new TypeClassNotFoundException( classname );
}
+ catch( NoClassDefFoundError e )
+ {
+ final String error =
+ "Cannot load component type deployment class due to a missing
dependent class."
+ + "\nDeployment Class: " + classname
+ + "\nMissing Class: " + e.getMessage()
+ + "\n\n" + classloader.toString();
+ throw new ModelRuntimeException( error, e );
+ }
}

private Class loadServiceClass( ClassLoader classloader,
ServiceDescriptor service )

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/model/PartsTable.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/model/PartsTable.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/model/PartsTable.java
Thu Apr 28 12:09:59 2005
@@ -21,6 +21,7 @@
import java.util.Map;
import java.util.Hashtable;

+import net.dpml.parts.control.ControlRuntimeException;
import net.dpml.parts.model.ModelException;
import net.dpml.parts.model.Model;
import net.dpml.parts.model.DuplicateKeyException;

Modified: development/main/metro/composition/testing/test/build.xml
==============================================================================
--- development/main/metro/composition/testing/test/build.xml (original)
+++ development/main/metro/composition/testing/test/build.xml Thu Apr 28
12:09:59 2005
@@ -209,14 +209,23 @@
<type class="net.dpml.test.state.ManagingContainer"/>
</types>

- <component xmlns="plugin:dpml/composition/dpml-composition-builder"
+ <component dest="target/test/managed-component.part"
+ xmlns="plugin:dpml/composition/dpml-composition-builder"
type="net.dpml.test.state.ManagedComponent"
- name="component" dest="target/test/managed-component.part"/>
+ name="component"/>
+
+ <component dest="target/test/managing-container.part"
+ xmlns="plugin:dpml/composition/dpml-composition-builder"
+ type="net.dpml.test.state.ManagingContainer"
+ name="container">
+ <parts>
+ <component key="test" type="net.dpml.test.state.ManagedComponent"/>
+ </parts>
+ </component>

<component xmlns="plugin:dpml/composition/dpml-composition-builder"
type="net.dpml.test.state.ManagingContainer"
- name="container"
- dest="target/test/managing-container.part">
+ name="container">
<parts>
<component key="test" type="net.dpml.test.state.ManagedComponent"/>
</parts>

Modified:
development/main/metro/composition/testing/test/src/main/net/dpml/test/state/ManagingContainer.java
==============================================================================
---
development/main/metro/composition/testing/test/src/main/net/dpml/test/state/ManagingContainer.java
(original)
+++
development/main/metro/composition/testing/test/src/main/net/dpml/test/state/ManagingContainer.java
Thu Apr 28 12:09:59 2005
@@ -23,8 +23,6 @@

import javax.swing.event.ChangeListener;

-import net.dpml.configuration.Configuration;
-
import net.dpml.parts.control.Manager;
import net.dpml.parts.model.Component;
import net.dpml.parts.state.State;

Modified:
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/CompositeTestCase.java
==============================================================================
---
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/CompositeTestCase.java
(original)
+++
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/CompositeTestCase.java
Thu Apr 28 12:09:59 2005
@@ -26,6 +26,7 @@
import junit.framework.TestCase;

import net.dpml.parts.model.Model;
+import net.dpml.parts.model.Component;
import net.dpml.parts.control.Controller;
import net.dpml.parts.control.Manager;

@@ -67,8 +68,8 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( "acme-bad-widget.part" );
- Model model = helper.getCompositionManager().addPart( uri, "acme" );
- AcmeContainer container = (AcmeContainer)
model.getComponent().resolve( false );
+ Component component = helper.getCompositionManager().addComponent(
uri, "acme" );
+ AcmeContainer container = (AcmeContainer) component.resolve( false );
try
{
container.execute();
@@ -79,7 +80,7 @@
}
finally
{
- model.getComponent().release( container );
+ component.release( container );
helper.dispose();
}
}
@@ -88,15 +89,15 @@
{
CompositionHelper helper = new CompositionHelper( false );
URI uri = helper.toURI( path );
- Model model = helper.getCompositionManager().addPart( uri, "acme" );
- AcmeContainer container = (AcmeContainer)
model.getComponent().resolve( false );
+ Component component = helper.getCompositionManager().addComponent(
uri, "acme" );
+ AcmeContainer container = (AcmeContainer) component.resolve( false );
try
{
container.execute();
}
finally
{
- model.getComponent().release( container );
+ component.release( container );
helper.dispose();
}
}

Modified:
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/ExampleTestCase.java
==============================================================================
---
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/ExampleTestCase.java
(original)
+++
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/ExampleTestCase.java
Thu Apr 28 12:09:59 2005
@@ -26,6 +26,7 @@
import junit.framework.TestCase;

import net.dpml.parts.model.Model;
+import net.dpml.parts.model.Component;
import net.dpml.parts.control.Controller;

import net.dpml.composition.unit.CompositionHelper;
@@ -46,7 +47,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( "acme-example-one.part" );
- Model model = helper.getCompositionManager().addPart( uri, "example"
);
+ Model model = helper.getCompositionManager().getModel( uri,
"example" );
Example example = (Example) model.getComponent().resolve();
example.doMyStuff();
}
@@ -60,7 +61,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( "acme-example-two.part" );
- Model model = helper.getCompositionManager().addPart( uri, "example"
);
+ Model model = helper.getCompositionManager().getModel( uri,
"example" );
Example example = (Example) model.getComponent().resolve();
example.doMyStuff();
}
@@ -73,7 +74,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( "acme-example-three.part" );
- Model model = helper.getCompositionManager().addPart( uri, "example"
);
+ Model model = helper.getCompositionManager().getModel( uri,
"example" );
Example example = (Example) model.getComponent().resolve();
example.doMyStuff();
}
@@ -87,7 +88,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( "acme-example-four.part" );
- Model model = helper.getCompositionManager().addPart( uri, "example"
);
+ Model model = helper.getCompositionManager().getModel( uri,
"example" );
Example example = (Example) model.getComponent().resolve();
example.doMyStuff();
}

Modified:
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/SimpleTestCase.java
==============================================================================
---
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/SimpleTestCase.java
(original)
+++
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/SimpleTestCase.java
Thu Apr 28 12:09:59 2005
@@ -49,7 +49,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( PATH );
- Model model = helper.getCompositionManager().addPart( uri, "widget"
);
+ Model model = helper.getCompositionManager().getModel( uri, "widget"
);
Widget widget = (Widget) model.getComponent().resolve();
widget.doWidgetStuff( "green" );
model.getComponent().release( widget );
@@ -63,7 +63,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( "acme-widget.part" );
- Model model = helper.getCompositionManager().addPart( uri, "widget"
);
+ Model model = helper.getCompositionManager().getModel( uri, "widget"
);
Widget widget = (Widget) model.getComponent().resolve();
widget.doWidgetStuff( "green" );
model.getComponent().release( widget );
@@ -76,7 +76,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( PATH );
- Model model = helper.getCompositionManager().addPart( uri, "widget"
);
+ Model model = helper.getCompositionManager().getModel( uri, "widget"
);
Widget widget = (Widget) model.getComponent().resolve();
try
{
@@ -101,7 +101,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( PATH );
- Model model = helper.getCompositionManager().addPart( uri, "widget"
);
+ Model model = helper.getCompositionManager().getModel( uri, "widget"
);
WidgetComponent widget = (WidgetComponent)
model.getComponent().resolve( false );
String name = widget.getName();
assertEquals( "name", "widget", name );
@@ -120,7 +120,7 @@
String id = "niclas";
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( PATH );
- Model model = helper.getCompositionManager().addPart( uri, "widget"
);
+ Model model = helper.getCompositionManager().getModel( uri, "widget"
);
WidgetComponent widget = (WidgetComponent) model.getComponent( id
).resolve( false );
model.getComponent( id ).release( widget );
}
@@ -136,7 +136,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( PATH );
- Model model = helper.getCompositionManager().addPart( uri, "widget"
);
+ Model model = helper.getCompositionManager().getModel( uri, "widget"
);
Controller controller = model.getController();
Widget w1 = (Widget) model.getComponent( "acme-widget-one"
).resolve( false );
Widget w2 = (Widget) model.getComponent( "acme-widget-two"
).resolve( false );

Modified:
development/main/metro/composition/testing/test/src/test/net/dpml/test/config/ConfigurationTestCase.java
==============================================================================
---
development/main/metro/composition/testing/test/src/test/net/dpml/test/config/ConfigurationTestCase.java
(original)
+++
development/main/metro/composition/testing/test/src/test/net/dpml/test/config/ConfigurationTestCase.java
Thu Apr 28 12:09:59 2005
@@ -47,7 +47,7 @@
{
CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( "configurable-container.part" );
- Model model = helper.getCompositionManager().addPart( uri );
+ Model model = helper.getCompositionManager().getModel( uri );
ConfigurableContainer container = (ConfigurableContainer)
model.getComponent().resolve( false );
model.getComponent().release( container );
helper.dispose();

Modified: development/main/metro/index.xml
==============================================================================
--- development/main/metro/index.xml (original)
+++ development/main/metro/index.xml Thu Apr 28 12:09:59 2005
@@ -435,8 +435,12 @@
<include key="dpml-parameters-api"/>
<include key="dpml-logging-api"/>
<include key="dpml-logging-data"/>
+ <!--
<include key="dpml-configuration-impl" build="false" test="true"
runtime="false"/>
<include key="dpml-parameters-impl" build="false" test="true"
runtime="false"/>
+ -->
+ <include key="dpml-configuration-impl"/>
+ <include key="dpml-parameters-impl"/>
</dependencies>
</project>

@@ -456,7 +460,7 @@
<include key="dpml-activity-api" tag="api"/>
<include key="dpml-parameters-api" tag="api"/>
<include key="dpml-configuration-api" tag="api"/>
- <include key="dpml-parts-api" tag="spi"/>
+ <include key="dpml-parts-api" tag="api"/>
<include key="dpml-composition-part" tag="spi"/>
<include key="dpml-system-api" tag="spi"/>
<include key="dpml-util-exception"/>
@@ -531,17 +535,19 @@
<version>1.0.0</version>
<status>SNAPSHOT</status>
<types>
- <type>test</type>
+ <type>jar</type>
+ <type>part</type>
</types>
</info>
<dependencies>
- <include key="dpml-composition-control"/>
+ <include key="dpml-parts-api"/>
<include key="dpml-configuration-api"/>
<include key="dpml-activity-api"/>
- <include key="dpml-parts-api"/>
- <include key="dpml-composition-testing-acme"/>
- <include key="dpml-composition-unit"/>
<include key="dpml-util-exception"/>
+ <include key="dpml-composition-part"/>
+ <include key="dpml-composition-testing-acme"/>
+ <include key="dpml-composition-control"/>
+ <include key="dpml-composition-unit" runtime="false"/>
<include key="dpml-logging-logkit-impl" build="false"/>
</dependencies>
<plugins>

Modified:
development/main/metro/parts/src/main/net/dpml/parts/control/SystemManager.java
==============================================================================
---
development/main/metro/parts/src/main/net/dpml/parts/control/SystemManager.java
(original)
+++
development/main/metro/parts/src/main/net/dpml/parts/control/SystemManager.java
Thu Apr 28 12:09:59 2005
@@ -21,6 +21,7 @@
import java.io.IOException;
import java.net.URI;

+import net.dpml.parts.model.Component;
import net.dpml.parts.model.Model;
import net.dpml.parts.model.ModelException;

@@ -34,19 +35,31 @@
*/
public interface SystemManager extends Controller
{
+ /**
+ * Add a component to the collection of components managed by this
controller.
+ *
+ * @param uri a part uri
+ * @param key the key under which the component will be registered
+ * @return the registered component
+ */
+ Component addComponent( URI uri, String key )
+ throws IOException, DelegationException, ModelException,
PartNotFoundException, HandlerNotFoundException;
+
/**
* Add a part designated by a supplied uri to the system scope.
* @param uri a part uri
- * @return the management view of the loaded part
+ * @param id a component identifier
+ * @param key the key under which the component will be registered
+ * @return the registered component
*/
- Model addPart( URI uri, String key )
+ Component addComponent( URI uri, Object id, String key )
throws IOException, DelegationException, ModelException,
PartNotFoundException, HandlerNotFoundException;

/**
- * Add a model to the system scope.
- * @param model the model to add to the controller
+ * Register a component with the system.
+ * @param component the component to register
*/
- void addModel( Model model );
+ void addComponent( Component component );

/**
* Start the system.

Modified:
development/main/metro/parts/src/main/net/dpml/parts/model/Component.java
==============================================================================
--- development/main/metro/parts/src/main/net/dpml/parts/model/Component.java
(original)
+++ development/main/metro/parts/src/main/net/dpml/parts/model/Component.java
Thu Apr 28 12:09:59 2005
@@ -38,7 +38,7 @@
/**
* Return a Manager for the component.
*/
- Manager getManager() throws Exception;
+ Manager getManager();

/**
* Return an initialized instance of the component.

Modified:
development/main/metro/parts/src/main/net/dpml/parts/state/StateEvent.java
==============================================================================
---
development/main/metro/parts/src/main/net/dpml/parts/state/StateEvent.java
(original)
+++
development/main/metro/parts/src/main/net/dpml/parts/state/StateEvent.java
Thu Apr 28 12:09:59 2005
@@ -34,13 +34,13 @@
/**
* Construct a new <code>StateEvent</code>.
*
- * @param iSource the source object
+ * @param instance the source component instance
* @param from the originating state
* @param to the new current state
*/
- public StateEvent( final Object iSource, State from, State to )
+ public StateEvent( final Object instance, State from, State to )
{
- super( iSource );
+ super( instance );
m_from = from;
m_to = to;
}



  • svn commit: r2436 - in development/main/metro: . composition/control/src/main/net/dpml/composition/control composition/control/src/main/net/dpml/composition/model composition/testing/test composition/testing/test/src/main/net/dpml/test/state composition/testing/test/src/test/net/dpml/composition/testing composition/testing/test/src/test/net/dpml/test/config parts/src/main/net/dpml/parts/control parts/src/main/net/dpml/parts/model parts/src/main/net/dpml/parts/state, mcconnell, 04/28/2005

Archive powered by MHonArc 2.6.24.

Top of Page