Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2890 - in development/main: . metro metro/composition/control metro/composition/control/src/main/net/dpml/composition/control metro/composition/control/src/main/net/dpml/composition/unit test/components test/components/plus/src/main/net/dpml/test/acme/plus test/unit test/unit/plus/src/test/net/dpml/test/acme/plus test/unit/simple/src/test/net/dpml/test/acme transit/core/handler/src/main/net/dpml/transit/adapter util

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: r2890 - in development/main: . metro metro/composition/control metro/composition/control/src/main/net/dpml/composition/control metro/composition/control/src/main/net/dpml/composition/unit test/components test/components/plus/src/main/net/dpml/test/acme/plus test/unit test/unit/plus/src/test/net/dpml/test/acme/plus test/unit/simple/src/test/net/dpml/test/acme transit/core/handler/src/main/net/dpml/transit/adapter util
  • Date: Fri, 17 Jun 2005 22:08:48 -0400

Author: mcconnell AT dpml.net
Date: Fri Jun 17 22:08:46 2005
New Revision: 2890

Added:

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

development/main/metro/composition/control/src/main/net/dpml/composition/unit/

development/main/metro/composition/control/src/main/net/dpml/composition/unit/CompositionHelper.java

development/main/metro/composition/control/src/main/net/dpml/composition/unit/ControllerStorageUnit.java

development/main/metro/composition/control/src/main/net/dpml/composition/unit/DefaultControllerModel.java

development/main/metro/composition/control/src/main/net/dpml/composition/unit/package.html
Modified:
development/main/build.bat
development/main/metro/composition/control/build.xml
development/main/metro/index.xml
development/main/test/components/index.xml

development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ConfigurableContainer.java

development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ManagedComponent.java

development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ManagingContainer.java
development/main/test/unit/index.xml

development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ConfigurationTestCase.java

development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ManagementTestCase.java

development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java

development/main/test/unit/simple/src/test/net/dpml/test/acme/CompositeTestCase.java

development/main/test/unit/simple/src/test/net/dpml/test/acme/ExampleTestCase.java

development/main/test/unit/simple/src/test/net/dpml/test/acme/SimpleTestCase.java

development/main/transit/core/handler/src/main/net/dpml/transit/adapter/LoggingAdapter.java
development/main/util/index.xml
Log:
Move unit support into the main composition controller package.

Modified: development/main/build.bat
==============================================================================
--- development/main/build.bat (original)
+++ development/main/build.bat Fri Jun 17 22:08:46 2005
@@ -37,10 +37,10 @@
:all
CALL :transit
IF ERRORLEVEL 1 goto fail
-CALL :util
-IF ERRORLEVEL 1 goto fail
CALL :magic
IF ERRORLEVEL 1 goto fail
+CALL :util
+IF ERRORLEVEL 1 goto fail
CALL :depot
if ERRORLEVEL 1 goto fail
CALL :metro

Modified: development/main/metro/composition/control/build.xml
==============================================================================
--- development/main/metro/composition/control/build.xml (original)
+++ development/main/metro/composition/control/build.xml Fri Jun 17
22:08:46 2005
@@ -13,6 +13,13 @@
<filter token="PART-CONTROLLER-URI" value="${control.plugin}"/>
</target>

