Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2245 - in development/main/metro: automation/control/src/main/net/dpml/automation/control automation/control/src/main/net/dpml/automation/model composition/api/src/main/net/dpml/composition/data composition/api/src/test/net/dpml/composition/data/test composition/builder/src/main/net/dpml/composition/builder/datatypes composition/control/src/main/net/dpml/composition/control composition/control/src/main/net/dpml/composition/models composition/impl/src/main/net/dpml/composition/data/builder composition/impl/src/main/net/dpml/composition/model/impl composition/testing/acme composition/testing/acme/src/main/net/dpml/composition/testing composition/testing/unit

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: r2245 - in development/main/metro: automation/control/src/main/net/dpml/automation/control automation/control/src/main/net/dpml/automation/model composition/api/src/main/net/dpml/composition/data composition/api/src/test/net/dpml/composition/data/test composition/builder/src/main/net/dpml/composition/builder/datatypes composition/control/src/main/net/dpml/composition/control composition/control/src/main/net/dpml/composition/models composition/impl/src/main/net/dpml/composition/data/builder composition/impl/src/main/net/dpml/composition/model/impl composition/testing/acme composition/testing/acme/src/main/net/dpml/composition/testing composition/testing/unit
  • Date: Fri, 08 Apr 2005 03:58:49 -0400

Author: mcconnell AT dpml.net
Date: Fri Apr 8 03:58:46 2005
New Revision: 2245

Modified:

development/main/metro/automation/control/src/main/net/dpml/automation/control/Controller.java

development/main/metro/automation/control/src/main/net/dpml/automation/model/Model.java

development/main/metro/composition/api/src/main/net/dpml/composition/data/ValueDirective.java

development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ContextDirectiveTestCase.java

development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/EntryDataType.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/ContextInvocationHandler.java

development/main/metro/composition/control/src/main/net/dpml/composition/models/EntryModel.java

development/main/metro/composition/control/src/main/net/dpml/composition/models/PartsModel.java

development/main/metro/composition/control/src/main/net/dpml/composition/models/StandardComponentModel.java

development/main/metro/composition/control/src/main/net/dpml/composition/models/StandardEntryModel.java

development/main/metro/composition/control/src/main/net/dpml/composition/models/ValueModel.java

development/main/metro/composition/impl/src/main/net/dpml/composition/data/builder/XMLComponentProfileCreator.java

development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultEntryModel.java

development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultImportModel.java
development/main/metro/composition/testing/acme/build.xml

development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/WidgetComponent.java
development/main/metro/composition/testing/unit/build.xml
Log:
General improvements (mainly focussed on context handling). Removal and/or
simplification of common apis at the model and control level of abstration.
Improvement to the ValueDirective logic and CompositionManager.
Simplification of the context invocation handler. Replacement of
'getQualifedName()' with 'getURI()' on Model. Update of testcase to reflect
ongoing reality.

Modified:
development/main/metro/automation/control/src/main/net/dpml/automation/control/Controller.java
==============================================================================
---
development/main/metro/automation/control/src/main/net/dpml/automation/control/Controller.java
(original)
+++
development/main/metro/automation/control/src/main/net/dpml/automation/control/Controller.java
Fri Apr 8 03:58:46 2005
@@ -36,6 +36,26 @@
public interface Controller extends Control
{
/**
+ * Return a resource relative to the supplied urn. Standard
+ * urn values are listed in the following table.
+ *
+ * <ol>
+ * <li>system:domain.uri</li>
+ * <li>system:work.dir</li>
+ * <li>system:temp.dir</li>
+ * <li>model:name</li>
+ * <li>model:urn</li>
+ * <li>model:partition</li>
+ * </ol>
+ *
+ * @param model the model
+ * @param urn the uniform resource identifier
+ * @return the resource
+ * @exception IllegalStateException if the supplied urn is not valid
+ */
+ Object getResource( Model model, URI urn );
+
+ /**
* Return the model for a supplied part.
*
* @param partition the enclosing partition
@@ -43,19 +63,18 @@
* @param part the part datastructure
* @return the model
*/
- Model getModel( URI partition, ClassLoader parent, Part part )
+ Model getModel( ClassLoader parent, Part part )
throws DelegationException, ModelException;

/**
* Return the model for a supplied part.
*
* @param model the enclosing model
- * @param partition the enclosing partition
* @param parent the parent classloader
* @param part the part datastructure
* @return the model
*/
- Model getModel( Model model, URI partition, ClassLoader parent, Part
part )
+ Model getModel( Model model, ClassLoader parent, Part part )
throws DelegationException, ModelException;

/**
@@ -95,23 +114,8 @@
/**
* Return a model identified by the supplied path within the supplied
model.
* @param model the enclosing model
- * @param path the nested part address
- * @return the nested model or null if the model is not found
- */
- //Model getProvider( Model model, String path );
-
- /**
- * Return a model identified by the supplied path within the supplied
model.
- * @param model the enclosing model
* @param uri the nested part address
* @return the nested model or null if the model is not found
*/
- Model getProvider( Model model, URI uri );
-
- /**
- * Dispose of the supplied model.
- *
- * @param model the model to apply disposal to
- */
- void dispose( Model model );
+ Model getModel( Model model, URI uri );
}

