Skip to Content.
Sympa Menu

notify-dpml - r1330 - in trunk/main: central/src/docs/metro/util metro metro/job metro/model/src/main/net/dpml/metro metro/model/src/main/net/dpml/metro/data metro/model/src/test/net/dpml/metro/data/test metro/runtime/src/main/net/dpml/metro/builder metro/runtime/src/main/net/dpml/metro/runtime planet/http station station/api/src/main/net/dpml/station/info station/exec/src/main/net/dpml/station/exec transit/core/src/main/net/dpml/lang util

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1330 - in trunk/main: central/src/docs/metro/util metro metro/job metro/model/src/main/net/dpml/metro metro/model/src/main/net/dpml/metro/data metro/model/src/test/net/dpml/metro/data/test metro/runtime/src/main/net/dpml/metro/builder metro/runtime/src/main/net/dpml/metro/runtime planet/http station station/api/src/main/net/dpml/station/info station/exec/src/main/net/dpml/station/exec transit/core/src/main/net/dpml/lang util
  • Date: Thu, 6 Apr 2006 20:17:22 +0200

Author: mcconnell
Date: 2006-04-06 20:17:15 +0200 (Thu, 06 Apr 2006)
New Revision: 1330

Added:
trunk/main/metro/job/
trunk/main/metro/job/impl/
Removed:
trunk/main/central/src/docs/metro/util/configuration/
trunk/main/central/src/docs/metro/util/parameters/
trunk/main/metro/job/impl/

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ConfigurationInvocationHandler.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ParametersInvocationHandler.java
trunk/main/util/configuration/
trunk/main/util/job/
trunk/main/util/parameters/
Modified:
trunk/main/central/src/docs/metro/util/navigation.xml
trunk/main/metro/model/src/main/net/dpml/metro/ComponentModel.java
trunk/main/metro/model/src/main/net/dpml/metro/data/ComponentDirective.java

trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
trunk/main/metro/module.xml

trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentDecoder.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
trunk/main/planet/http/module.xml

trunk/main/station/api/src/main/net/dpml/station/info/ApplicationDescriptor.java

trunk/main/station/exec/src/main/net/dpml/station/exec/ApplicationHandler.java
trunk/main/station/module.xml
trunk/main/transit/core/src/main/net/dpml/lang/Builder.java
trunk/main/util/module.xml
Log:
remove configuration and parameters

Modified: trunk/main/central/src/docs/metro/util/navigation.xml
===================================================================
--- trunk/main/central/src/docs/metro/util/navigation.xml 2006-04-06
17:32:31 UTC (rev 1329)
+++ trunk/main/central/src/docs/metro/util/navigation.xml 2006-04-06
18:17:15 UTC (rev 1330)
@@ -28,10 +28,8 @@
<menu>
<item name="Activity" href="activity/index.html"/>
<item name="CommandLine" href="cli/index.html"/>
- <item name="Configuration" href="configuration/index.html"/>
<item name="Internationalization" href="i18n/index.html"/>
<item name="Logging" href="logging/index.html"/>
- <item name="Parameters" href="parameters/index.html"/>
</menu>

</body>

Copied: trunk/main/metro/job (from rev 1324, trunk/main/util/job)

Copied: trunk/main/metro/job/impl (from rev 1329, trunk/main/util/job/impl)

Modified: trunk/main/metro/model/src/main/net/dpml/metro/ComponentModel.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ComponentModel.java
2006-04-06 17:32:31 UTC (rev 1329)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ComponentModel.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -26,10 +26,6 @@
import net.dpml.metro.info.CollectionPolicy;
import net.dpml.metro.data.CategoryDirective;

-import net.dpml.configuration.Configuration;
-
-import net.dpml.parameters.Parameters;
-
import net.dpml.lang.Classpath;