+ <target name="build" depends="standard.build">
+ <x:path id="build.path"/>
+ <rmic base="${basedir}/target/classes" classpathref="build.path">
+ <include name="**/DefaultControllerModel.class"/>
+ </rmic>
+ </target>
+
<target name="package" depends="standard.package">
<x:export class="net.dpml.composition.control.CompositionManager"/>
</target>

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/control/DefaultLogger.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/DefaultLogger.java
Fri Jun 17 22:08:46 2005
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2004 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.composition.control;
+
+import java.net.URL;
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+import net.dpml.transit.util.ExceptionHelper;
+
+/**
+ * Default logging adapter.
+ *
+ * @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
+ * @version $Id: LoggingAdapter.java 2684 2005-06-01 00:22:50Z
mcconnell AT dpml.net $
+ */
+public class DefaultLogger implements net.dpml.logging.Logger
+{
+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
+ private Logger m_logger;
+
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
+ /**
+ * Creation of a new console adapter that is used to redirect transit
events
+ * the system output stream.
+ */
+ public DefaultLogger( String category )
+ {
+ m_logger = Logger.getLogger( category );
+ }
+
+ //
------------------------------------------------------------------------
+ // Adapter
+ //
------------------------------------------------------------------------
+
+ /**
+ * Return TRUE is debug level logging is enabled.
+ * @return the enabled state of debug logging
+ */
+ public boolean isDebugEnabled()
+ {
+ return m_logger.isLoggable( Level.FINE );
+ }
+
+ /**
+ * Return TRUE is info level logging is enabled.
+ * @return the enabled state of info logging
+ */
+ public boolean isInfoEnabled()
+ {
+ return m_logger.isLoggable( Level.INFO );
+ }
+
+ /**
+ * Return TRUE is error level logging is enabled.
+ * @return the enabled state of error logging
+ */
+ public boolean isWarnEnabled()
+ {
+ return m_logger.isLoggable( Level.WARNING );
+ }
+
+ /**
+ * Return TRUE is error level logging is enabled.
+ * @return the enabled state of error logging
+ */
+ public boolean isErrorEnabled()
+ {
+ return m_logger.isLoggable( Level.SEVERE );
+ }
+
+ /**
+ * Log a debug message is debug mode is enabled.
+ * @param message the message to log
+ */
+ public void debug( String message )
+ {
+ if( isDebugEnabled() )
+ {
+ m_logger.fine( message );
+ }
+ }
+
+ /**
+ * Log a info level message.
+ * @param message the message to log
+ */
+ public void info( String message )
+ {
+ if( isInfoEnabled() )
+ {
+ m_logger.info( message );
+ }
+ }
+
+ /**
+ * Record a warning message.
+ * @param message the warning message to record
+ */
+ public void warn( String message )
+ {
+ if( isWarnEnabled() )
+ {
+ m_logger.warning( message );
+ }
+ }
+
+ /**
+ * Record a warning message.
+ * @param message the warning message to record
+ */
+ public void warn( String message, Throwable cause )
+ {
+ if( isWarnEnabled() )
+ {
+ m_logger.log( Level.WARNING, message, cause );
+ }
+ }
+
+ /**
+ * Log a error message.
+ * @param message the message to log
+ */
+ public void error( String message )
+ {
+ if( isErrorEnabled() )
+ {
+ m_logger.log( Level.SEVERE, message );
+ }
+ }
+
+ /**
+ * Log a error message.
+ * @param message the message to log
+ * @param e the causal exception
+ */
+ public void error( String message, Throwable e )
+ {
+ if( isErrorEnabled() )
+ {
+ m_logger.log( Level.SEVERE, message, e );
+ }
+ }
+
+ public net.dpml.logging.Logger getChildLogger( String category )
+ {
+ String name = m_logger.getName();
+ String path = name + "." + category;
+ return new DefaultLogger( path );
+ }
+
+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+}
+

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/unit/CompositionHelper.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/unit/CompositionHelper.java
Fri Jun 17 22:08:46 2005
@@ -0,0 +1,154 @@
+/*
+ * 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.composition.unit;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.prefs.Preferences;
+import java.util.Date;
+
+import net.dpml.composition.control.CompositionManager;
+
+import net.dpml.part.control.ControllerContext;
+
+import net.dpml.transit.adapter.LoggingAdapter;
+import net.dpml.transit.repository.Repository;
+import net.dpml.transit.repository.StandardLoader;
+import net.dpml.transit.model.Logger;
+
+/**
+ * A utility class used for the deployment of components in embedded
scenarios
+ * includuing but not limited to test-cases.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ */
+public class CompositionHelper
+{
+ //------------------------------------------------------------------
+ // static
+ //------------------------------------------------------------------
+
+ static
+ {
+ System.setProperty( "java.util.logging.config.class",
"net.dpml.depot.logging.ConfigurationHandler" );
+ }
+
+ public static File getTestWorkingDir()
+ {
+ String dir = System.getProperty( "project.test.dir" );
+ if( null == dir )
+ {
+ final String error =
+ "System property 'project.test.dir' is undefined.";
+ throw new IllegalStateException( error );
+ }
+
+ try
+ {
+ return new File( dir ).getCanonicalFile();
+ }
+ catch( IOException e )
+ {
+ return new File( dir );
+ }
+ }
+
+ //------------------------------------------------------------------
+ // state
+ //------------------------------------------------------------------
+
+ private ControllerContext m_context;
+ private CompositionManager m_manager;
+
+ //------------------------------------------------------------------
+ // constructor
+ //------------------------------------------------------------------
+
+ public CompositionHelper() throws Exception
+ {
+ this( getTestWorkingDir() );
+ }
+
+ public CompositionHelper( File base ) throws Exception
+ {
+ if( null == base )
+ {
+ throw new NullPointerException( "base" );
+ }
+
+ Preferences root = Preferences.userNodeForPackage(
CompositionManager.class );
+ Preferences profiles = root.node( "profiles" );
+ Preferences prefs = profiles.node( "unit" );
+
+ Logger logger = new LoggingAdapter( "metro" );
+ Date creation = new Date();
+ boolean policy = false;
+
+ ControllerStorageUnit home = new ControllerStorageUnit ( prefs,
logger, creation, policy );
+ DefaultControllerModel context = (DefaultControllerModel)
home.getContentModel();
+ context.setWorkingDirectory( base );
+ m_context = context;
+ m_manager = new CompositionManager( context );
+ }
+
+ //------------------------------------------------------------------
+ // internal
+ //------------------------------------------------------------------
+
+ public CompositionManager getCompositionManager()
+ {
+ return m_manager;
+ }
+
+ public URI toURI( String path )
+ {
+ try
+ {
+ File base = m_context.getWorkingDirectory();
+ File target = new File( base, path );
+ return target.toURI();
+ }
+ catch( Throwable e )
+ {
+ return null;
+ }
+ }
+
+ public void dispose()
+ {
+ getCompositionManager().dispose();
+ System.gc();
+ }
+
+ private static URI createStaticURI( String path )
+ {
+ try
+ {
+ return new URI( path );
+ }
+ catch( Throwable e )
+ {
+ return null;
+ }
+ }
+
+}

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/unit/ControllerStorageUnit.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/unit/ControllerStorageUnit.java
Fri Jun 17 22:08:46 2005
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 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.composition.unit;
+
+import java.io.File;
+import java.net.URI;
+import java.rmi.RemoteException;
+import java.util.Date;
+import java.util.prefs.Preferences;
+
+import net.dpml.transit.model.Logger;
+import net.dpml.transit.model.ContentModel;
+import net.dpml.transit.unit.ContentStorageUnit;
+import net.dpml.transit.unit.BuilderException;
+
+/**
+ * The ControllerContext is a management service supplied to a controller
instance. It
+ * provides support for operations though which the context state may be
updated and
+ * a provision for default values based on underlying preferences.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
+ */
+public class ControllerStorageUnit extends ContentStorageUnit
+{
+
//----------------------------------------------------------------------------
+ // state
+
//----------------------------------------------------------------------------
+
+ private final ContentModel m_model;
+
+ private String m_work;
+
+ private String m_temp;
+
+
//----------------------------------------------------------------------------
+ // constructor
+
//----------------------------------------------------------------------------
+
+ /**
+ * Creation of a new ControllerStorageUnit using a supplied
+ * preferences node.
+ *
+ * @param prefs the preferences node assigned to the storage unit from
which default
+ * values may be resolved
+ */
+ public ControllerStorageUnit(
+ Preferences prefs, Logger logger, Date creation, boolean policy )
+ {
+ super( prefs, logger, creation, policy );
+ m_model = createContentModel();
+ }
+
+
//----------------------------------------------------------------------------
+ // ContentStorageUnit
+
//----------------------------------------------------------------------------
+
+ protected ContentModel createContentModel()
+ {
+ Preferences prefs = getPreferences();
+ Logger logger = getLogger();
+ Date creation = getCreationDate();
+ URI uri = getCodeBaseURI();
+ String type = getType();
+ String title = getTitle();
+ String work = getWorkingDirectory();
+ String temp = getTempDirectory();
+ try
+ {
+ return new DefaultControllerModel(
+ logger, creation, this, uri, type, title, work, temp );
+ }
+ catch( RemoteException e )
+ {
+ final String error =
+ "Unable to construct part content model due to a remote
exception.";
+ throw new BuilderException( error, e );
+ }
+ }
+
+
//----------------------------------------------------------------------------
+ // impl
+
//----------------------------------------------------------------------------
+
+
+ private String getWorkingDirectory()
+ {
+ Preferences prefs = getPreferences();
+ return prefs.get( "working-directory", "${user.dir}" );
+ }
+
+ private String getTempDirectory()
+ {
+ Preferences prefs = getPreferences();
+ return prefs.get( "temp-directory", "${java.temp.dir}" );
+ }
+}

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/unit/DefaultControllerModel.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/unit/DefaultControllerModel.java
Fri Jun 17 22:08:46 2005
@@ -0,0 +1,287 @@
+/*
+ * Copyright (c) 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.composition.unit;
+
+import java.io.File;
+import java.net.URI;
+import java.rmi.RemoteException;
+import java.util.Date;
+import java.util.Map;
+import java.util.EventObject;
+import java.util.EventListener;
+import java.util.WeakHashMap;
+import java.util.Properties;
+import java.util.prefs.Preferences;
+import java.util.prefs.PreferenceChangeListener;
+import java.util.prefs.PreferenceChangeEvent;
+
+import net.dpml.part.control.ControllerContext;
+import net.dpml.part.control.ControllerContextListener;
+import net.dpml.part.control.ControllerContextEvent;
+
+import net.dpml.transit.home.ContentHome;
+import net.dpml.transit.model.ContentRegistryModel;
+import net.dpml.transit.model.DefaultContentModel;
+import net.dpml.transit.model.Logger;
+import net.dpml.transit.util.PropertyResolver;
+
+/**
+ * The ControllerContext is a management service supplied to a controller
instance. It
+ * provides support for operations though which the context state may be
updated and
+ * a provision for default values based on underlying preferences.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
+ */
+public class DefaultControllerModel extends DefaultContentModel implements
ControllerContext
+{
+
//----------------------------------------------------------------------------
+ // state
+
//----------------------------------------------------------------------------
+
+ /**
+ * Working directory.
+ */
+ private File m_work;
+
+ /**
+ * Temp directory.
+ */
+ private File m_temp;
+
+ /**
+ * Commandline arguments.
+ */
+ private final String[] m_args = new String[0];
+
+
//----------------------------------------------------------------------------
+ // constructor
+
//----------------------------------------------------------------------------
+
+ public DefaultControllerModel(
+ Logger logger, Date creation, ContentHome home,
+ URI uri, String type, String title, String work, String temp ) throws
RemoteException
+ {
+ super( logger, creation, home, uri, type, title );
+ m_work = getWorkingDirectory( work );
+ m_temp = getTempDirectory( temp );
+ }
+
+
//----------------------------------------------------------------------------
+ // ControllerContext
+
//----------------------------------------------------------------------------
+
+ /**
+ * Return any command line arguments.
+ * @return the possibly empty set of command line arguments.
+ */
+ public String[] getArgs() throws RemoteException
+ {
+ return m_args;
+ }
+
+ /**
+ * Return the context uri.
+ *
+ * @return the uri for this context.
+ */
+ public URI getURI() throws RemoteException
+ {
+ return CONTEXT_URI;
+ }
+
+ /**
+ * Return the root working directory.
+ *
+ * @return directory representing the root of the working directory
hierachy
+ */
+ public File getWorkingDirectory() throws RemoteException
+ {
+ synchronized( m_lock )
+ {
+ return m_work;
+ }
+ }
+
+ /**
+ * Set the root working directory.
+ *
+ * @param dir the root of the working directory hierachy
+ */
+ public void setWorkingDirectory( File dir ) throws RemoteException
+ {
+ synchronized( m_lock )
+ {
+ m_work = dir;
+ }
+ }
+
+ /**
+ * Return the root temporary directory.
+ *
+ * @return directory representing the root of the temporary directory
hierachy.
+ */
+ public File getTempDirectory() throws RemoteException
+ {
+ synchronized( m_lock )
+ {
+ return m_temp;
+ }
+ }
+
+ /**
+ * Add the supplied controller context listener to the controller
context. A
+ * controller implementation should not maintain strong references to
supplied
+ * listeners.
+ *
+ * @param listener the controller context listener to add
+ */
+ public void addControllerContextlistener( ControllerContextListener
listener )
+ throws RemoteException
+ {
+ addListener( listener );
+ }
+
+ /**
+ * Remove the supplied controller context listener from the controller
context.
+ *
+ * @param listener the controller context listener to remove
+ */
+ public void removeControllerContextlistener( ControllerContextListener
listener )
+ throws RemoteException
+ {
+ removeListener( listener );
+ }
+
+
//----------------------------------------------------------------------------
+ // private
+
//----------------------------------------------------------------------------
+
+ protected void processEvent( EventObject event )
+ {
+ if( event instanceof WorkingDirectoryChangeEvent )
+ {
+ processWorkingDirectoryChangeEvent(
(WorkingDirectoryChangeEvent) event );
+ }
+ else if( event instanceof TempDirectoryChangeEvent )
+ {
+ processTempDirectoryChangeEvent( (TempDirectoryChangeEvent)
event );
+ }
+ else
+ {
+ super.processEvent( event );
+ }
+ }
+
+ public void processWorkingDirectoryChangeEvent(
WorkingDirectoryChangeEvent event )
+ {
+ EventListener[] listeners = super.listeners();
+ for( int i=0; i<listeners.length; i++ )
+ {
+ EventListener eventListener = listeners[i];
+ if( eventListener instanceof ControllerContextListener )
+ {
+ ControllerContextListener listener =
(ControllerContextListener) eventListener;
+ try
+ {
+ listener.workingDirectoryChanged( event );
+ }
+ catch( Throwable e )
+ {
+ final String error =
+ "ControllerContextListener working dir change
notification error.";
+ getLogger().error( error, e );
+ }
+ }
+ }
+ }
+
+ public void processTempDirectoryChangeEvent( TempDirectoryChangeEvent
event )
+ {
+ EventListener[] listeners = super.listeners();
+ for( int i=0; i<listeners.length; i++ )
+ {
+ EventListener eventListener = listeners[i];
+ if( eventListener instanceof ControllerContextListener )
+ {
+ ControllerContextListener listener =
(ControllerContextListener) eventListener;
+ try
+ {
+ listener.tempDirectoryChanged( event );
+ }
+ catch( Throwable e )
+ {
+ final String error =
+ "ControllerContextListener temp dir change
notification error.";
+ getLogger().error( error, e );
+ }
+ }
+ }
+ }
+
+ private File getWorkingDirectory( String value )
+ {
+ Properties properties = System.getProperties();
+ String path = PropertyResolver.resolve( properties, value );
+ return new File( path );
+ }
+
+ private File getTempDirectory( String value )
+ {
+ Properties properties = System.getProperties();
+ String path = PropertyResolver.resolve( properties, value );
+ return new File( path );
+ }
+
+
//----------------------------------------------------------------------------
+ // static (private)
+
//----------------------------------------------------------------------------
+
+ private static URI CONTEXT_URI = setupContextURI();
+
+ private static URI setupContextURI()
+ {
+ try
+ {
+ return new URI( "metro:local" );
+ }
+ catch( Throwable e )
+ {
+ return null;
+ }
+ }
+
+ static class WorkingDirectoryChangeEvent extends ControllerContextEvent
+ {
+ public WorkingDirectoryChangeEvent(
+ DefaultControllerModel source, File oldDir, File newDir )
+ {
+ super( source, oldDir, newDir );
+ }
+ }
+
+ static class TempDirectoryChangeEvent extends ControllerContextEvent
+ {
+ public TempDirectoryChangeEvent(
+ DefaultControllerModel source, File oldDir, File newDir )
+ {
+ super( source, oldDir, newDir );
+ }
+ }
+}

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/unit/package.html
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/unit/package.html
Fri Jun 17 22:08:46 2005
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+Utility class that provides support for component testing.
+</p>
+
+</body>