Modified:
development/main/metro/automation/control/src/main/net/dpml/automation/model/Model.java
==============================================================================
---
development/main/metro/automation/control/src/main/net/dpml/automation/model/Model.java
(original)
+++
development/main/metro/automation/control/src/main/net/dpml/automation/model/Model.java
Fri Apr 8 03:58:46 2005
@@ -32,14 +32,27 @@
*/
public interface Model
{
+ /**
+ * Return the primary controller assigned to the model.
+ * @return the primary controller
+ */
+ Controller getController();
+
+ /**
+ * Return a resource relative to the supplied urn.
+ *
+ * @param urn the uniform resource identifier
+ * @return the resource
+ * @exception IllegalStateException if the supplied urn is not valid
+ */
+ Object getResource( URI urn );
+
String getName();

URI getPartition();

URI getURI();

- Controller getController();
-
Object create() throws Exception;

Object resolve() throws Exception;

Modified:
development/main/metro/composition/api/src/main/net/dpml/composition/data/ValueDirective.java
==============================================================================
---
development/main/metro/composition/api/src/main/net/dpml/composition/data/ValueDirective.java
(original)
+++
development/main/metro/composition/api/src/main/net/dpml/composition/data/ValueDirective.java
Fri Apr 8 03:58:46 2005
@@ -60,6 +60,7 @@
// state

//--------------------------------------------------------------------------

+ private final String m_key;
private final String m_classname;
private final String m_local;
private final Value[] m_values;
@@ -68,18 +69,23 @@
// constructors

//--------------------------------------------------------------------------

- public ValueDirective( String classname, String value )
+ public ValueDirective( String key, String classname, String value )
{
if( null == classname )
{
throw new NullPointerException( "classname" );
}
+ if( null == key )
+ {
+ throw new NullPointerException( "key" );
+ }
+ m_key = key;
m_classname = classname;
m_local = value;
m_values = new Value[0];
}

- public ValueDirective( String classname, Value[] values )
+ public ValueDirective( String key, String classname, Value[] values )
{
if( null == classname )
{
@@ -89,6 +95,11 @@
{
throw new NullPointerException( "values" );
}
+ if( null == key )
+ {
+ throw new NullPointerException( "key" );
+ }
+ m_key = key;
m_classname = classname;
m_values = values;
m_local = null;
@@ -111,6 +122,11 @@
// ValueDirective

//--------------------------------------------------------------------------

+ public String getKey()
+ {
+ return m_key;
+ }
+
public String getClassname()
{
return m_classname;
@@ -139,7 +155,11 @@
else
{
ValueDirective value = (ValueDirective) other;
- if( false == equals( m_classname, value.getClassname() ) )
+ if( false == equals( m_key, value.getKey() ) )
+ {
+ return false;
+ }
+ else if( false == equals( m_classname, value.getClassname() ) )
{
return false;
}
@@ -171,7 +191,7 @@

public int hashCode()
{
- int hash = getClass().getName().hashCode();
+ int hash = m_key.hashCode();
if( null != m_classname )
{
hash ^= m_classname.hashCode();
@@ -244,10 +264,12 @@
{
if( null == classname )
{
- throw new NullArgumentException( "classname" );
+ m_classname = "java.lang.String";
+ }
+ else
+ {
+ m_classname = classname;
}
-
- m_classname = classname;
m_children = new Value[ 0 ];
m_argument = value;
}

Modified:
development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ContextDirectiveTestCase.java
==============================================================================
---
development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ContextDirectiveTestCase.java
(original)
+++
development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ContextDirectiveTestCase.java
Fri Apr 8 03:58:46 2005
@@ -83,7 +83,7 @@
{
String key = "key";
String val = "val";
- ValueDirective imp = new ValueDirective( "xxx", "yyy" );
+ ValueDirective imp = new ValueDirective( key, "xxx", "yyy" );
PartReference[] entries =
new PartReference[]{ new PartReference( key, imp ) };
ContextDirective cd = new ContextDirective( entries );
@@ -99,7 +99,7 @@
{
String key = "key";
String val = "val";
- ValueDirective imp = new ValueDirective( "xxx", "yyy" );
+ ValueDirective imp = new ValueDirective( key, "xxx", "yyy" );
PartReference ref = new PartReference( key, imp );
PartReference[] entries =
new PartReference[]{ ref };

Modified:
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/EntryDataType.java
==============================================================================
---
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/EntryDataType.java
(original)
+++
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/EntryDataType.java
Fri Apr 8 03:58:46 2005
@@ -98,15 +98,6 @@
return new PartReference( key, part );
}

- //---------------------------------------------------------------------
- // PartBuilder
- //---------------------------------------------------------------------
-
- //public Part buildPart( ClassLoader classloader )
- //{
- // return getValueDirective( classloader );
- //}
-
/**
* Return a urn identitifying the part handler for this builder.
*
@@ -165,7 +156,7 @@
String value = getValue();
if( null != value )
{
- return new ValueDirective( classname, value );
+ return new ValueDirective( key, classname, value );
}
else
{
@@ -176,7 +167,7 @@
ValueDataType p = params[i];
values[i] = p.constructValue();
}
- return new ValueDirective( classname, values );
+ return new ValueDirective( key, classname, values );
}
}


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
Fri Apr 8 03:58:46 2005
@@ -77,16 +77,18 @@
private final SystemContext m_system;
private final LifecycleHandler m_factory;
private final LifestyleHandler m_handler;
+ private final URI m_partition; // the root

//--------------------------------------------------------------------
// constructor
//--------------------------------------------------------------------

- public CompositionController( Monitor monitor, SystemContext system )
+ public CompositionController( Monitor monitor, SystemContext system, URI
partition )
{
super();
m_monitor = monitor;
m_system = system;
+ m_partition = partition;

m_factory = new LifecycleHandler( monitor, system );
m_handler = new LifestyleHandler( monitor, m_factory );
@@ -109,9 +111,85 @@
// Controller
//--------------------------------------------------------------------

+ /**
+ * Return a system resource relative to the supplied urn. Standard
+ * urn values are listed in the following table.
+ * <ol>
+ * <li>system:domain.uri</li>
+ * <li>system:work.dir</li>
+ * <li>system:temp.dir</li>
+ * <li>model:name</li>
+ * <li>model:urn</li>
+ * <li>model:partition</li>
+ * </ol>
+ * @param model the model
+ * @param urn the uniform resource identifier
+ * @return the resource
+ * @exception IllegalArgumentException if the urn is not recognized
+ */
+ public Object getResource( Model model, URI urn )
+ {
+ String scheme = urn.getScheme();
+ String key = urn.getSchemeSpecificPart();
+ if( "system".equals( scheme ) )
+ {
+ if( "domain.uri".equals( key ) )
+ {
+ return m_system.getDomain();
+ }
+ else if( "work.dir".equals( key ) )
+ {
+ return m_system.getWorkingDirectory();
+ }
+ else if( "temp.dir".equals( key ) )
+ {
+ return m_system.getTempDirectory();
+ }
+ else
+ {
+ final String error =
+ "Requested system resource urn ["
+ + urn
+ + "] is not recognized.";
+ throw new IllegalArgumentException( error );
+ }
+ }
+ else if( "model".equals( scheme ) )
+ {
+ if( "name".equals( key ) )
+ {
+ return model.getName();
+ }
+ else if( "partition".equals( key ) )
+ {
+ return model.getPartition();
+ }
+ else if( "uri".equals( key ) )
+ {
+ return model.getURI();
+ }
+ else
+ {
+ final String error =
+ "Requested model resource urn ["
+ + urn
+ + "] is not recognized.";
+ throw new IllegalArgumentException( error );
+ }
+ }
+ else
+ {
+ final String error =
+ "Requested resource urn ["
+ + urn
+ + "] is not recognized.";
+ throw new IllegalArgumentException( error );
+ }
+ }
+
public String getName()
{
- return "controller";
+ return m_partition.toString();
}

/**
@@ -122,9 +200,9 @@
* @param part the part datastructure
* @return the model
*/
- public Model getModel( URI partition, ClassLoader parent, Part part )
throws DelegationException, ModelException
+ public Model getModel( ClassLoader parent, Part part ) throws
DelegationException, ModelException
{
- return getModel( null, partition, parent, part );
+ return getModel( null, parent, part );
}

/**
@@ -136,17 +214,17 @@
* @param part the part datastructure
* @return the model
*/
- public Model getModel( Model model, URI partition, ClassLoader parent,
Part part ) throws DelegationException, ModelException
+ public Model getModel( Model model, ClassLoader parent, Part part )
throws DelegationException, ModelException
{
if( part instanceof ComponentProfile )
{
ComponentProfile profile = (ComponentProfile) part;
- return getComponentModel( model, partition, parent, profile );
+ return getComponentModel( model, parent, profile );
}
else if( part instanceof ValueDirective )
{
ValueDirective value = (ValueDirective) part;
- return getValueModel( model, partition, parent, value );
+ return getValueModel( model, parent, value );
}
else
{
@@ -157,7 +235,7 @@
}
else
{
- return getForeignModel( model, partition, parent, part, uri
);
+ return getForeignModel( model, parent, part, uri );
}
}
}
@@ -266,42 +344,12 @@
}
}

- /**
- * Return a component model using a supplied path using the supplied
- * model as the source for path resolution. If the model is a standard
- * composition model the implementation will attempt to resolve the path
- * using internal parts. If that is not successfull, the implementation
- * will attempt to resolve the path relative to the registered context
- * entries. If this fails, a null value will be returned. If the supplied
- * model is not a composition model then the request will be delegated to
- * the models controller.
- *
- * @param model the model to use for path resolution
- * @param uri the path identifying a internal part or context entry
- */
- public Model getProvider( Model model, URI uri )
+ public Model getModel( Model model, URI uri )
{
if( model instanceof StandardComponentModel )
{
- final String scheme = uri.getScheme();
- final String path = uri.getSchemeSpecificPart();
StandardComponentModel m = (StandardComponentModel) model;
- if( "parts".equals( scheme ) )
- {
- return m.getPart( path );
- }
- else if( "context".equals( scheme ) )
- {
- return m.getProvider( path );
- }
- else
- {
- final String error =
- "Unrecognized reference uri ["
- + uri
- + "].";
- throw new ControlRuntimeException( error );
- }
+ return m.getModel( uri );
}
else if( model instanceof ValueModel )
{
@@ -309,53 +357,8 @@
}
else
{
- return model.getController().getProvider( model, uri );
- }
- }
-
- /**
- * Dispose of the controller.
- */
- public void dispose()
- {
- }
-
- /**
- * Dispose of the supplied model.
- *
- * @param model the model to apply disposal to
- */
- public void dispose( Model model )
- {
- /*
- if( getMonitor().isDebugEnabled() )
- {
- final String message =
- "Initialting disposal of the model ["
- + model.getQualifiedName()
- + "].";
- getMonitor().debug( message );
- }
-
- if( model instanceof StandardComponentModel )
- {
- StandardComponentModel cModel = (StandardComponentModel) model;
- Object[] keys = cModel.keys();
- for( int i=(keys.length -1); i>-1; i-- )
- {
- Object key = keys[i];
- Object object = cModel.get( key );
- if( null != object )
- {
- m_factory.etherialize( object );
- }
- }
- }
- else
- {
- model.getController().dispose( model );
+ return model.getController().getModel( model, uri );
}
- */
}

//--------------------------------------------------------------------
@@ -398,10 +401,11 @@
* @return the model
*/
public StandardComponentModel getComponentModel(
- Model model, URI partition, ClassLoader parent, ComponentProfile
profile )
+ Model model, ClassLoader parent, ComponentProfile profile )
throws DelegationException, ModelException
{
getMonitor().debug( "creating nested model using " + profile );
+ URI partition = getPartition( model );
ClassLoader classloader = getClassLoader( partition, parent, profile
);
if( null == model )
{
@@ -413,6 +417,18 @@
}
}

+ private URI getPartition( Model model )
+ {
+ if( null == model )
+ {
+ return m_partition;
+ }
+ else
+ {
+ return model.getURI();
+ }
+ }
+
/**
* Return the model for a supplied part.
*
@@ -422,11 +438,12 @@
* @param profile the part profile
* @return the model
*/
- public ValueModel getValueModel(
- Model model, URI partition, ClassLoader parent, ValueDirective value )
+ private ValueModel getValueModel(
+ Model model, ClassLoader parent, ValueDirective directive )
throws DelegationException, ModelException
{
- return new ValueModel( this, parent, value, new Hashtable() );
+ String key = directive.getKey();
+ return new ValueModel( key, this, parent, directive, model );
}

//--------------------------------------------------------------------
@@ -455,7 +472,9 @@
* @param uri the part controller uri
* @return the part model
*/
- private Model getForeignModel( Model parent, URI partition, ClassLoader
classloader, Part part, URI uri ) throws DelegationException
+ private Model getForeignModel(
+ Model parent, ClassLoader classloader, Part part, URI uri )
+ throws DelegationException
{
try
{
@@ -463,11 +482,11 @@
Controller controller = handler.getController();
if( null == parent )
{
- return controller.getModel( partition, classloader, part );
+ return controller.getModel( classloader, part );
}
else
{
- return controller.getModel( parent, partition, classloader,
part );
+ return controller.getModel( parent, classloader, part );
}
}
catch( HandlerNotFoundException e )
@@ -563,7 +582,7 @@
return createURI( scheme, partition, id );
}

- private static URI createURI( String scheme, String path )
+ public static URI createURI( String scheme, String path )
{
return createURI( scheme, path, null );
}

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
Fri Apr 8 03:58:46 2005
@@ -70,7 +70,7 @@

public CompositionManager( SystemContext system )
{
- super( new DefaultMonitor( system.getLogger() ), system );
+ super( new DefaultMonitor( system.getLogger() ), system,
createPartition( system ) );

URI partition = createPartition( system );
ClassLoader anchor = Logger.class.getClassLoader();
@@ -141,9 +141,8 @@
private Model installPart( Part part )
throws DelegationException, ModelException
{
- URI partition = getPartition();
ClassLoader classloader = getClassLoader();
- Model model = getModel( partition, classloader, part );
+ Model model = getModel( classloader, part );
m_models.add( model );
return model;
}

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/control/ContextInvocationHandler.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/control/ContextInvocationHandler.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/ContextInvocationHandler.java
Fri Apr 8 03:58:46 2005
@@ -129,44 +129,9 @@

String name = method.getName();
String key = getKeyFromMethod( method );
- final Model provider = m_model.getProvider( key );
- if( provider instanceof StandardEntryModel )
- {
- StandardEntryModel sem = (StandardEntryModel) provider;
- URI uri = sem.getEntryURI();
- String urn = uri.getSchemeSpecificPart();
- if( "composition:name".equals( urn ) )
- {
- return m_model.getName();
- }
- else if( "composition:partition".equals( urn ) )
- {
- return m_model.getPartition();
- }
- else if( "composition:uri".equals( urn ) )
- {
- if( null == m_uri )
- {
- return m_model.getURI();
- }
- else
- {
- return m_uri;
- }
- }
- else
- {
- final String error =
- "Context entry urn ["
- + urn
- + "] not recognized.";
- throw new IllegalArgumentException( error );
- }
- }
- else
- {
- return getInstance( key, provider, args );
- }
+ URI uri = CompositionController.createURI( "context", key );
+ final Model provider = m_model.getModel( uri );
+ return getInstance( key, provider, args );
}

private Object getInstance( String key, Model provider, final Object[]
args )

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/models/EntryModel.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/models/EntryModel.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/models/EntryModel.java
Fri Apr 8 03:58:46 2005
@@ -64,6 +64,18 @@
// Model
//--------------------------------------------------------------

+ /**
+ * Return a resource relative to the supplied urn.
+ *
+ * @param urn the uniform resource identifier
+ * @return the resource
+ * @exception IllegalStateException if the supplied urn is not valid
+ */
+ public Object getResource( URI urn )
+ {
+ return m_controller.getResource( this, urn );
+ }
+
public Object create() throws Exception
{
return getValue();
@@ -88,24 +100,15 @@
return m_controller;
}

- public String getName()
- {
- throw new UnsupportedOperationException( "getName/0" );
- }
+ public abstract String getName();

- public URI getPartition()
- {
- throw new UnsupportedOperationException( "getPartition/0" );
- }
+ public abstract URI getPartition();

- public String getQualifiedName()
- {
- throw new UnsupportedOperationException( "getQualifiedName/0" );
- }
+ public abstract URI getURI();

- public URI getURI()
+ public Model getModel( URI uri )
{
- throw new UnsupportedOperationException( "getURI/0" );
+ return null;
}

//--------------------------------------------------------------
@@ -118,5 +121,4 @@
* @return the context entry value
*/
public abstract Object getValue() throws ModelException;
-
}

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/models/PartsModel.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/models/PartsModel.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/models/PartsModel.java
Fri Apr 8 03:58:46 2005
@@ -150,7 +150,7 @@
StandardComponentModel parent = getParentModel();
URI partition = getPartition();
ClassLoader classloader = getClassLoader();
- return getController().getModel( parent, partition, classloader,
part );
+ return getController().getModel( parent, classloader, part );
}

private void build()

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/models/StandardComponentModel.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/models/StandardComponentModel.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/models/StandardComponentModel.java
Fri Apr 8 03:58:46 2005
@@ -192,8 +192,8 @@
}
else
{
-
- Model m = loadPartReference( reference, controller,
classloader, parent );
+ Part part = reference.getPart();
+ Model m = loadModel( key, part, controller, classloader,
parent );
m_providers.put( key, m );
}
}
@@ -229,32 +229,51 @@
}
else
{
- Model m = loadPartReference( reference, controller,
classloader, parent );
+ Part part = reference.getPart();
+ Model m = loadModel( key, part, controller, classloader,
parent );
m_providers.put( key, m );
}
}
}