/**
@@ -90,20 +86,6 @@
CollectionPolicy getCollectionPolicy() throws RemoteException;

/**
- * Return the component configuration.
- * @return the configuration
- * @exception RemoteException if a remote exception occurs
- */
- Configuration getConfiguration() throws RemoteException;
-
- /**
- * Return the component parameters.
- * @return the parameters
- * @exception RemoteException if a remote exception occurs
- */
- Parameters getParameters() throws RemoteException;
-
- /**
* Return the component logging categories.
* @return the categories
* @exception RemoteException if a remote exception occurs

Modified:
trunk/main/metro/model/src/main/net/dpml/metro/data/ComponentDirective.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/data/ComponentDirective.java
2006-04-06 17:32:31 UTC (rev 1329)
+++
trunk/main/metro/model/src/main/net/dpml/metro/data/ComponentDirective.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -24,11 +24,6 @@
import net.dpml.component.ActivationPolicy;
import net.dpml.component.Directive;

-import net.dpml.configuration.Configuration;
-
-import net.dpml.parameters.Parameters;
-
-
/**
* Definition of the criteria for an explicit component profile. A profile,
when
* included within the scope of a container declaration will be instantiated
in
@@ -79,24 +74,6 @@
&lt;include name="<font color="darkred">urn:avalon:home</font>"
key="<font color="darkred">home</font>"/&gt;
&lt;/context&gt;

- <font color="gray"><i>&lt;!--
- Apply the following configuration when instantiating the component. This
configuration
- will be applied as the primary configuration in a cascading configuration
chain. A
- type may declare a default configuration under a "classname".xconfig file
that will be
- used to dereference any configuration requests not resolvable by the
configuration
- supplied here.
- --&gt;</i></font>
-
- &lt;configuration&gt;
- &lt;message value="<font color="darkred">Hello</font>"/&gt;
- &lt;/configuration&gt;
-
- <font color="gray"><i>&lt;!--
- The parameterization criteria from this instance of the component type.
- --&gt;</i></font>
-
- &lt;parameters/&gt;
-
&lt;/component&gt;
</pre>
*
@@ -134,16 +111,6 @@
private final String m_classname;

/**
- * The parameters for component (if any).
- */
- private final Parameters m_parameters;
-
- /**
- * The configuration for component (if any).
- */
- private final Configuration m_configuration;
-
- /**
* The components context directive.
*/
private final ContextDirective m_context;
@@ -166,7 +133,7 @@
CollectionPolicy.SYSTEM,
LifestylePolicy.TRANSIENT,
classname,
- null, null, null, null, null );
+ null, null, null );
}

/**
@@ -184,8 +151,6 @@
template.getClassname(),
template.getCategoriesDirective(),
template.getContextDirective(),
- template.getParameters(),
- template.getConfiguration(),
template.getPartReferences() );
}

@@ -198,8 +163,6 @@
* @param classname the component classname
* @param categories logging categories
* @param context context directive
- * @param parameters the default parameters
- * @param config the default configuration
* @param parts the component internal parts
*/
public ComponentDirective(
@@ -210,8 +173,6 @@
final String classname,
final CategoriesDirective categories,
final ContextDirective context,
- final Parameters parameters,
- final Configuration config,
final PartReference[] parts )
{
super( name, activation, categories, parts );
@@ -236,8 +197,6 @@

m_lifestyle = lifestyle;
m_collection = collection;
- m_parameters = parameters;
- m_configuration = config;
}


//--------------------------------------------------------------------------
@@ -286,27 +245,6 @@
}

/**
- * Return the Parameters for the profile.
- *
- * @return the Parameters for Component (possibly null).
- */
- public Parameters getParameters()
- {
- return m_parameters;
- }
-
- /**
- * Return the base Configuration for the profile. The implementation
- * garantees that the supplied configuration is not null.
- *
- * @return the base Configuration for profile.
- */
- public Configuration getConfiguration()
- {
- return m_configuration;
- }
-
- /**
* Returns a string representation of the profile.
* @return a string representation
*/
@@ -347,18 +285,7 @@
{
return false;
}
- if( !equals( m_lifestyle, profile.getLifestylePolicy() ) )
- {
- return false;
- }
- if( !equals( m_parameters, profile.getParameters() ) )
- {
- return false;
- }
- else
- {
- return equals( m_configuration, profile.getConfiguration() );
- }
+ return equals( m_lifestyle, profile.getLifestylePolicy() );
}