Modified: development/main/metro/index.xml
==============================================================================
--- development/main/metro/index.xml (original)
+++ development/main/metro/index.xml Fri Jun 17 22:08:46 2005
@@ -124,6 +124,7 @@
</info>
<dependencies>
<include key="dpml-part-api" tag="api"/>
+ <include key="dpml-logging-api" tag="api"/>
<include key="dpml-transit-main" tag="api"/>
<include key="dpml-activity-api" tag="api"/>
<include key="dpml-parameters-api" tag="api"/>

Modified: development/main/test/components/index.xml
==============================================================================
--- development/main/test/components/index.xml (original)
+++ development/main/test/components/index.xml Fri Jun 17 22:08:46 2005
@@ -28,7 +28,7 @@
</types>
</info>
<dependencies>
- <include key="dpml-parts-api"/>
+ <include key="dpml-part-api"/>
<include key="dpml-configuration-api"/>
<include key="dpml-activity-api"/>
</dependencies>

Modified:
development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ConfigurableContainer.java
==============================================================================
---
development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ConfigurableContainer.java
(original)
+++
development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ConfigurableContainer.java
Fri Jun 17 22:08:46 2005
@@ -26,10 +26,10 @@

import net.dpml.activity.Executable;

-import net.dpml.parts.control.Controller;
-import net.dpml.parts.model.Model;
+import net.dpml.part.control.Controller;
+import net.dpml.part.model.Model;