- private Model loadPartReference( PartReference reference, Controller
controller, ClassLoader classloader, Model parent )
+ /**
+ * Return a resource relative to the supplied urn.
+ *
+ * @param urn the uniform resource identifier
+ * @return the resource
+ * @exception IllegalStateException if the supplied urn is not valid
+ */
+ public Object getResource( URI urn )
+ {
+ return m_controller.getResource( this, urn );
+ }
+
+ /**
+ * <p>Load a part that is referenced by a PartReference. The part
reference contains a
+ * uri that identifies the part to include in this model. Recognized uri
schemes include
+ * the following:</p>
+ * <ol>
+ * <li>context:[key] - a reference to a context entry in the enclosing
model</p>
+ * <li>parts:[key] - a reference to a parts entry in the enclosing
model</p>
+ * </ol>
+ *
+ * @param reference the part reference
+ * @param controller the controller handling this part type
+ * @param classloader the assigned classloader
+ * @param parent the parent model
+ */
+ private Model loadModel( String key, Part part, Controller controller,
ClassLoader classloader, Model parent )
throws DelegationException, ModelException
{
- Part part = reference.getPart();
if( part instanceof ValueDirective )
{
- ValueDirective value = (ValueDirective) part;
- return new ValueModel( controller, classloader, value,
m_providers );
+ ValueDirective directive = (ValueDirective) part;
+ return new ValueModel( key, controller, classloader, directive,
this );
}
else if( part instanceof ReferenceDirective )
{
ReferenceDirective ref = (ReferenceDirective) part;
URI uri = ref.getURI();
-
- if( "entry".equals( uri.getScheme() ) )
- {
- String path = uri.getSchemeSpecificPart();
- return new StandardEntryModel( controller, uri );
- }
-
if( null == parent )
{
final String error =
@@ -265,8 +284,7 @@
+ "] which cannot be resolved as this component has no
enclosing parent.";
throw new ModelException( error );
}
-
- Model m = controller.getProvider( parent, uri );
+ Model m = controller.getModel( parent, uri );
if( null != m )
{
return m;
@@ -275,13 +293,13 @@
{
URI enclosing = parent.getURI();
Exception cause = new PartNotFoundException( enclosing, uri
);
- throw new ModelException( cause.getMessage(), cause );
+ String message = cause.getMessage();
+ throw new ModelException( message, cause );
}
}
else
{
- URI partition = getURI();
- return controller.getModel( this, partition, classloader, part
);
+ return controller.getModel( this, classloader, part );
}
}

@@ -354,28 +372,11 @@
return m_name;
}