/**
@@ -378,14 +305,6 @@
{
hash ^= m_lifestyle.hashCode();
}
- if( !( null == m_parameters ) )
- {
- hash ^= m_parameters.hashCode();
- }
- if( !( null == m_configuration ) )
- {
- hash ^= m_configuration.hashCode();
- }
return hash;
}
}

Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
2006-04-06 17:32:31 UTC (rev 1329)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -26,12 +26,6 @@
import net.dpml.metro.info.LifestylePolicy;
import net.dpml.metro.info.PartReference;

-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.impl.DefaultConfiguration;
-
-import net.dpml.parameters.Parameters;
-import net.dpml.parameters.impl.DefaultParameters;
-
import net.dpml.component.ActivationPolicy;

/**
@@ -49,8 +43,6 @@
private String m_classname;
private CategoriesDirective m_categories;
private ContextDirective m_context;
- private Parameters m_parameters;
- private Configuration m_configuration;
private ComponentDirective m_directive;
private PartReference[] m_parts;

@@ -67,13 +59,11 @@
m_classname = ComponentDirectiveTestCase.class.getName();
m_categories = new CategoriesDirective( new CategoryDirective[0] );
m_context = new ContextDirective( new PartReference[0] );
- m_parameters = DefaultParameters.EMPTY_PARAMETERS;
- m_configuration = new DefaultConfiguration( "" );
m_parts = new PartReference[0];
m_directive =
new ComponentDirective(
m_name, m_activation, m_collection, m_lifestyle, m_classname,
- m_categories, m_context, m_parameters, m_configuration, m_parts
);
+ m_categories, m_context, m_parts );
}

/**
@@ -104,7 +94,7 @@
{
new ComponentDirective(
"", m_activation, m_collection, m_lifestyle, m_classname,
- m_categories, m_context, m_parameters, m_configuration, null );
+ m_categories, m_context, null );
fail( "Did not throw an IllegalArgumentException for a '' name."
);
}
catch( IllegalArgumentException e )
@@ -122,7 +112,7 @@
{
new ComponentDirective(
"fred.blogs", m_activation, m_collection, m_lifestyle,
m_classname,
- m_categories, m_context, m_parameters, m_configuration, null );
+ m_categories, m_context, null );
fail( "Did not throw an IllegalArgumentException for a name with
a period." );
}
catch( IllegalArgumentException e )
@@ -140,7 +130,7 @@
{
new ComponentDirective(
"fred,blogs", m_activation, m_collection, m_lifestyle,
m_classname,
- m_categories, m_context, m_parameters, m_configuration, null );
+ m_categories, m_context, null );
fail( "Did not throw an IllegalArgumentException for a name with
a comma." );
}
catch( IllegalArgumentException e )
@@ -158,7 +148,7 @@
{
new ComponentDirective(
"fred/blogs", m_activation, m_collection, m_lifestyle,
m_classname,
- m_categories, m_context, m_parameters, m_configuration, null );
+ m_categories, m_context, null );
fail( "Did not throw an IllegalArgumentException for a name with
a '/'." );
}
catch( IllegalArgumentException e )
@@ -198,7 +188,7 @@
{
ComponentDirective directive = new ComponentDirective(
m_name, m_activation, m_collection, null, m_classname,
- m_categories, m_context, m_parameters, m_configuration, m_parts
);
+ m_categories, m_context, m_parts );
LifestylePolicy lifestyle = directive.getLifestylePolicy();
assertEquals( "null-lifestyle", null, lifestyle );
}
@@ -226,20 +216,4 @@
{
assertEquals( "context", m_context,
m_directive.getContextDirective() );
}
-
- /**
- * Test parameters accessor.
- */
- public void testParameters()
- {
- assertEquals( "parameters", m_parameters,
m_directive.getParameters() );
- }
-
- /**
- * Test configuration accessor.
- */
- public void testConfiguration()
- {
- assertEquals( "configuration", m_configuration,
m_directive.getConfiguration() );
- }
}

Modified: trunk/main/metro/module.xml
===================================================================
--- trunk/main/metro/module.xml 2006-04-06 17:32:31 UTC (rev 1329)
+++ trunk/main/metro/module.xml 2006-04-06 18:17:15 UTC (rev 1330)
@@ -23,13 +23,38 @@
</dependencies>
</project>