-import net.dpml.parts.control.Manager;
+import net.dpml.part.control.Manager;

/**
* Demonstration of a component that uses a supplied configuration to

Modified:
development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ManagedComponent.java
==============================================================================
---
development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ManagedComponent.java
(original)
+++
development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ManagedComponent.java
Fri Jun 17 22:08:46 2005
@@ -22,9 +22,9 @@
import java.net.URISyntaxException;
import java.util.logging.Logger;

-import net.dpml.parts.state.State;
-import net.dpml.parts.state.StateEvent;
-import net.dpml.parts.state.StateListener;
+import net.dpml.part.state.State;
+import net.dpml.part.state.StateEvent;
+import net.dpml.part.state.StateListener;

/**
* Experimental component dealing with state management.

Modified:
development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ManagingContainer.java
==============================================================================
---
development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ManagingContainer.java
(original)
+++
development/main/test/components/plus/src/main/net/dpml/test/acme/plus/ManagingContainer.java
Fri Jun 17 22:08:46 2005
@@ -21,9 +21,9 @@
import java.net.URI;
import java.util.logging.Logger;

-import net.dpml.parts.control.Manager;
-import net.dpml.parts.model.Component;
-import net.dpml.parts.state.State;
+import net.dpml.part.control.Manager;
+import net.dpml.part.model.Component;
+import net.dpml.part.state.State;

import net.dpml.activity.Startable;


Modified: development/main/test/unit/index.xml
==============================================================================
--- development/main/test/unit/index.xml (original)
+++ development/main/test/unit/index.xml Fri Jun 17 22:08:46 2005
@@ -14,7 +14,7 @@
</info>
<dependencies>
<include key="dpml-test-simple"/>
- <include key="dpml-composition-unit"/>
+ <include key="dpml-composition-control"/>
<include key="ant-junit"/>
</dependencies>
<plugins>
@@ -33,7 +33,7 @@
<dependencies>
<include key="dpml-test-simple"/>
<include key="dpml-test-plus"/>
- <include key="dpml-composition-unit"/>
+ <include key="dpml-composition-control"/>
<include key="ant-junit"/>
</dependencies>
<plugins>

Modified:
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ConfigurationTestCase.java
==============================================================================
---
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ConfigurationTestCase.java
(original)
+++
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ConfigurationTestCase.java
Fri Jun 17 22:08:46 2005
@@ -25,9 +25,9 @@

import junit.framework.TestCase;

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

import net.dpml.composition.unit.CompositionHelper;


Modified:
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ManagementTestCase.java
==============================================================================
---
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ManagementTestCase.java
(original)
+++
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ManagementTestCase.java
Fri Jun 17 22:08:46 2005
@@ -28,10 +28,10 @@

import net.dpml.composition.unit.CompositionHelper;

-import net.dpml.parts.control.Manager;
-import net.dpml.parts.model.Component;
-import net.dpml.parts.model.Model;
-import net.dpml.parts.state.State;
+import net.dpml.part.control.Manager;
+import net.dpml.part.model.Component;
+import net.dpml.part.model.Model;
+import net.dpml.part.state.State;

/**
* Test a simple component case.
@@ -49,7 +49,7 @@

/**
* Test the construction of the example component and the invocation of
- * the provided controller via </code>the
net.dpml.parts.state.StateManager</code> interface
+ * the provided controller via </code>the
net.dpml.part.state.StateManager</code> interface
*/
public void testManagedComponent() throws Exception
{

Modified:
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
==============================================================================
---
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
(original)
+++
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
Fri Jun 17 22:08:46 2005
@@ -25,9 +25,9 @@

import junit.framework.TestCase;

-import net.dpml.parts.part.Part;
-import net.dpml.parts.model.Provider;
-import net.dpml.parts.model.Model;
+import net.dpml.part.part.Part;
+import net.dpml.part.model.Provider;
+import net.dpml.part.model.Model;

import net.dpml.test.acme.Dimension;


Modified:
development/main/test/unit/simple/src/test/net/dpml/test/acme/CompositeTestCase.java
==============================================================================
---
development/main/test/unit/simple/src/test/net/dpml/test/acme/CompositeTestCase.java
(original)
+++
development/main/test/unit/simple/src/test/net/dpml/test/acme/CompositeTestCase.java
Fri Jun 17 22:08:46 2005
@@ -25,10 +25,10 @@

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;
+import net.dpml.part.model.Model;
+import net.dpml.part.model.Component;
+import net.dpml.part.control.Controller;
+import net.dpml.part.control.Manager;

import net.dpml.composition.unit.CompositionHelper;


Modified:
development/main/test/unit/simple/src/test/net/dpml/test/acme/ExampleTestCase.java
==============================================================================
---
development/main/test/unit/simple/src/test/net/dpml/test/acme/ExampleTestCase.java
(original)
+++
development/main/test/unit/simple/src/test/net/dpml/test/acme/ExampleTestCase.java
Fri Jun 17 22:08:46 2005
@@ -25,9 +25,9 @@

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.part.model.Model;
+import net.dpml.part.model.Component;
+import net.dpml.part.control.Controller;

import net.dpml.composition.unit.CompositionHelper;


Modified:
development/main/test/unit/simple/src/test/net/dpml/test/acme/SimpleTestCase.java
==============================================================================
---
development/main/test/unit/simple/src/test/net/dpml/test/acme/SimpleTestCase.java
(original)
+++
development/main/test/unit/simple/src/test/net/dpml/test/acme/SimpleTestCase.java
Fri Jun 17 22:08:46 2005
@@ -25,9 +25,9 @@

import junit.framework.TestCase;

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

import net.dpml.composition.unit.CompositionHelper;


Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/adapter/LoggingAdapter.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/adapter/LoggingAdapter.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/adapter/LoggingAdapter.java
Fri Jun 17 22:08:46 2005
@@ -74,6 +74,15 @@
m_logger = logger;
}

+ /**
+ * Creation of a new console adapter that is used to redirect transit
events
+ * the system output stream.
+ */
+ public LoggingAdapter( String category )
+ {
+ m_logger = Logger.getLogger( category );
+ }
+
//
------------------------------------------------------------------------
// Adapter
//
------------------------------------------------------------------------

Modified: development/main/util/index.xml
==============================================================================
--- development/main/util/index.xml (original)
+++ development/main/util/index.xml Fri Jun 17 22:08:46 2005
@@ -2,6 +2,8 @@

<index key="dpml-util">

+ <import uri="${dpml.magic.uri}"/>
+
<!--
Depot Modules
-->



  • svn commit: r2890 - in development/main: . metro metro/composition/control metro/composition/control/src/main/net/dpml/composition/control metro/composition/control/src/main/net/dpml/composition/unit test/components test/components/plus/src/main/net/dpml/test/acme/plus test/unit test/unit/plus/src/test/net/dpml/test/acme/plus test/unit/simple/src/test/net/dpml/test/acme transit/core/handler/src/main/net/dpml/transit/adapter util, mcconnell, 06/17/2005

Archive powered by MHonArc 2.6.24.

Top of Page