- //public void setName( String name ) //??
- //{
- // if( null == name )
- // {
- // throw new NullPointerException( "name" );
- // }
- // if( false == name.equals( getName() ) )
- // {
- // m_name = name;
- // }
- //}
-
public URI getPartition()
{
return m_partition;
}

- //public String getQualifiedName()
- //{
- // return getURI().toString();
- //}
-
public URI getURI()
{
return m_uri;
@@ -401,7 +402,25 @@
return m_profile.getContextDirective();
}

- public Model getProvider( String key )
+ public Model getModel( URI uri )
+ {
+ final String scheme = uri.getScheme();
+ final String path = uri.getSchemeSpecificPart();
+ if( "parts".equals( scheme ) )
+ {
+ return getPart( path );
+ }
+ else if( "context".equals( scheme ) )
+ {
+ return getProvider( path );
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ private Model getProvider( String key )
{
return (Model) m_providers.get( key );
}

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/models/StandardEntryModel.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/models/StandardEntryModel.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/models/StandardEntryModel.java
Fri Apr 8 03:58:46 2005
@@ -61,6 +61,25 @@
}

//--------------------------------------------------------------
+ // Model
+ //--------------------------------------------------------------
+
+ public String getName()
+ {
+ return "annon"; // icky
+ }
+
+ public URI getPartition()
+ {
+ return m_uri; // really icky
+ }
+
+ public URI getURI()
+ {
+ return m_uri; // icky
+ }
+
+ //--------------------------------------------------------------
// EntryModel
//--------------------------------------------------------------


Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/models/ValueModel.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/models/ValueModel.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/models/ValueModel.java
Fri Apr 8 03:58:46 2005
@@ -23,10 +23,12 @@
import java.util.Map;

import net.dpml.automation.control.Controller;
+import net.dpml.automation.model.Model;
import net.dpml.automation.model.ModelException;

import net.dpml.composition.data.ValueDirective;
import net.dpml.composition.data.ValueDirective.Value;
+import net.dpml.composition.control.CompositionController;

import net.dpml.meta.info.EntryDescriptor;

@@ -42,9 +44,11 @@
// state
//--------------------------------------------------------------

+ private final String m_name;
+ private final URI m_uri;
private final ValueDirective m_directive;
private final ClassLoader m_classloader;
- private final Map m_map;
+ private final Model m_model;

private Object m_value;

@@ -60,7 +64,7 @@
* @exception NullArgumentException if either the directive argument or
the
* context argument is null.
*/
- public ValueModel( Controller controller, ClassLoader classloader,
ValueDirective directive, Map entries )
+ public ValueModel( String name, Controller controller, ClassLoader
classloader, ValueDirective directive, Model model )
throws ModelException, NullPointerException
{
super( controller );
@@ -68,13 +72,40 @@
{
throw new NullPointerException( "directive" );
}
+ if( null == model )
+ {
+ throw new NullPointerException( "model" );
+ }
+ if( null == name )
+ {
+ throw new NullPointerException( "name" );
+ }
+ m_name = name;
m_directive = directive;
m_classloader = classloader;
- m_map = entries;
+ m_model = model;
+
+ URI base = m_model.getURI();
+ m_uri = CompositionController.createURI( base, name );

//validate();
}

+ public String getName()
+ {
+ return m_name;
+ }
+
+ public URI getPartition()
+ {
+ return m_model.getURI();
+ }
+
+ public URI getURI()
+ {
+ return m_uri;
+ }
+
/*
private void validate()
throws ModelException
@@ -114,7 +145,6 @@
Class target = null;
try
{
- //target = m_classloader.loadClass( descriptorClassName );
target = getValueClass( classname );
}
catch( ClassNotFoundException e )
@@ -177,32 +207,36 @@
return m_value;
}

- //String target = m_descriptor.getKey();
- String target = "???";
- Object object = null;
+ String target = m_name;
try
{
- String classname = getReturnTypeClassname();
String argument = m_directive.getLocalValue();
- Value[] params = m_directive.getValues();
- Class clazz = getValueClass( classname );
- object = getValue( clazz, argument, params );
+ Object object = checkForURNReference( argument );
+ if( null == object )
+ {
+ String classname = getReturnTypeClassname();
+ Value[] params = m_directive.getValues();
+ Class clazz = getValueClass( classname );
+ object = getValue( clazz, argument, params );
+ }
+ //if( !m_descriptor.isVolatile() )
+ //{
+ // m_value = object;
+ //}
+
+ return object;
+
}
catch( Throwable e )
{
final String error =
- "Cannot establish a constructed context entry for the key "
- + target
- + " due to a runtime failure.";
+ "Cannot establish a constructed value in the model ["
+ + getURI()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
-
- //if( !m_descriptor.isVolatile() )
- //{
- // m_value = object;
- //}
-
- return object;
}

private String getReturnTypeClassname()
@@ -218,8 +252,13 @@
public Object getValue( Value p )
throws ModelException
{
- String classname = p.getClassname();
String argument = p.getArgument();
+ Object object = checkForURNReference( argument );
+ if( null != object )
+ {
+ return object;
+ }
+ String classname = p.getClassname();
Value[] params = p.getValueDirectives();
Class clazz = getValueClass( classname );
return getValue( clazz, argument, params );
@@ -236,12 +275,6 @@
public Object getValue( Class clazz, String argument, Value[] parameters
)
throws ModelException
{
- //
- // if the parameter contains a text argument then check if its a
reference
- // to a map entry (in the form"${<key>}" ), otherwise its a simple
constructor
- // case with a single string paremeter
- //
-
if( parameters.length == 0 )
{
if( argument == null )
@@ -276,14 +309,21 @@
catch ( InstantiationException e )
{
final String error =
- "Unable to instantiate instance of class: " +
clazz.getName();
+ "Unable to instantiate instance of class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
catch ( IllegalAccessException e )
{
final String error =
- "Cannot access null constructor for the class: '"
- + clazz.getName() + "'.";
+ "Cannot access null constructor for the class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
}
@@ -292,18 +332,21 @@
Class[] params = new Class[ parameters.length ];
for ( int i = 0; i < parameters.length; i++ )
{
- String classname = parameters[i].getClassname();
+ Value value = parameters[i];
try
{
- //params[i] = m_classloader.loadClass( classname );
- params[i] = getValueClass( classname );
+ params[i] = getValueClass( value );
}
catch ( Throwable e )
{
final String error =
- "Unable to resolve sub-parameter class: "
- + classname
- + " for the parameter " + clazz.getName();
+ "Unable to resolve sub-parameter class ["
+ + value.getClassname()
+ + "] for the parameter ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
}
@@ -320,9 +363,13 @@
catch ( Throwable e )
{
final String error =
- "Unable to instantiate sub-parameter for value: "
- + classname
- + " inside the parameter " + clazz.getName();
+ "Unable to instantiate sub-parameter for value ["
+ + classname
+ + "] inside the parameter ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
}
@@ -334,9 +381,11 @@
catch ( NoSuchMethodException e )
{
final String error =
- "Supplied parameters for "
- + clazz.getName()
- + " do not match the available class constructors.";
+ "Supplied parameters class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "] does not match the available class constructors.";
throw new ModelException( error, e );
}

@@ -347,27 +396,39 @@
catch ( InstantiationException e )
{
final String error =
- "Unable to instantiate an instance of a multi-parameter
constructor for class: '"
- + clazz.getName() + "'.";
+ "Unable to instantiate an instance of a multi-parameter
constructor for class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
catch ( IllegalAccessException e )
{
final String error =
- "Cannot access multi-parameter constructor for the class:
'"
- + clazz.getName() + "'.";
+ "Cannot access multi-parameter constructor for the class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
catch ( Throwable e )
{
final String error =
- "Unexpected error while attmpting to instantiate a
multi-parameter constructor "
- + "for the class: '" + clazz.getName() + "'.";
+ "Unexpected error while attempting to instantiate a
multi-parameter constructor for the class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
}
}

+
+
+
private Object getNullArgumentConstructorValue( Class clazz )
throws ModelException
{
@@ -378,21 +439,31 @@
catch ( InstantiationException e )
{
final String error =
- "Unable to instantiate instance of class: " + clazz.getName();
+ "Unable to instantiate instance of class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
catch ( IllegalAccessException e )
{
final String error =
- "Cannot access null parameter constructor for the class: '"
- + clazz.getName() + "'.";
+ "Cannot access null parameter constructor for the class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
catch ( Throwable e )
{
final String error =
- "Unexpected exception while creating the class: '"
- + clazz.getName() + "'.";
+ "Unexpected exception while creating the class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
}
@@ -400,36 +471,10 @@
private Object getSingleArgumentConstructorValue( Class clazz, String
argument )
throws ModelException
{
- if ( argument.startsWith( "${" ) )
+ Object object = checkForURNReference( argument );
+ if( null != object )
{
- if ( argument.endsWith( "}" ) )
- {
- final String key = argument.substring( 2, argument.length()
- 1 );
- Object value = m_map.get( key );
- if ( value != null )
- {
- if( value instanceof EntryModel )
- {
- return ((EntryModel)value).getValue();
- }
- else
- {
- return value;
- }
- }
- else
- {
- final String error =
- "Unresolvable context value: '" + key + "'.";
- throw new ModelException( error );
- }
- }
- else
- {
- final String error =
- "Illegal format for context reference: '" + argument +
"'.";
- throw new ModelException( error );
- }
+ return object;
}
else
{
@@ -453,29 +498,43 @@
catch ( NoSuchMethodException e )
{
final String error =
- "Class: '" + clazz.getName()
- + "' does not implement a single string argument
constructor.";
+ "Class: ["
+ + clazz.getName()
+ + "] referenced withing the value type ["
+ + getURI()
+ + "] does not implement a single string argument
constructor.";
throw new ModelException( error );
}
catch ( InstantiationException e )
{
final String error =
- "Unable to instantiate instance of class: " +
clazz.getName()
- + " with the single argument: '" + argument + "'";
+ "Unable to instantiate instance of class ["
+ + clazz.getName()
+ + "] with the single argument ["
+ + argument
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
catch ( IllegalAccessException e )
{
final String error =
- "Cannot access single string parameter constructor for the
class: '"
- + clazz.getName() + "'.";
+ "Cannot access single string parameter constructor for the
class: ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
catch ( Throwable e )
{
final String error =
- "Unexpected exception while creating a single string
parameter value for the class: '"
- + clazz.getName() + "'.";
+ "Unexpected exception while creating a single string
parameter value for the class ["
+ + clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ + "].";
throw new ModelException( error, e );
}
}
@@ -516,6 +575,8 @@
final String error =
"The primitive return type ["
+ clazz.getName()
+ + "] withing the value type ["
+ + getURI()
+ "] is not supported.";
throw new ModelException( error );
}
@@ -526,6 +587,26 @@
* @return the parameter class
* @exception ModelException if the parameter class cannot be resolved
*/
+ Class getValueClass( Value value ) throws ModelException
+ {
+ String v = value.getArgument();
+ Object object = checkForURNReference( v );
+ if( null != object )
+ {
+ return object.getClass();
+ }
+ else
+ {
+ String classname = value.getClassname();
+ return getValueClass( classname );
+ }
+ }
+
+ /**
+ * Return the classname of the parameter implementation to use.
+ * @return the parameter class
+ * @exception ModelException if the parameter class cannot be resolved
+ */
Class getValueClass( String classname ) throws ModelException
{
try
@@ -576,10 +657,38 @@
}
else
{
- throw new ModelException(
- "Could not locate the parameter implementation for class:
'"
- + classname + "'.", e );
+ final String error =
+ "Could not locate the implementation for class ["
+ + classname
+ + "] withing the value type ["
+ + getURI()
+ + "].";
+ throw new ModelException( error, e );
}
}
}
+
+ private Object checkForURNReference( String argument )
+ {
+ if( null == argument )
+ {
+ return null;
+ }
+ else if ( argument.startsWith( "urn:system:" ) )
+ {
+ String arg = argument.substring( 11 );
+ URI urn = CompositionController.createURI( "system", arg );
+ return m_model.getResource( urn );
+ }
+ else if ( argument.startsWith( "urn:model:" ) )
+ {
+ String arg = argument.substring( 10 );
+ URI urn = CompositionController.createURI( "model", arg );
+ return m_model.getResource( urn );
+ }
+ else
+ {
+ return null;
+ }
+ }
}

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/data/builder/XMLComponentProfileCreator.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/data/builder/XMLComponentProfileCreator.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/data/builder/XMLComponentProfileCreator.java
Fri Apr 8 03:58:46 2005
@@ -248,14 +248,14 @@
String value = conf.getValue( null );
if( null != value )
{
- ValueDirective directive = new ValueDirective( classname,
value );
+ ValueDirective directive = new ValueDirective( key,
classname, value );
return new PartReference( key, directive );
}
else
{
Configuration[] configs = conf.getChildren( "param" );
Value[] params = getParameters( configs );
- ValueDirective directive = new ValueDirective( classname,
params );
+ ValueDirective directive = new ValueDirective( key,
classname, params );
return new PartReference( key, directive );
}
}
@@ -289,13 +289,13 @@
if( paramsConf.length > 0 )
{
Value[] params = getParameters( paramsConf );
- ValueDirective v = new ValueDirective(
constructorClassname, params );
+ ValueDirective v = new ValueDirective( key,
constructorClassname, params );
return new PartReference( key, v );
}
else
{
ValueDirective v = new ValueDirective(
- constructorClassname, (String) child.getValue( null )
);
+ key, constructorClassname, (String) child.getValue(
null ) );
return new PartReference( key, v );
}
}

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultEntryModel.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultEntryModel.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultEntryModel.java
Fri Apr 8 03:58:46 2005
@@ -91,11 +91,6 @@
throw new UnsupportedOperationException( "getController/0" );
}