+ <project name="dpml-job-api" basedir="job/api">
+ <types>
+ <type id="jar"/>
+ </types>
+ <dependencies scope="test">
+ <include ref="ant/ant-junit"/>
+ </dependencies>
+ </project>
+
+ <project name="dpml-job-impl" basedir="job/impl">
+ <properties>
+ <property name="project.test.fork" value="true"/>
+ </properties>
+ <types>
+ <type id="jar"/>
+ </types>
+ <dependencies>
+ <include ref="dpml/metro/dpml-job-api"/>
+ </dependencies>
+ <dependencies scope="test">
+ <include ref="dpml/transit/dpml-transit-main"/>
+ <include ref="ant/ant-junit"/>
+ </dependencies>
+ </project>
+
<project name="dpml-metro-component" basedir="component">
<types>
<type id="jar"/>
</types>
<dependencies>
<include key="dpml-state-api" tag="public"/>
- <include ref="dpml/util/dpml-job-api" tag="public"/>
+ <include ref="dpml/metro/dpml-job-api" tag="public"/>
<include ref="dpml/transit/dpml-transit-main" tag="private"/>
</dependencies>
<dependencies scope="test">
@@ -43,15 +68,11 @@
</types>
<dependencies>
<include key="dpml-state-api"/>
- <include ref="dpml/util/dpml-parameters-api"/>
- <include ref="dpml/util/dpml-configuration-api"/>
<include key="dpml-metro-component"/>
</dependencies>
<dependencies scope="test">
<include ref="ant/ant-junit"/>
<include key="dpml-state-impl"/>
- <include ref="dpml/util/dpml-parameters-impl"/>
- <include ref="dpml/util/dpml-configuration-impl"/>
</dependencies>
</project>

@@ -66,9 +87,7 @@
<include ref="dpml/util/dpml-logging-api" tag="public"/>
<include key="dpml-metro-component" tag="protected"/>
<include key="dpml-metro-model" tag="protected"/>
- <include ref="dpml/util/dpml-parameters-impl"/>
- <include ref="dpml/util/dpml-configuration-impl"/>
- <include ref="dpml/util/dpml-job-impl"/>
+ <include ref="dpml/metro/dpml-job-impl"/>
<include key="dpml-state-impl"/>
</dependencies>
<dependencies scope="test">
@@ -86,7 +105,6 @@
<include ref="dpml/depot/dpml-tools-builder"/>
<include ref="dpml/transit/dpml-transit-tools"/>
<include key="dpml-metro-runtime"/>
- <include key="dpml-metro-runtime"/>
</dependencies>
</project>


Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentDecoder.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentDecoder.java
2006-04-06 17:32:31 UTC (rev 1329)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentDecoder.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -119,7 +119,7 @@

return new ComponentDirective(
name, activation, collection, lifestyle, classname,
- categories, context, null, null, parts );
+ categories, context, parts );
}

private String buildComponentClassname( Element element ) throws
DecodingException

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-04-06 17:32:31 UTC (rev 1329)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -33,8 +33,6 @@
import net.dpml.component.Model;
import net.dpml.component.ServiceNotFoundException;

-import net.dpml.configuration.Configuration;
-
import net.dpml.lang.StandardClassLoader;
import net.dpml.lang.Version;
import net.dpml.lang.Classpath;
@@ -51,8 +49,6 @@
import net.dpml.metro.PartsManager;
import net.dpml.metro.builder.ComponentTypeDecoder;

-import net.dpml.parameters.Parameters;
-
import net.dpml.util.Logger;
import net.dpml.util.DefaultLogger;

@@ -253,10 +249,8 @@
// types:
// 1. net.dpml.logging.Logger;
// 2. java.util.logging.Logger;
- // 3. net.dpml.configuration.Configuration;
- // 4. net.dpml.parameters.Parameters
- // 5. #Context
- // 6. #Parts
+ // 4. #Context
+ // 5. #Parts
//

for( int i=0; i<classes.length; i++ )
@@ -277,14 +271,6 @@
String spec = getPathForLogger( handler );
args[i] = new DefaultLogger( spec );
}
- else if( Parameters.class.isAssignableFrom( c ) )
- {
- args[i] = createParametersArgument( handler );
- }
- else if( Configuration.class.isAssignableFrom( c ) )
- {
- args[i] = createConfigurationArgument( handler );
- }
else if( ( null != contextInnerClass ) &&
contextInnerClass.isAssignableFrom( c ) )
{
args[i] = createContextInvocationHandler( provider,
contextInnerClass );
@@ -543,42 +529,6 @@
return null;
}

- private Object createParametersArgument( DefaultComponentHandler handler
) throws ControlException
- {
- try
- {
- Parameters params = handler.getComponentModel().getParameters();
- InvocationHandler invocationHandler = new
ParametersInvocationHandler( params );
- ClassLoader classloader = params.getClass().getClassLoader();
- return Proxy.newProxyInstance(
- classloader, new Class[]{Parameters.class}, invocationHandler
);
- }
- catch( RemoteException e )
- {
- final String error =
- "Unable to construct the Parameters invocation handler due to
a remote exception.";
- throw new ControllerException( error, e );
- }
- }
-
- private Object createConfigurationArgument( DefaultComponentHandler
handler ) throws ControlException
- {
- try
- {
- Configuration config =
handler.getComponentModel().getConfiguration();
- InvocationHandler invocationHandler = new
ConfigurationInvocationHandler( config );
- ClassLoader classloader = config.getClass().getClassLoader();
- return Proxy.newProxyInstance(
- classloader, new Class[]{Configuration.class},
invocationHandler );
- }
- catch( RemoteException e )
- {
- final String error =
- "Unable to construct the Configuration invocation handler due
to a remote exception.";
- throw new ControllerException( error, e );
- }
- }
-
private Object createContextInvocationHandler( DefaultProvider provider,
Class clazz )
throws ControlException
{

Deleted:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ConfigurationInvocationHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ConfigurationInvocationHandler.java
2006-04-06 17:32:31 UTC (rev 1329)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ConfigurationInvocationHandler.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -1,80 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.runtime;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import net.dpml.configuration.Configuration;
-
-/**
- * Utility class that supports instance isolation.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-final class ConfigurationInvocationHandler implements InvocationHandler
-{
- //-------------------------------------------------------------------
- // state
- //-------------------------------------------------------------------
-
- private final Configuration m_config;
-
- //-------------------------------------------------------------------
- // constructor
- //-------------------------------------------------------------------
-
- /**
- * Create a proxy invocation handler.
- *
- * @param config the instance
- */
- public ConfigurationInvocationHandler( Configuration config )
- {
- if( null == config )
- {
- throw new NullPointerException( "config" );
- }
- m_config = config;
- }
-
- /**
- * Invoke the specified method on underlying object.
- * This is called by the proxy object.
- *
- * @param proxy the proxy object
- * @param method the method invoked on proxy object
- * @param args the arguments supplied to method
- * @return the return value of method
- * @throws Throwable if an error occurs
- */
- public Object invoke( final Object proxy, final Method method, final
Object[] args )
- throws InvocationTargetException, IllegalAccessException
- {
- Object instance = getProvider();
- return method.invoke( instance, args );
- }
-
- protected Object getProvider()
- {
- return m_config;
- }
-}

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-04-06 17:32:31 UTC (rev 1329)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -31,12 +31,8 @@
import net.dpml.component.ModelListener;
import net.dpml.component.ModelEvent;

-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.Configurable;
-import net.dpml.configuration.ConfigurationException;
-import net.dpml.configuration.impl.DefaultConfiguration;
-
import net.dpml.lang.Classpath;
+import net.dpml.lang.Classpath;
import net.dpml.lang.UnknownKeyException;

import net.dpml.metro.data.ComponentDirective;
@@ -53,9 +49,6 @@
import net.dpml.metro.ComponentModelManager;
import net.dpml.metro.ContextModelManager;

-import net.dpml.parameters.Parameters;
-import net.dpml.parameters.impl.DefaultParameters;
-
import net.dpml.util.Logger;

/**
@@ -65,7 +58,7 @@
* @version @PROJECT-VERSION@
*/
class DefaultComponentModel extends UnicastEventSource
- implements ComponentModelManager, Configurable
+ implements ComponentModelManager
{
//
------------------------------------------------------------------------
// state
@@ -87,8 +80,6 @@
private LifestylePolicy m_lifestyle;
private CollectionPolicy m_collection;

- private Parameters m_parameters; // <------------ remove this (covered
by context)
- private Configuration m_configuration; // <----- move to a context entry
where the resolved value is a Configuration
private Class m_class;

//
------------------------------------------------------------------------
@@ -131,10 +122,7 @@
m_lifestyle = lifestyle;
}