- public String getQualifiedName()
- {
- throw new UnsupportedOperationException( "getQualifiedName/0" );
- }
-
public URI getPartition()
{
throw new UnsupportedOperationException( "getQualifiedName/0" );
@@ -111,6 +106,10 @@
throw new UnsupportedOperationException( "getName/0" );
}

+ public Object getResource( URI urn )
+ {
+ throw new UnsupportedOperationException( "getResource/0" );
+ }

//==============================================================
// EntryModel

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultImportModel.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultImportModel.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultImportModel.java
Fri Apr 8 03:58:46 2005
@@ -31,8 +31,6 @@

import net.dpml.meta.info.EntryDescriptor;

-
-
/**
* Default implementation of a the context entry import model.
*

Modified: development/main/metro/composition/testing/acme/build.xml
==============================================================================
--- development/main/metro/composition/testing/acme/build.xml (original)
+++ development/main/metro/composition/testing/acme/build.xml Fri Apr 8
03:58:46 2005
@@ -21,10 +21,13 @@
<value key="foo" value="bar"/>
<value key="width" value="12"/>
<value key="height" value="100"/>
- <reference key="name" uri="entry:composition:name"/>
- <reference key="uRI" uri="entry:composition:uri"/>
- <reference key="partition" uri="entry:composition:partition"/>
- <value key="workingDirectory" value="acme/workspace"/>
+ <value key="name" value="urn:model:name"/>
+ <value key="partition" value="urn:model:partition"/>
+ <value key="componentURI" value="urn:model:uri"/>
+ <value key="workingDirectory">
+ <value class="java.io.File" value="urn:system:work.dir"/>
+ <value value="acme/workspace"/>
+ </value>
<value key="dimension"
class="net.dpml.composition.testing.Dimension">
<value class="int" value="35"/>
<value class="int" value="21"/>

Modified:
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/WidgetComponent.java
==============================================================================
---
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/WidgetComponent.java
(original)
+++
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/WidgetComponent.java
Fri Apr 8 03:58:46 2005
@@ -77,9 +77,10 @@
m_context = context;
m_logger = logger;

- m_name = m_context.getName();
- URI uri = m_context.getURI();
- File work = m_context.getWorkingDirectory();
+ m_name = context.getName();
+ URI uri = context.getComponentURI();
+ File work = context.getWorkingDirectory();
+ URI partition = context.getPartition();

final String message =
"Widget created with a uri ["
@@ -168,7 +169,7 @@
public interface Context
{
URI getPartition();
- URI getURI();
+ URI getComponentURI();
String getName();
String getFoo();
int getWidth();

Modified: development/main/metro/composition/testing/unit/build.xml
==============================================================================
--- development/main/metro/composition/testing/unit/build.xml (original)
+++ development/main/metro/composition/testing/unit/build.xml Fri Apr 8
03:58:46 2005
@@ -29,13 +29,17 @@
<value class="int" value="35"/>
<value class="int" value="21"/>
</value>
- <reference key="name" uri="entry:composition:name"/>
- <reference key="uRI" uri="entry:composition:uri"/>
- <reference key="partition" uri="entry:composition:partition"/>
- <value key="workingDirectory" value="acme/workspace"/>
+ <value key="name" value="urn:model:name"/>
+ <value key="partition" value="urn:model:partition"/>
+ <value key="componentURI" value="urn:model:uri"/>
+ <value key="workingDirectory">
+ <value class="java.io.File" value="urn:system:work.dir"/>
+ <value value="acme/workspace"/>
+ </value>
</context>
</component>

+
<!--
Composite component example.
This is a example of a composite component (the AcmeContainer class)
@@ -46,7 +50,13 @@
thereby demonstrating optional context entry semantic. A feature of
this example is the usage of a reference element as the mechanisms
to wire the context 'widget' part into the context supplied to the
- 'gizmo' component.
+ 'gizmo' component. Wiring of dependencies is explicit and handled
+ by the reference element within Gizm's context. The reference element
+ declares the the context entry for the key 'widget', supplied to
+ Gizmo shall be the slected from the 'parts' of the enclosing component
+ using the name 'widget' (where the uri is in the form [scope]:[name] and
+ scope may be one of 'context' or 'parts' refering respectivly to the
+ enclosing components parts or context).
-->
<component dest="target/test/acme-container.part"
xmlns="plugin:dpml/composition/dpml-composition-builder"
@@ -58,10 +68,13 @@
<value key="foo" value="bar"/>
<value key="width" value="12"/>
<value key="height" value="100"/>
- <value key="workingDirectory" value="acme/workspace"/>
- <reference key="name" uri="entry:composition:name"/>
- <reference key="uRI" uri="entry:composition:uri"/>
- <reference key="partition" uri="entry:composition:partition"/>
+ <value key="workingDirectory">
+ <value class="java.io.File" value="urn:system:work.dir"/>
+ <value value="acme/workspace"/>
+ </value>
+ <value key="name" value="urn:model:name"/>
+ <value key="partition" value="urn:model:partition"/>
+ <value key="componentURI" value="urn:model:uri"/>
</context>
</component>
<component name="gizmo"
class="net.dpml.composition.testing.GizmoComponent">
@@ -78,7 +91,7 @@
constructed value along the lines of values we add to context entries.
In this example we are using the same composite component - demonstrating
the complete separation of requirement (provided by class introspection)
from
- solution (provided in the directives generated here).
+ the solution (provided in the directives generated here).
-->
<component dest="target/test/acme-test-container.part"
xmlns="plugin:dpml/composition/dpml-composition-builder"



  • svn commit: r2245 - in development/main/metro: automation/control/src/main/net/dpml/automation/control automation/control/src/main/net/dpml/automation/model composition/api/src/main/net/dpml/composition/data composition/api/src/test/net/dpml/composition/data/test composition/builder/src/main/net/dpml/composition/builder/datatypes composition/control/src/main/net/dpml/composition/control composition/control/src/main/net/dpml/composition/models composition/impl/src/main/net/dpml/composition/data/builder composition/impl/src/main/net/dpml/composition/model/impl composition/testing/acme composition/testing/acme/src/main/net/dpml/composition/testing composition/testing/unit, mcconnell, 04/07/2005

Archive powered by MHonArc 2.6.24.

Top of Page