- m_collection = m_directive.getCollectionPolicy();
- m_parameters = m_directive.getParameters();
- m_configuration = m_directive.getConfiguration();
-
+ m_collection = m_directive.getCollectionPolicy();
ContextDirective context = m_directive.getContextDirective();
m_context = new DefaultContextModel( this, logger, m_classloader,
m_type, context );

@@ -182,9 +170,6 @@
}

m_collection = directive.getCollectionPolicy();
- m_parameters = directive.getParameters();
- m_configuration = directive.getConfiguration();
-
ContextDirective context = directive.getContextDirective();
m_context = new DefaultContextModel( this, logger, m_classloader,
m_type, context );

@@ -275,31 +260,6 @@
}

//
------------------------------------------------------------------------
- // Configurable
- //
------------------------------------------------------------------------
-
- /**
- * Set the component model configuration.
- *
- * @param configuration the model configuration argument.
- * @throws ConfigurationException if an error occurs
- * @throws NullPointerException if the supplied configuration argument
is null
- */
- public void configure( Configuration configuration )
- throws ConfigurationException, NullPointerException
- {
- if( null == configuration )
- {
- throw new NullPointerException( "configuration" );
- }
-
- Configuration old = m_configuration;
- m_configuration = configuration;
- ModelEvent event = new ModelEvent( this, "model.configuration", old,
configuration );
- enqueueEvent( event );
- }
-
- //
------------------------------------------------------------------------
// ComponentModel
//
------------------------------------------------------------------------

@@ -451,30 +411,6 @@
}
}

- public Configuration getConfiguration()
- {
- if( null == m_configuration )
- {
- return new DefaultConfiguration( "configuration", null );
- }
- else
- {
- return m_configuration;
- }
- }
-
- public Parameters getParameters()
- {
- if( null == m_parameters )
- {
- return DefaultParameters.EMPTY_PARAMETERS;
- }
- else
- {
- return m_parameters;
- }
- }
-
/**
* Return the component logging categories.
* @return the categories

Deleted:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ParametersInvocationHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ParametersInvocationHandler.java
2006-04-06 17:32:31 UTC (rev 1329)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ParametersInvocationHandler.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -1,81 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.runtime;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import net.dpml.parameters.Parameters;
-
-/**
- * Utility class that supports instance isolation.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-final class ParametersInvocationHandler implements InvocationHandler
-{
- //-------------------------------------------------------------------
- // state
- //-------------------------------------------------------------------
-
- private final Parameters m_params;
-
- //-------------------------------------------------------------------
- // constructor
- //-------------------------------------------------------------------
-
- /**
- * Create a proxy invocation handler.
- *
- * @param params the parameters instance
- */
- public ParametersInvocationHandler( Parameters params )
- {
- if( null == params )
- {
- throw new NullPointerException( "params" );
- }
- m_params = params;
- }
-
- /**
- * Invoke the specified method on underlying object.
- * This is called by the proxy object.
- *
- * @param proxy the proxy object
- * @param method the method invoked on proxy object
- * @param args the arguments supplied to method
- * @return the return value of method
- * @throws Throwable if an error occurs
- */
- public Object invoke( final Object proxy, final Method method, final
Object[] args )
- throws InvocationTargetException, IllegalAccessException
- {
- Object instance = getInstance();
- return method.invoke( instance, args );
- }
-
-
- protected Object getInstance()
- {
- return m_params;
- }
-}

Modified: trunk/main/planet/http/module.xml
===================================================================
--- trunk/main/planet/http/module.xml 2006-04-06 17:32:31 UTC (rev 1329)
+++ trunk/main/planet/http/module.xml 2006-04-06 18:17:15 UTC (rev 1330)
@@ -13,7 +13,7 @@
<dependencies scope="runtime">
<include ref="dpml/metro/dpml-metro-model"/>
<include ref="dpml/util/dpml-logging-api"/>
- <include ref="dpml/util/dpml-configuration-api"/>
+ <!--<include ref="dpml/util/dpml-configuration-api"/>-->
<include urn="artifact:jar:org/mortbay/servlet-api-2.5#20060213"
tag="PUBLIC"/>
<include urn="artifact:jar:tomcat/jasper-runtime#5.5.12"/>
<include urn="artifact:jar:tomcat/jasper-compiler#5.5.12"/>
@@ -51,8 +51,6 @@
</dependencies>
<dependencies scope="test">
<include ref="dpml/transit/dpml-transit-main"/>
- <!--<include ref="dpml/util/dpml-logging-api"/>
- <include ref="dpml/metro/dpml-metro-model"/>-->
<include ref="ant/ant-junit"/>
</dependencies>
</project>

Modified:
trunk/main/station/api/src/main/net/dpml/station/info/ApplicationDescriptor.java
===================================================================
---
trunk/main/station/api/src/main/net/dpml/station/info/ApplicationDescriptor.java
2006-04-06 17:32:31 UTC (rev 1329)
+++
trunk/main/station/api/src/main/net/dpml/station/info/ApplicationDescriptor.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -22,6 +22,7 @@
import java.net.URI;

import net.dpml.transit.info.CodeBaseDirective;
+
import net.dpml.lang.ValueDirective;

/**

Modified:
trunk/main/station/exec/src/main/net/dpml/station/exec/ApplicationHandler.java
===================================================================
---
trunk/main/station/exec/src/main/net/dpml/station/exec/ApplicationHandler.java
2006-04-06 17:32:31 UTC (rev 1329)
+++
trunk/main/station/exec/src/main/net/dpml/station/exec/ApplicationHandler.java
2006-04-06 18:17:15 UTC (rev 1330)
@@ -164,15 +164,13 @@
}


- URI config = getConfigurationURI( line );
- URI params = getParametersURI( line );
URI categories = getCategoriesURI( line );
Properties properties = getCommandLineProperties( line );
String raw = System.getProperty( "dpml.station.partition", "" );
String partition = PropertyResolver.resolve( raw );
Component component =
resolveTargetComponent(
- logger, partition, uri, config, params, categories, properties );
+ logger, partition, uri, categories, properties );
m_callback.started( PROCESS_ID, component );
}

@@ -200,24 +198,13 @@
// internals

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

- private URI getConfigurationURI( CommandLine line )
- {
- return (URI) line.getValue( CONFIG_OPTION, null );
- }
-
- private URI getParametersURI( CommandLine line )
- {
- return (URI) line.getValue( PARAMS_OPTION, null );
- }
-
private URI getCategoriesURI( CommandLine line )
{
return (URI) line.getValue( LOGGING_OPTION, null );
}

private Component resolveTargetComponent(
- Logger logger, String partition, URI uri, URI config, URI params,
- URI categories, Properties properties ) throws Exception
+ Logger logger, String partition, URI uri, URI categories, Properties
properties ) throws Exception
{
if( Artifact.isRecognized( uri ) )
{
@@ -233,7 +220,6 @@
model.setActivationPolicy( ActivationPolicy.STARTUP );
return composition.newComponent();
}
- //return new ComponentAdapter( logger, partition, uri,
config, params, categories, properties );
}
}

@@ -346,38 +332,6 @@
.create();


- private static final Option CONFIG_OPTION =
- OPTION_BUILDER
- .withShortName( "config" )
- .withShortName( "c" )
- .withDescription( "Application configuration uri." )
- .withRequired( false )
- .withArgument(
- ARGUMENT_BUILDER
- .withDescription( "URI." )
- .withName( "uri" )
- .withMinimum( 1 )
- .withMaximum( 1 )
- .withValidator( URI_VALIDATOR )
- .create() )
- .create();
-
- private static final Option PARAMS_OPTION =
- OPTION_BUILDER
- .withShortName( "params" )
- .withShortName( "p" )
- .withDescription( "Application parameters uri." )
- .withRequired( false )
- .withArgument(
- ARGUMENT_BUILDER
- .withDescription( "URI." )
- .withName( "uri" )
- .withMinimum( 1 )
- .withMaximum( 1 )
- .withValidator( URI_VALIDATOR )
- .create() )
- .create();
-
private static final Option HELP_COMMAND =
OPTION_BUILDER
.withShortName( "help" )
@@ -389,8 +343,6 @@
GROUP_BUILDER
.withOption( KEY_OPTION )
.withOption( PORT_OPTION )
- .withOption( CONFIG_OPTION )
- .withOption( PARAMS_OPTION )
.withOption( CONTEXT_OPTION )
.withOption( LOGGING_OPTION )
.create();

Modified: trunk/main/station/module.xml
===================================================================
--- trunk/main/station/module.xml 2006-04-06 17:32:31 UTC (rev 1329)
+++ trunk/main/station/module.xml 2006-04-06 18:17:15 UTC (rev 1330)
@@ -25,13 +25,11 @@
<include ref="dpml/metro/dpml-metro-runtime"/>
</dependencies>
<dependencies>
- <include ref="dpml/util/dpml-configuration-api" tag="public"/>
<include ref="dpml/transit/dpml-transit-main" tag="public"/>
<include ref="dpml/metro/dpml-metro-component" tag="public"/>
<include ref="dpml/metro/dpml-metro-model" tag="public"/>
<include ref="dpml/station/dpml-station-api" tag="public"/>
<include ref="dpml/util/dpml-logging-api" tag="public"/>
- <include ref="dpml/util/dpml-configuration-impl"/>
<include ref="dpml/util/dpml-util-cli"/>
</dependencies>
</project>

Modified: trunk/main/transit/core/src/main/net/dpml/lang/Builder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/Builder.java 2006-04-06
17:32:31 UTC (rev 1329)
+++ trunk/main/transit/core/src/main/net/dpml/lang/Builder.java 2006-04-06
18:17:15 UTC (rev 1330)
@@ -25,7 +25,7 @@
import org.w3c.dom.Element;

/**
- * Interace implemented by part builders.
+ * Interace implemented by part strategy builders.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@

Modified: trunk/main/util/module.xml
===================================================================
--- trunk/main/util/module.xml 2006-04-06 17:32:31 UTC (rev 1329)
+++ trunk/main/util/module.xml 2006-04-06 18:17:15 UTC (rev 1330)
@@ -7,31 +7,6 @@
<include key="transit"/>
</dependencies>

- <project name="dpml-job-api" basedir="job/api">
- <types>
- <type id="jar"/>
- </types>
- <dependencies scope="test">
- <include ref="ant/ant-junit"/>
- </dependencies>
- </project>
-
- <project name="dpml-job-impl" basedir="job/impl">
- <properties>
- <property name="project.test.fork" value="true"/>
- </properties>
- <types>
- <type id="jar"/>
- </types>
- <dependencies>
- <include ref="dpml/util/dpml-job-api"/>
- </dependencies>
- <dependencies scope="test">
- <include ref="dpml/transit/dpml-transit-main"/>
- <include ref="ant/ant-junit"/>
- </dependencies>
- </project>
-
<project name="dpml-util-i18n" basedir="i18n">
<types>
<type id="jar"/>
@@ -64,42 +39,5 @@
<type id="jar"/>
</types>
</project>
-
- <project name="dpml-configuration-api" basedir="configuration/api">
- <types>
- <type id="jar"/>
- </types>
- </project>
-
- <project name="dpml-configuration-impl" basedir="configuration/impl">
- <types>
- <type id="jar"/>
- </types>
- <dependencies>
- <include key="dpml-configuration-api"/>
- </dependencies>
- <dependencies scope="test">
- <include ref="ant/ant-junit"/>
- </dependencies>
- </project>
-
- <project name="dpml-parameters-api" basedir="parameters/api">
- <types>
- <type id="jar"/>
- </types>
- </project>
-
- <project name="dpml-parameters-impl" basedir="parameters/impl">
- <types>
- <type id="jar"/>
- </types>
- <dependencies>
- <include key="dpml-parameters-api"/>
- <include key="dpml-configuration-api" tag="private"/>
- </dependencies>
- <dependencies scope="test">
- <include ref="ant/ant-junit"/>
- </dependencies>
- </project>
-
+
</module>




  • r1330 - in trunk/main: central/src/docs/metro/util metro metro/job metro/model/src/main/net/dpml/metro metro/model/src/main/net/dpml/metro/data metro/model/src/test/net/dpml/metro/data/test metro/runtime/src/main/net/dpml/metro/builder metro/runtime/src/main/net/dpml/metro/runtime planet/http station station/api/src/main/net/dpml/station/info station/exec/src/main/net/dpml/station/exec transit/core/src/main/net/dpml/lang util, mcconnell at BerliOS, 04/06/2006

Archive powered by MHonArc 2.6.24.

Top of Page