Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2595 - in development: central central/site central/site/src/resources/images/depot central/tutorials central/tutorials/classic central/tutorials/classic/composition central/tutorials/classic/configuration central/tutorials/classic/context central/tutorials/classic/dependencies central/tutorials/classic/dynamics central/tutorials/classic/hello central/tutorials/classic/main central/tutorials/classic/parameterization central/tutorials/classic/profiles central/tutorials/classic/selection central/tutorials/classic/startable central/tutorials/metro laboratory/ide/common laboratory/ide/common/magic laboratory/spells/xdoclet/plugin laboratory/spells/xdoclet/plugin-test laboratory/spells/xdoclet/tutorial main main/depot main/depot/console main/depot/console/etc/bin main/depot/console/src/main/net/dpml/depot/lang main/depot/console/src/main/net/dpml/depot/logging main/depot/console/src/main/net/dpml/depot/logging/nodes main/depot/content main/depot/station/src/main/net/dpml/depot/prefs main/magic/core/src/main/net/dpml/magic/tasks main/metro main/metro/activity main/metro/activity/src/main/net/dpml/activity main/metro/classic main/metro/composition/builder/src/main/net/dpml/composition/builder main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes main/metro/composition/content main/metro/composition/content/src main/metro/composition/content/src/main main/metro/composition/content/src/main/net main/metro/composition/content/src/main/net/dpml main/metro/composition/content/src/main/net/dpml/composition main/metro/composition/content/src/main/net/dpml/composition/content main/metro/composition/control/src/main/net/dpml/composition/control main/metro/composition/control/src/main/net/dpml/composition/data main/metro/composition/control/src/main/net/dpml/composition/event main/metro/composition/control/src/main/net/dpml/composition/info main/metro/composition/control/src/main/net/dpml/composition/model main/metro/composition/part main/metro/composition/part/src main/metro/composition/part/src/main main/metro/composition/part/src/main/net main/metro/composition/part/src/main/net/dpml main/metro/composition/part/src/main/net/dpml/composition main/metro/composition/part/src/main/net/dpml/composition/part main/metro/composition/part/src/main/net/dpml/composition/part/images main/metro/composition/testing/test/src/test/net/dpml/composition/testing main/metro/composition/testing/test/src/test/net/dpml/test/state main/metro/composition/testing/workshop main/metro/composition/testing/workshop/src/test/net/dpml/test main/metro/composition/unit main/metro/composition/unit/src/main/net/dpml/composition/unit main/metro/composition/unit/src/main/net/dpml/composition/unit/images main/metro/configuration/api/src/main/net/dpml/configuration main/metro/configuration/impl/src/main/net/dpml/configuration/impl main/metro/context main/metro/logging main/metro/main main/metro/parts main/metro/parts/api main/metro/parts/spi main/metro/parts/src/main/net/dpml/parts/builder main/metro/parts/src/main/net/dpml/parts/control main/metro/parts/src/main/net/dpml/parts/model main/metro/parts/src/main/net/dpml/parts/part main/metro/parts/src/main/net/dpml/parts/state main/metro/parts/src/test/net/dpml/parts/state main/metro/service main/metro/system main/metro/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: r2595 - in development: central central/site central/site/src/resources/images/depot central/tutorials central/tutorials/classic central/tutorials/classic/composition central/tutorials/classic/configuration central/tutorials/classic/context central/tutorials/classic/dependencies central/tutorials/classic/dynamics central/tutorials/classic/hello central/tutorials/classic/main central/tutorials/classic/parameterization central/tutorials/classic/profiles central/tutorials/classic/selection central/tutorials/classic/startable central/tutorials/metro laboratory/ide/common laboratory/ide/common/magic laboratory/spells/xdoclet/plugin laboratory/spells/xdoclet/plugin-test laboratory/spells/xdoclet/tutorial main main/depot main/depot/console main/depot/console/etc/bin main/depot/console/src/main/net/dpml/depot/lang main/depot/console/src/main/net/dpml/depot/logging main/depot/console/src/main/net/dpml/depot/logging/nodes main/depot/content main/depot/station/src/main/net/dpml/depot/prefs main/magic/core/src/main/net/dpml/magic/tasks main/metro main/metro/activity main/metro/activity/src/main/net/dpml/activity main/metro/classic main/metro/composition/builder/src/main/net/dpml/composition/builder main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes main/metro/composition/content main/metro/composition/content/src main/metro/composition/content/src/main main/metro/composition/content/src/main/net main/metro/composition/content/src/main/net/dpml main/metro/composition/content/src/main/net/dpml/composition main/metro/composition/content/src/main/net/dpml/composition/content main/metro/composition/control/src/main/net/dpml/composition/control main/metro/composition/control/src/main/net/dpml/composition/data main/metro/composition/control/src/main/net/dpml/composition/event main/metro/composition/control/src/main/net/dpml/composition/info main/metro/composition/control/src/main/net/dpml/composition/model main/metro/composition/part main/metro/composition/part/src main/metro/composition/part/src/main main/metro/composition/part/src/main/net main/metro/composition/part/src/main/net/dpml main/metro/composition/part/src/main/net/dpml/composition main/metro/composition/part/src/main/net/dpml/composition/part main/metro/composition/part/src/main/net/dpml/composition/part/images main/metro/composition/testing/test/src/test/net/dpml/composition/testing main/metro/composition/testing/test/src/test/net/dpml/test/state main/metro/composition/testing/workshop main/metro/composition/testing/workshop/src/test/net/dpml/test main/metro/composition/unit main/metro/composition/unit/src/main/net/dpml/composition/unit main/metro/composition/unit/src/main/net/dpml/composition/unit/images main/metro/configuration/api/src/main/net/dpml/configuration main/metro/configuration/impl/src/main/net/dpml/configuration/impl main/metro/context main/metro/logging main/metro/main main/metro/parts main/metro/parts/api main/metro/parts/spi main/metro/parts/src/main/net/dpml/parts/builder main/metro/parts/src/main/net/dpml/parts/control main/metro/parts/src/main/net/dpml/parts/model main/metro/parts/src/main/net/dpml/parts/part main/metro/parts/src/main/net/dpml/parts/state main/metro/parts/src/test/net/dpml/parts/state main/metro/service main/metro/system main/metro/util
  • Date: Wed, 18 May 2005 20:04:22 +0000

Author: mcconnell AT dpml.net
Date: Wed May 18 20:04:11 2005
New Revision: 2595

Added:

development/central/site/src/resources/images/depot/dpml-composition-part.png
(contents, props changed)
development/central/tutorials/classic/
- copied from r2589, development/central/tutorials/metro/
development/central/tutorials/classic/README.TXT
- copied unchanged from r2594,
development/central/tutorials/metro/README.TXT
development/central/tutorials/classic/build.xml
- copied unchanged from r2594,
development/central/tutorials/metro/build.xml
development/central/tutorials/classic/composition/
- copied from r2594, development/central/tutorials/metro/composition/
development/central/tutorials/classic/configuration/
- copied from r2594, development/central/tutorials/metro/configuration/
development/central/tutorials/classic/context/
- copied from r2594, development/central/tutorials/metro/context/
development/central/tutorials/classic/dependencies/
- copied from r2594, development/central/tutorials/metro/dependencies/
development/central/tutorials/classic/dynamics/
- copied from r2594, development/central/tutorials/metro/dynamics/
development/central/tutorials/classic/hello/
- copied from r2594, development/central/tutorials/metro/hello/
development/central/tutorials/classic/index.xml
- copied, changed from r2594,
development/central/tutorials/metro/index.xml
development/central/tutorials/classic/main/
- copied from r2594, development/central/tutorials/metro/main/
development/central/tutorials/classic/module.xml
- copied unchanged from r2594,
development/central/tutorials/metro/module.xml
development/central/tutorials/classic/parameterization/
- copied from r2594,
development/central/tutorials/metro/parameterization/
development/central/tutorials/classic/profiles/
- copied from r2594, development/central/tutorials/metro/profiles/
development/central/tutorials/classic/selection/
- copied from r2594, development/central/tutorials/metro/selection/
development/central/tutorials/classic/startable/
- copied from r2594, development/central/tutorials/metro/startable/

development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/package.html

development/main/metro/composition/builder/src/main/net/dpml/composition/builder/package.html
development/main/metro/composition/content/ (props changed)
development/main/metro/composition/content/build.xml
development/main/metro/composition/content/src/
development/main/metro/composition/content/src/main/
development/main/metro/composition/content/src/main/net/
development/main/metro/composition/content/src/main/net/dpml/
development/main/metro/composition/content/src/main/net/dpml/composition/

development/main/metro/composition/content/src/main/net/dpml/composition/content/

development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerDescriptor.java

development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistry.java

development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistryInstaller.java

development/main/metro/composition/content/src/main/net/dpml/composition/content/package.html

development/main/metro/composition/control/src/main/net/dpml/composition/control/package.html

development/main/metro/composition/control/src/main/net/dpml/composition/data/CategoriesDirective.java

development/main/metro/composition/control/src/main/net/dpml/composition/data/CategoryDirective.java

development/main/metro/composition/control/src/main/net/dpml/composition/event/package.html

development/main/metro/composition/control/src/main/net/dpml/composition/model/package.html
development/main/metro/composition/part/ (props changed)
development/main/metro/composition/part/build.xml
development/main/metro/composition/part/src/
development/main/metro/composition/part/src/main/
development/main/metro/composition/part/src/main/net/
development/main/metro/composition/part/src/main/net/dpml/
development/main/metro/composition/part/src/main/net/dpml/composition/
development/main/metro/composition/part/src/main/net/dpml/composition/part/

development/main/metro/composition/part/src/main/net/dpml/composition/part/CompositionContentHandler.java

development/main/metro/composition/part/src/main/net/dpml/composition/part/CompositionContentHandlerControlPanel.java

development/main/metro/composition/part/src/main/net/dpml/composition/part/CompositionControllerContext.java

development/main/metro/composition/part/src/main/net/dpml/composition/part/IconHelper.java

development/main/metro/composition/part/src/main/net/dpml/composition/part/images/

development/main/metro/composition/part/src/main/net/dpml/composition/part/images/setup.png
(contents, props changed)

development/main/metro/composition/part/src/main/net/dpml/composition/part/images/source.png
(contents, props changed)

development/main/metro/composition/part/src/main/net/dpml/composition/part/images/temp.png
(contents, props changed)

development/main/metro/composition/part/src/main/net/dpml/composition/part/images/working.png
(contents, props changed)

development/main/metro/composition/part/src/main/net/dpml/composition/part/package.html

development/main/metro/composition/unit/src/main/net/dpml/composition/unit/DefaultControllerContext.java

development/main/metro/composition/unit/src/main/net/dpml/composition/unit/package.html
development/main/metro/parts/src/main/net/dpml/parts/builder/package.html

development/main/metro/parts/src/main/net/dpml/parts/control/ControllerContext.java

development/main/metro/parts/src/main/net/dpml/parts/control/ControllerContextEvent.java

development/main/metro/parts/src/main/net/dpml/parts/control/ControllerContextListener.java

development/main/metro/parts/src/main/net/dpml/parts/control/TempDirectoryChangeEvent.java

development/main/metro/parts/src/main/net/dpml/parts/control/WorkingDirectoryChangeEvent.java
development/main/metro/parts/src/main/net/dpml/parts/control/package.html
development/main/metro/parts/src/main/net/dpml/parts/model/package.html
development/main/metro/parts/src/main/net/dpml/parts/part/package.html

development/main/metro/parts/src/main/net/dpml/parts/state/DuplicateKeyException.java
development/main/metro/parts/src/main/net/dpml/parts/state/package.html
Removed:
development/central/tutorials/metro/
development/main/depot/console/src/main/net/dpml/depot/logging/nodes/
development/main/depot/content/
development/main/metro/activity/activity-api.iml
development/main/metro/classic/

development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionContentHandler.java

development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionContentHandlerControlPanel.java

development/main/metro/composition/unit/src/main/net/dpml/composition/unit/IconHelper.java

development/main/metro/composition/unit/src/main/net/dpml/composition/unit/images/
development/main/metro/context/
development/main/metro/logging/
development/main/metro/main/
development/main/metro/parts/api/
development/main/metro/parts/build.properties
development/main/metro/parts/parts.iml
development/main/metro/parts/spi/
development/main/metro/service/
development/main/metro/system/
development/main/metro/util/
Modified:
development/central/index.xml
development/central/site/build.xml
development/central/site/src/resources/images/depot/content-handler.png
development/central/site/src/resources/images/depot/metro-ft-prefs.png
development/central/tutorials/index.xml
development/laboratory/ide/common/ (props changed)
development/laboratory/ide/common/magic/ (props changed)
development/laboratory/spells/xdoclet/plugin/ (props changed)
development/laboratory/spells/xdoclet/plugin-test/ (props changed)
development/laboratory/spells/xdoclet/tutorial/ (props changed)
development/main/README.TXT
development/main/build.bat
development/main/build.sh
development/main/depot/console/build.properties
development/main/depot/console/build.xml
development/main/depot/console/etc/bin/depot
development/main/depot/console/etc/bin/depot.bat

development/main/depot/console/src/main/net/dpml/depot/lang/DepotClassLoader.java
development/main/depot/console/src/main/net/dpml/depot/lang/Main.java

development/main/depot/console/src/main/net/dpml/depot/logging/ConfigurationHandler.java

development/main/depot/console/src/main/net/dpml/depot/logging/LoggingManager.java
development/main/depot/index.xml

development/main/depot/station/src/main/net/dpml/depot/prefs/CachePanel.java

development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesDialog.java

development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesFrame.java

development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesPanel.java

development/main/depot/station/src/main/net/dpml/depot/prefs/GenericTableModel.java

development/main/depot/station/src/main/net/dpml/depot/prefs/IconHelper.java
development/main/depot/station/src/main/net/dpml/depot/prefs/Main.java

development/main/depot/station/src/main/net/dpml/depot/prefs/TransitPanel.java

development/main/depot/station/src/main/net/dpml/depot/prefs/TransitResourceHostPanel.java
development/main/magic/core/src/main/net/dpml/magic/tasks/JarTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/JavadocTask.java
development/main/metro/METRO.TXT
development/main/metro/activity/src/main/net/dpml/activity/package.html

development/main/metro/composition/builder/src/main/net/dpml/composition/builder/ComponentBuilderTask.java

development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/CategoriesDataType.java

development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/ReferenceDataType.java

development/main/metro/composition/control/src/main/net/dpml/composition/control/ComponentController.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/control/ContextManagerInvocationHandler.java

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

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

development/main/metro/composition/control/src/main/net/dpml/composition/data/ComponentProfile.java

development/main/metro/composition/control/src/main/net/dpml/composition/data/ContextDirective.java

development/main/metro/composition/control/src/main/net/dpml/composition/data/DeploymentProfile.java

development/main/metro/composition/control/src/main/net/dpml/composition/data/ReferenceDirective.java

development/main/metro/composition/control/src/main/net/dpml/composition/data/package.html

development/main/metro/composition/control/src/main/net/dpml/composition/event/WeakEventProducer.java

development/main/metro/composition/control/src/main/net/dpml/composition/info/PartDescriptor.java

development/main/metro/composition/control/src/main/net/dpml/composition/info/package.html

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

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

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

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

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

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

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

development/main/metro/composition/testing/test/src/test/net/dpml/test/state/ManagementTestCase.java
development/main/metro/composition/testing/workshop/build.xml

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

development/main/metro/composition/testing/workshop/src/test/net/dpml/test/WorkshopTestCase.java
development/main/metro/composition/unit/build.xml

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

development/main/metro/configuration/api/src/main/net/dpml/configuration/package.html

development/main/metro/configuration/impl/src/main/net/dpml/configuration/impl/package.html
development/main/metro/index.xml
development/main/metro/module.xml
development/main/metro/parts/build.xml
development/main/metro/parts/src/main/net/dpml/parts/control/Manager.java
development/main/metro/parts/src/main/net/dpml/parts/model/Provider.java

development/main/metro/parts/src/main/net/dpml/parts/part/PartReference.java

development/main/metro/parts/src/main/net/dpml/parts/state/RecursiveInitializationException.java

development/main/metro/parts/src/main/net/dpml/parts/state/RecursiveTerminationException.java

development/main/metro/parts/src/main/net/dpml/parts/state/ResourceUnavailableException.java
development/main/metro/parts/src/main/net/dpml/parts/state/State.java
development/main/metro/parts/src/main/net/dpml/parts/state/StateEvent.java
development/main/metro/parts/src/main/net/dpml/parts/state/Transition.java

development/main/metro/parts/src/test/net/dpml/parts/state/OperationTestCase.java

development/main/metro/parts/src/test/net/dpml/parts/state/StateTestCase.java

development/main/metro/parts/src/test/net/dpml/parts/state/TransitionTestCase.java
development/main/module.properties
Log:
Cleanup of main.

Modified: development/central/index.xml
==============================================================================
--- development/central/index.xml (original)
+++ development/central/index.xml Wed May 18 20:04:11 2005
@@ -5,8 +5,6 @@
<import uri="${dpml.magic.uri}"/>
<import uri="${dpml.metro.uri}"/>

- <import index="tutorials/index.xml"/>
-
<project basedir="site">
<info>
<group>dpml/central/site</group>

Modified: development/central/site/build.xml
==============================================================================
--- development/central/site/build.xml (original)
+++ development/central/site/build.xml Wed May 18 20:04:11 2005
@@ -7,27 +7,27 @@
<transit:import uri="artifact:template:dpml/magic/standard"/>

<target name="init" depends="standard.init">
- <x:filter key="dpml-metro-main" feature="version"
token="RUNTIME-VERSION"/>
- <x:filter key="dpml-logging-api" feature="spec"
token="LOGGING-API-SPEC"/>
+ <!--<x:filter key="dpml-metro-main" feature="version"
token="RUNTIME-VERSION"/>-->
+ <!--<x:filter key="dpml-logging-api" feature="spec"
token="LOGGING-API-SPEC"/>-->
<x:filter key="dpml-activity-api" feature="spec"
token="ACTIVITY-API-SPEC"/>
<x:filter key="dpml-configuration-api" feature="spec"
token="CONFIGURATION-API-SPEC"/>
- <!--x:filter key="dpml-tutorial-context-custom" feature="spec"
token="TUTORIAL-CONTEXT-CUSTOM-SPEC"/>
- <x:filter key="dpml-tutorial-context-casting" feature="spec"
token="TUTORIAL-CONTEXT-CASTING-SPEC"/>
- <x:filter key="dpml-tutorial-location-api" feature="spec"
token="TUTORIAL-LOCATION-API-SPEC"/>
- <x:filter key="dpml-tutorial-location-impl" feature="spec"
token="TUTORIAL-LOCATION-IMPL-SPEC"/>
- <x:filter key="dpml-tutorial-publisher-api" feature="spec"
token="TUTORIAL-PUBLISHER-API-SPEC"/>
- <x:filter key="dpml-tutorial-publisher-impl" feature="spec"
token="TUTORIAL-PUBLISHER-IMPL-SPEC"/-->
- <x:filter key="dpml-context-api" feature="spec"
token="CONTEXT-API-SPEC"/>
- <x:filter key="dpml-service-api" feature="spec"
token="SERVICE-API-SPEC"/>
+ <!--x:filter key="dpml-tutorial-context-custom" feature="spec"
token="TUTORIAL-CONTEXT-CUSTOM-SPEC"/>-->
+ <!--<x:filter key="dpml-tutorial-context-casting" feature="spec"
token="TUTORIAL-CONTEXT-CASTING-SPEC"/>-->
+ <!--<x:filter key="dpml-tutorial-location-api" feature="spec"
token="TUTORIAL-LOCATION-API-SPEC"/>-->
+ <!--<x:filter key="dpml-tutorial-location-impl" feature="spec"
token="TUTORIAL-LOCATION-IMPL-SPEC"/>-->
+ <!--<x:filter key="dpml-tutorial-publisher-api" feature="spec"
token="TUTORIAL-PUBLISHER-API-SPEC"/>-->
+ <!--<x:filter key="dpml-tutorial-publisher-impl" feature="spec"
token="TUTORIAL-PUBLISHER-IMPL-SPEC"/-->
+ <!--<x:filter key="dpml-context-api" feature="spec"
token="CONTEXT-API-SPEC"/>-->
+ <!--<x:filter key="dpml-service-api" feature="spec"
token="SERVICE-API-SPEC"/>-->
<!--x:filter key="dpml-tutorial-hello" feature="spec"
token="TUTORIAL-HELLO-SPEC"/-->
- <x:filter key="dpml-system-impl" feature="plugin"
token="SYSTEM-PLUGIN-URI"/>
- <x:filter key="dpml-classic-impl" feature="plugin"
token="COMPOSITION-PLUGIN-URI"/>
- <x:filter key="dpml-logging-logkit-impl" feature="plugin"
token="LOGGING-LOGKIT-PLUGIN-URI"/>
- <x:filter key="dpml-logging-log4j" feature="plugin"
token="LOGGING-LOG4J-PLUGIN-URI"/>
- <x:filter key="dpml-activation-impl" feature="plugin"
token="RUNTIME-PLUGIN-URI"/>
- <x:filter key="dpml-activation-avalon-provider" feature="plugin"
token="AVALON-RUNTIME-PLUGIN-URI"/>
- <x:filter key="dpml-activation-metro-provider" feature="plugin"
token="METRO-RUNTIME-PLUGIN-URI"/>
- <x:filter key="dpml-metro-main" feature="plugin"
token="METRO-PLUGIN-URI"/>
+ <!--<x:filter key="dpml-system-impl" feature="plugin"
token="SYSTEM-PLUGIN-URI"/>-->
+ <!--<x:filter key="dpml-classic-impl" feature="plugin"
token="COMPOSITION-PLUGIN-URI"/>-->
+ <!--<x:filter key="dpml-logging-logkit-impl" feature="plugin"
token="LOGGING-LOGKIT-PLUGIN-URI"/>-->
+ <!--<x:filter key="dpml-logging-log4j" feature="plugin"
token="LOGGING-LOG4J-PLUGIN-URI"/>-->
+ <!--<x:filter key="dpml-activation-impl" feature="plugin"
token="RUNTIME-PLUGIN-URI"/>-->
+ <!--<x:filter key="dpml-activation-avalon-provider" feature="plugin"
token="AVALON-RUNTIME-PLUGIN-URI"/>-->
+ <!--<x:filter key="dpml-activation-metro-provider" feature="plugin"
token="METRO-RUNTIME-PLUGIN-URI"/>-->
+ <!--<x:filter key="dpml-metro-main" feature="plugin"
token="METRO-PLUGIN-URI"/>-->
<x:filter key="dpml-transit-tools" feature="uri"
token="MAGIC-BOOTSTRAP-URI"/>
<x:filter key="dpml-magic-core" feature="plugin"
token="MAGIC-PLUGIN-URI"/>
<x:filter key="dpml-transit-main" feature="uri"
token="TRANSIT-MAIN-URI"/>
@@ -40,7 +40,6 @@
<x:filter key="dpml-transit" feature="version" token="TRANSIT-BUILD-ID"/>
<x:filter key="dpml-magic" feature="version" token="MAGIC-BUILD-ID"/>
<x:filter key="dpml-metro" feature="version" token="METRO-BUILD-ID"/>
- <filter token="OMS-DEPOT-INSTALLER-URL"
value="http://download.osm.net/depot/osm-depot-installer.exe"/>
</target>

<target name="install" depends="docs"/>

Modified:
development/central/site/src/resources/images/depot/content-handler.png
==============================================================================
Binary files. No diff available.

Added:
development/central/site/src/resources/images/depot/dpml-composition-part.png
==============================================================================
Binary file. No diff available.

Modified:
development/central/site/src/resources/images/depot/metro-ft-prefs.png
==============================================================================
Binary files. No diff available.

Copied: development/central/tutorials/classic/index.xml (from r2594,
development/central/tutorials/metro/index.xml)
==============================================================================
--- development/central/tutorials/metro/index.xml (original)
+++ development/central/tutorials/classic/index.xml Wed May 18 20:04:11
2005
@@ -2,8 +2,8 @@

<index>

- <import uri="${dpml.magic.uri}"/>
- <import uri="${dpml.metro.uri}"/>
+ <import uri="artifact:module:dpml/magic/dpml-magic#2579"/>
+ <import uri="artifact:module:dpml/metro/dpml-metro#2579"/>

<!--
Tutorial Modules

Modified: development/central/tutorials/index.xml
==============================================================================
--- development/central/tutorials/index.xml (original)
+++ development/central/tutorials/index.xml Wed May 18 20:04:11 2005
@@ -3,6 +3,6 @@
<index>

<import index="transit/index.xml"/>
- <import index="metro/index.xml"/>
+ <import index="classic/index.xml"/>

</index>

Modified: development/main/README.TXT
==============================================================================
--- development/main/README.TXT (original)
+++ development/main/README.TXT Wed May 18 20:04:11 2005
@@ -2,10 +2,10 @@
The DPML platform has the four major product groups.
To build respective products please incoke the follwing commands:

-$ ant transit ... builds the transit diustribution and updates the
local installation
-$ ant magic ... builds the magic build system (requires transit)
-$ ant metro ... builds Metro (requires Magic)
-$ ant depot ... builds Depot (requires Magic)
+$ ant transit ... builds the transit distribution and updates the
local installation
+$ ant magic ... builds the magic build system (requires Transit)
+$ ant depot ... builds Depot (requires Transit and Magic)
+$ ant metro ... builds Metro (requires Transit, Magic, Depot)

Please note that the Transit build will install the junit jar file
under the .ant/lib directory if not available. In such a case the

Modified: development/main/build.bat
==============================================================================
--- development/main/build.bat (original)
+++ development/main/build.bat Wed May 18 20:04:11 2005
@@ -35,10 +35,10 @@
IF ERRORLEVEL 1 goto fail
CALL :magic
IF ERRORLEVEL 1 goto fail
-CALL :metro
-if ERRORLEVEL 1 goto fail
CALL :depot
if ERRORLEVEL 1 goto fail
+CALL :metro
+if ERRORLEVEL 1 goto fail
GOTO :EOF

:fail

Modified: development/main/build.sh
==============================================================================
--- development/main/build.sh (original)
+++ development/main/build.sh Wed May 18 20:04:11 2005
@@ -62,13 +62,6 @@
cd -
}

-site()
-{
- cd central/site
- build clean install
- cd -
-}
-
ID=$2
TARGET=$1

@@ -78,8 +71,8 @@
echo " [product] product name"
echo " transit -- build the transit distribution"
echo " magic -- build the magic distribution"
- echo " metro -- build the metro distribution"
echo " depot -- build the depot distribution"
+ echo " metro -- build the metro distribution"
echo " all -- builds transit, magic, metro distributions"
echo " [revision] optional build revision identified used when"
echo " building number releases."
@@ -98,25 +91,21 @@
magic
fi

-if [ "$TARGET" == "metro" ] ; then
- metro
-fi
-
if [ "$TARGET" == "depot" ] ; then
depot
fi

-if [ "$TARGET" == "central" ] ; then
- central
+if [ "$TARGET" == "metro" ] ; then
+ metro
fi

-if [ "$TARGET" == "site" ] ; then
- site
+if [ "$TARGET" == "central" ] ; then
+ central
fi

if [ "$TARGET" == "all" ] ; then
transit
magic
- metro
depot
+ metro
fi

Modified: development/main/depot/console/build.properties
==============================================================================
--- development/main/depot/console/build.properties (original)
+++ development/main/depot/console/build.properties Wed May 18 20:04:11
2005
@@ -1,3 +1,3 @@

project.test.fork = true
-project.jar.main.class=net.dpml.depot.console.Main
+project.jar.main.class=net.dpml.depot.lang.Main

Modified: development/main/depot/console/build.xml
==============================================================================
--- development/main/depot/console/build.xml (original)
+++ development/main/depot/console/build.xml Wed May 18 20:04:11 2005
@@ -8,12 +8,14 @@

<target name="init" depends="standard.init">
<filter token="BUILD-ID" value="${project.version}" />
- <filter token="DEPOT-PATH"
value="dpml-depot-console-${project.version}.jar" />
+ <x:filter token="DEPOT-PATH" feature="filename"/>
+ <x:filter token="TRANSIT-PATH" key="dpml-transit-main"
feature="filename"/>
<x:property name="transit.filename" key="dpml-transit-main"
feature="filename"/>
<x:property name="station.filename" key="dpml-depot-station"
feature="filename"/>
<echo>${station.filename}</echo>
<filter token="TRANSIT-MAIN-LIB" value="${transit.filename}" />
<filter token="DEPOT-STATION-LIB" value="${station.filename}" />
+ <property name="project.jar.classpath" value="${transit.filename}" />
</target>

<target name="install" depends="standard.install">
@@ -35,8 +37,6 @@

#----------------------------------------------------------------------------------
# Updating DPML SYSTEM ${dpml.system}/bin

#----------------------------------------------------------------------------------
- ${transit.filename}
- ${project.version}
</echo>
<copy todir="${dpml.system}" preservelastmodified="true"
overwrite="true">
<fileset dir="target">

Modified: development/main/depot/console/etc/bin/depot
==============================================================================
--- development/main/depot/console/etc/bin/depot (original)
+++ development/main/depot/console/etc/bin/depot Wed May 18 20:04:11
2005
@@ -1,69 +1,69 @@
-#!/bin/sh
-#
-# Copyright 2004 Niclas Hedhman
-# Copyright 2005 Stephen McConnnell
-#
-# 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
-if [ ! "$DPML_HOME" ]; then
- DPML_HOME="$HOME/.dpml"
- export DPML_HOME
-fi
-
-if [ ! "$DPML_SYSTEM" ]; then
- CWD=`pwd`
- BIN_DIR=`dirname "$0"`
- cd "$BIN_DIR"
- ABSOLUTE_PATH=`pwd`
- cd "$CWD"
- DPML_SYSTEM=`dirname "$ABSOLUTE_PATH"`
- export DPML_SYSTEM
-fi
-
-# Checking for JAVA_HOME is required on *nix due
-# to some distributions including kaffe in /usr/bin
-#
-
-if [ "$JAVA_HOME" = "" ] ; then
- echo "ERROR: JAVA_HOME not found in your environment."
- echo
- echo "Please, set the JAVA_HOME variable in your environment to match the
location"
- echo " of the Java Virtual Machine you want to use."
- echo
- echo "This requirement is in place to avoid accidental execution of
pre-installed"
- echo "Java virtual machines on your system, such as kaffe or any outdated
Sun or"
- echo "Blackdown JVMs. Sorry for the inconvenience."
- exit 1
-fi
-
-PLATFORM=`uname`
-export PLATFORM
-
-DEPOT_VERSION="@BUILD-ID@"
-export DEPOT_VERSION
-
-SECURITY_POLICY=$DPML_SYSTEM/bin/security.policy
-export SECURITY_POLICY
-
-DEPOT_CLASSPATH=$DPML_HOME/data/lib/@DEPOT-PATH@
-export DEPOT_CLASSPATH
-
-if [ `echo $PLATFORM | grep "CYGWIN"` ] ; then
- exec "$DPML_SYSTEM/bin/depot-cygwin.sh" "$@"
-elif [ `echo $PLATFORM | grep "Linux"` ] ; then
- exec "$DPML_SYSTEM/bin/depot-unix.sh" "$@"
-else
- echo "Starting Default Unix script"
- exec "$DPML_SYSTEM/bin/depot-unix.sh" "$@"
+#!/bin/sh
+#
+# Copyright 2004 Niclas Hedhman
+# Copyright 2005 Stephen McConnnell
+#
+# 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
+if [ ! "$DPML_HOME" ]; then
+ DPML_HOME="$HOME/.dpml"
+ export DPML_HOME
+fi
+
+if [ ! "$DPML_SYSTEM" ]; then
+ CWD=`pwd`
+ BIN_DIR=`dirname "$0"`
+ cd "$BIN_DIR"
+ ABSOLUTE_PATH=`pwd`
+ cd "$CWD"
+ DPML_SYSTEM=`dirname "$ABSOLUTE_PATH"`
+ export DPML_SYSTEM
+fi
+
+# Checking for JAVA_HOME is required on *nix due
+# to some distributions including kaffe in /usr/bin
+#
+
+if [ "$JAVA_HOME" = "" ] ; then
+ echo "ERROR: JAVA_HOME not found in your environment."
+ echo
+ echo "Please, set the JAVA_HOME variable in your environment to match the
location"
+ echo " of the Java Virtual Machine you want to use."
+ echo
+ echo "This requirement is in place to avoid accidental execution of
pre-installed"
+ echo "Java virtual machines on your system, such as kaffe or any outdated
Sun or"
+ echo "Blackdown JVMs. Sorry for the inconvenience."
+ exit 1
+fi
+
+PLATFORM=`uname`
+export PLATFORM
+
+DEPOT_VERSION="@BUILD-ID@"
+export DEPOT_VERSION
+
+SECURITY_POLICY=$DPML_SYSTEM/bin/security.policy
+export SECURITY_POLICY
+
+DEPOT_CLASSPATH=$DPML_HOME/data/lib/@DEPOT-PATH@:$DPML_HOME/data/lib/@TRANSIT-PATH
+export DEPOT_CLASSPATH
+
+if [ `echo $PLATFORM | grep "CYGWIN"` ] ; then
+ exec "$DPML_SYSTEM/bin/depot-cygwin.sh" "$@"
+elif [ `echo $PLATFORM | grep "Linux"` ] ; then
+ exec "$DPML_SYSTEM/bin/depot-unix.sh" "$@"
+else
+ echo "Starting Default Unix script"
+ exec "$DPML_SYSTEM/bin/depot-unix.sh" "$@"
fi
\ No newline at end of file

Modified: development/main/depot/console/etc/bin/depot.bat
==============================================================================
--- development/main/depot/console/etc/bin/depot.bat (original)
+++ development/main/depot/console/etc/bin/depot.bat Wed May 18 20:04:11
2005
@@ -17,9 +17,10 @@
:SET_DEPOT
if "%DPML_HOME%" == "" set DPML_HOME=%APPDATA%\DPML
if "%DPML_SYSTEM%" == "" set DPML_SYSTEM=%DPML_HOME%\Shared
-if "%DPML_DEPOT_JAR%" == "" set DPML_DEPOT_JAR=@DEPOT-PATH@
+if "%DPML_DEPOT_JAR%" == "" set
DPML_DEPOT_JAR=%DPML_HOME%\Data\lib\@DEPOT-PATH@
+if "%DPML_TRANSIT_JAR%" == "" set
DPML_TRANSIT_JAR=%DPML_HOME%\Data\lib\@TRANSIT-PATH@

-set $DEPOT_CLASSPATH="%DPML_HOME%\Data\lib\%DPML_DEPOT_JAR%"
+set $DEPOT_CLASSPATH="%DPML_DEPOT_JAR%";"%DPML_TRANSIT_JAR%"
set $POLICY=-Djava.security.policy="%DPML_SYSTEM%\bin\security.policy"
set $ARGS=%*


Modified:
development/main/depot/console/src/main/net/dpml/depot/lang/DepotClassLoader.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/lang/DepotClassLoader.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/lang/DepotClassLoader.java
Wed May 18 20:04:11 2005
@@ -100,5 +100,67 @@
return file.toURL();
}
}
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ listClasspath( buffer );
+ return buffer.toString();
+ }
+
+ protected void listClasspath( StringBuffer buffer )
+ {
+ listClasspath( buffer, this, 0 );
+ buffer.append( "\n" );
+ }
+
+ protected void listClasspath( StringBuffer buffer, ClassLoader
classloader, int n )
+ {
+ if( classloader instanceof URLClassLoader )
+ {
+ URLClassLoader cl = (URLClassLoader) classloader;
+ ClassLoader parent = cl.getParent();
+ if( null != parent )
+ {
+
+ listClasspath( buffer, parent, n+1 );
+ }
+ if( n == 0 )
+ {
+ buffer.append( "\n Depot System ClassLoader" );
+ }
+ else if( n == 1 )
+ {
+ buffer.append( "\n Bootstrap ClassLoader" );
+ }
+ else if( n == 2 )
+ {
+ buffer.append( "\n JRE Extensions ClassLoader" );
+ }
+ else
+ {
+ buffer.append( "\n url classloader" );
+ }
+ appendEntries( buffer, cl );
+ }
+ else
+ {
+ buffer.append( "\n classloader (no details)" );
+ buffer.append( "\n" );
+ }
+ }
+
+ private void appendEntries( StringBuffer buffer, URLClassLoader
classloader )
+ {
+ URL[] urls = classloader.getURLs();
+ for( int i=0; i<urls.length; i++ )
+ {
+ buffer.append( "\n " );
+ URL url = urls[i];
+ String spec = url.toString();
+ buffer.append( spec );
+ }
+ buffer.append( "\n" );
+ }
}


Modified:
development/main/depot/console/src/main/net/dpml/depot/lang/Main.java
==============================================================================
--- development/main/depot/console/src/main/net/dpml/depot/lang/Main.java
(original)
+++ development/main/depot/console/src/main/net/dpml/depot/lang/Main.java
Wed May 18 20:04:11 2005
@@ -105,9 +105,6 @@
return;
}

- String name = profile.get( "title", profile.name() );
- logger.info( "loading " + name );
-
if( false == profile.nodeExists( "classpath" ) )
{
final String error =
@@ -122,7 +119,11 @@
if( system instanceof DepotClassLoader )
{
DepotClassLoader classloader = (DepotClassLoader) system;
+ System.err.println( "#BEFORE" );
+ System.err.println( classloader.toString() );
classloader.setProfileClasspathNode( classpath );
+ System.err.println( "#AFTER" );
+ System.err.println( classloader.toString() );
String classname = resolve( profile.get( "classname", null )
);
if( null == classname )
{
@@ -134,6 +135,9 @@
}
else
{
+ String name = profile.get( "title", profile.name() );
+ logger.info( "loading " + name );
+
try
{
Class c = classloader.loadClass( classname );
@@ -156,6 +160,23 @@
System.err.println( buffer.toString() );
return;
}
+ catch( Exception e )
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append( "Application error." );
+ buffer.append( "\nException: " + e.getClass() );
+ buffer.append( "\nMessage: " + e.getMessage() );
+ buffer.append( "\nDepot Main Codesource: " );
+ buffer.append(
Main.class.getProtectionDomain().getCodeSource().getLocation().toString() );
+ buffer.append( "\nSystem classpath:" );
+ URL[] urls = classloader.getURLs();
+ for( int i=0; i<urls.length; i++ )
+ {
+ buffer.append( "\n" + (i+1) + "\t" + urls[i] );
+ }
+ System.err.println( buffer.toString() );
+ return;
+ }
}
}
else
@@ -262,19 +283,27 @@
}
}
}
- if( profiles.nodeExists( "prefs" ) )
+
+ //
+ // Getting here means that the user has not supplied a profile
argument.
+ // The default is to throw up Depot preferences based on information
from
+ // system preferences.
+ //
+
+ Preferences sys = Preferences.systemNodeForPackage( Main.class );
+ Preferences sysProfiles = root.node( "profiles" );
+ if( sysProfiles.nodeExists( "prefs" ) )
{
- return profiles.node( "prefs" );
+ return sysProfiles.node( "prefs" );
}
else
{
- Preferences profile = profiles.node( "prefs" );
- profile.put( "classname", "net.dpml.depot.prefs.Main" );
- profile.put( "title", "Depot Preferences" );
- Preferences classpath = profile.node( "classpath" );
- classpath.put( "dpml-transit-main",
"${dpml.data}/lib/@TRANSIT-MAIN-LIB@" );
+ Preferences defaultProfile = sysProfiles.node( "prefs" );
+ defaultProfile.put( "classname", "net.dpml.depot.prefs.Main" );
+ defaultProfile.put( "title", "Depot Preferences" );
+ Preferences classpath = defaultProfile.node( "classpath" );
classpath.put( "dpml-depot-station",
"${dpml.data}/lib/@DEPOT-STATION-LIB@" );
- return profile;
+ return defaultProfile;
}
}


Modified:
development/main/depot/console/src/main/net/dpml/depot/logging/ConfigurationHandler.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/logging/ConfigurationHandler.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/logging/ConfigurationHandler.java
Wed May 18 20:04:11 2005
@@ -24,8 +24,6 @@
import java.util.logging.LogManager;
import java.util.prefs.Preferences;

-import net.dpml.depot.logging.nodes.Nodes;
-
/**
* Utility class used to establish the logging configuration. The contents
of
* this class are subject to radical change but that's largely academic
because
@@ -40,7 +38,7 @@
*/
public ConfigurationHandler()
{
- Preferences prefs = Preferences.userNodeForPackage( Nodes.class );
+ Preferences prefs = Preferences.userNodeForPackage( getClass()
).node( "nodes" );
String rootLevel = prefs.get( "level", "INFO" );

Properties properties = new Properties();

Modified:
development/main/depot/console/src/main/net/dpml/depot/logging/LoggingManager.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/logging/LoggingManager.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/logging/LoggingManager.java
Wed May 18 20:04:11 2005
@@ -20,6 +20,9 @@

import java.util.logging.LogManager;

+/**
+ * Implementation of a java.util.logging.LogManager.
+ */
public class LoggingManager extends LogManager
{
}

Modified: development/main/depot/index.xml
==============================================================================
--- development/main/depot/index.xml (original)
+++ development/main/depot/index.xml Wed May 18 20:04:11 2005
@@ -33,20 +33,6 @@
</info>
</project>

- <project basedir="content">
- <info>
- <group>dpml/depot</group>
- <name>dpml-depot-content</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-transit-main" tag="api"/>
- </dependencies>
- </project>
-
<project basedir="station">
<info>
<group>dpml/depot</group>
@@ -56,8 +42,8 @@
</types>
</info>
<dependencies>
- <include key="dpml-depot-console" tag="api"/>
<include key="dpml-transit-main" tag="api"/>
+ <include key="dpml-depot-console" tag="api"/>
</dependencies>
</project>


Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/CachePanel.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/CachePanel.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/CachePanel.java
Wed May 18 20:04:11 2005
@@ -90,7 +90,7 @@

JLabel label =
IconHelper.createImageIconJLabel(
- Transit.class.getClassLoader(),
"net/dpml/depot/prefs/images/cache.jpg", "Filename", "Directory: " + filename
);
+ getClass().getClassLoader(),
"net/dpml/depot/prefs/images/cache.jpg", "Filename", "Directory: " + filename
);
label.setBorder( new EmptyBorder( 0, 5, 0, 0 ) );
m_label = label;
m_ok = new JButton( new OKAction( "OK" ) );

Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesDialog.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesDialog.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesDialog.java
Wed May 18 20:04:11 2005
@@ -45,7 +45,7 @@
* Transit cache and repository settings, transit content handler plugins,
logging
* preferences and application profiles runnable via the depot command line
script.
*/
-public class DepotPreferencesDialog extends JDialog
+class DepotPreferencesDialog extends JDialog
{
/**
* The DPML icon.

Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesFrame.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesFrame.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesFrame.java
Wed May 18 20:04:11 2005
@@ -45,14 +45,9 @@
* Transit cache and repository settings, transit content handler plugins,
logging
* preferences and application profiles runnable via the depot command line
script.
*/
-public class DepotPreferencesFrame extends JFrame
+class DepotPreferencesFrame extends JFrame
{
/**
- * The DPML icon.
- */
- private static String DPML_ICON_FILENAME =
"net/dpml/depot/prefs/images/dpml.gif";
-
- /**
* The default dialog width.
*/
private static final int DEFAULT_DIALOG_WIDTH = 400;

Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesPanel.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesPanel.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/DepotPreferencesPanel.java
Wed May 18 20:04:11 2005
@@ -46,7 +46,7 @@
* Transit cache and repository settings, transit content handler plugins,
logging
* preferences and application profiles runnable via the depot command line
script.
*/
-public class DepotPreferencesPanel extends JPanel
+class DepotPreferencesPanel extends JPanel
{
/**
* The DPML icon.
@@ -77,7 +77,7 @@

JLabel label =
IconHelper.createImageIconJLabel(
- Transit.class.getClassLoader(), DPML_ICON_FILENAME, "", "DPML
Depot" );
+ getClass().getClassLoader(), DPML_ICON_FILENAME, "", "DPML
Depot" );
label.setBorder( new EmptyBorder( 5, 0, 0, 0 ) );

JTabbedPane tabbedPane = new JTabbedPane();

Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/GenericTableModel.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/GenericTableModel.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/GenericTableModel.java
Wed May 18 20:04:11 2005
@@ -58,7 +58,7 @@
* Default small icon.
*/
private static final Icon FEATURE_ICON =
- IconHelper.createImageIcon( Transit.class.getClassLoader(), ICON_PATH,
"Features" );
+ IconHelper.createImageIcon( GenericTableModel.class.getClassLoader(),
ICON_PATH, "Features" );

private final Preferences m_preferences;


Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/IconHelper.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/IconHelper.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/IconHelper.java
Wed May 18 20:04:11 2005
@@ -24,6 +24,7 @@
import javax.swing.ImageIcon;

/**
+ * Utility class for loading image icons.
*/
public class IconHelper
{

Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/Main.java
==============================================================================
--- development/main/depot/station/src/main/net/dpml/depot/prefs/Main.java
(original)
+++ development/main/depot/station/src/main/net/dpml/depot/prefs/Main.java
Wed May 18 20:04:11 2005
@@ -18,6 +18,8 @@

package net.dpml.depot.prefs;

+import java.net.URL;
+import java.net.URLClassLoader;
import java.util.prefs.Preferences;
import java.util.logging.Logger;
import java.util.logging.Level;

Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/TransitPanel.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/TransitPanel.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/TransitPanel.java
Wed May 18 20:04:11 2005
@@ -157,7 +157,7 @@
{
JLabel label =
IconHelper.createImageIconJLabel(
- TransitPanel.class.getClassLoader(),
+ getClass().getClassLoader(),
"net/dpml/depot/prefs/images/cache.jpg",
"Properties",
"Cache handler properties and settings." );

Modified:
development/main/depot/station/src/main/net/dpml/depot/prefs/TransitResourceHostPanel.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/prefs/TransitResourceHostPanel.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/prefs/TransitResourceHostPanel.java
Wed May 18 20:04:11 2005
@@ -106,7 +106,7 @@

m_label =
IconHelper.createImageIconJLabel(
- Transit.class.getClassLoader(),
"net/dpml/depot/prefs/images/server.png", "Host", "Host: " + name );
+ getClass().getClassLoader(),
"net/dpml/depot/prefs/images/server.png", "Host", "Host: " + name );

m_label.setBorder( new EmptyBorder( 0, 5, 0, 10 ) );
JPanel labelPanel = new JPanel();
@@ -189,7 +189,7 @@
new TitledBorder( null, "Credentials", TitledBorder.LEFT,
TitledBorder.TOP), border5 ) );
// TODO: action support for credential settings
ImageIcon keysIcon = IconHelper.createImageIcon(
- Transit.class.getClassLoader(),
"net/dpml/depot/prefs/images/password.png", "Credentials" );
+ getClass().getClassLoader(),
"net/dpml/depot/prefs/images/password.png", "Credentials" );
JLabel keys = new JLabel( keysIcon );
JButton settings = new JButton( "Settings" );
settings.setEnabled( false );

Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/JarTask.java
==============================================================================
--- development/main/magic/core/src/main/net/dpml/magic/tasks/JarTask.java
(original)
+++ development/main/magic/core/src/main/net/dpml/magic/tasks/JarTask.java
Wed May 18 20:04:11 2005
@@ -102,6 +102,17 @@

addAttribute( main, "Created-By", DPML );
addAttribute( main, "Built-By", System.getProperty( "user.name"
) );
+ final String classpath = getProject().getProperty(
JAR_CLASSPATH_KEY );
+ if( null != classpath )
+ {
+ addAttribute( main, "Class-Path", classpath );
+ }
+ final String mainClass = getProject().getProperty( JAR_MAIN_KEY
);
+ if( null != mainClass )
+ {
+ addAttribute( main, "Main-Class", mainClass );
+ }
+
addAttribute( main, "Extension-Name", def.getInfo().getName() );
addAttribute( main, "Specification-Vendor", DPML );

@@ -124,18 +135,6 @@
final String defVersion = def.getInfo().getVersion();
addAttribute( main, "Implementation-Version", defVersion );

- final String classpath = getProject().getProperty(
JAR_CLASSPATH_KEY );
- if( null != classpath )
- {
- addAttribute( main, "Class-Path", classpath );
- }
-
- final String mainClass = getProject().getProperty( JAR_MAIN_KEY
);
- if( null != mainClass )
- {
- addAttribute( main, "Main-Class", mainClass );
- }
-
jar.addConfiguredManifest( manifest );
}
catch( Throwable e )

Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/JavadocTask.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/tasks/JavadocTask.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/tasks/JavadocTask.java
Wed May 18 20:04:11 2005
@@ -353,6 +353,8 @@

private String[][] TAG_LIST =
{
+ // TODO: turn this into something based on properties
+ /*
{ "metro.component", "Metro Component Type", "types" },
{ "metro.service", "Metro Service", "types" },
{ "metro.attribute", "Metro Attribute", "types" },
@@ -364,6 +366,7 @@
{ "metro.logger", "Metro Logger", "methods,constructors" },
{ "metro.configuration", "Metro Configuration Schema",
"methods,constructors" },
{ "metro.context", "Metro Context", "methods,constructors" }
+ */
};

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

Modified: development/main/metro/METRO.TXT
==============================================================================
--- development/main/metro/METRO.TXT (original)
+++ development/main/metro/METRO.TXT Wed May 18 20:04:11 2005
@@ -1,19 +1,6 @@

-Product: Magic
-Description: Intelligent Build System
+Product: Metro
+Description: Component Runtime Platform
Publisher: The Digital Product Meta Library
Revision: @PROJECT-VERSION@

-Installation Instructions
-=========================
-
-Contents of the distribution
-----------------------------
-
- /dpml-metro-@PROJECT-VERSION@
- /bin ............................. cli scripts for the metro system
- /docs ............................ javadoc for metro api
- /local ........................... jar and module files
- /prefs
- /metro ......................... metro configuration files
-

Modified:
development/main/metro/activity/src/main/net/dpml/activity/package.html
==============================================================================
--- development/main/metro/activity/src/main/net/dpml/activity/package.html
(original)
+++ development/main/metro/activity/src/main/net/dpml/activity/package.html
Wed May 18 20:04:11 2005
@@ -1,3 +1,3 @@
<body>
-Activity related interfaces covering component initialization, execution,
startable and stoppable components, suspension, and disposal.
+Runtime activity interfaces.
</body>

Modified:
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/ComponentBuilderTask.java
==============================================================================
---
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/ComponentBuilderTask.java
(original)
+++
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/ComponentBuilderTask.java
Wed May 18 20:04:11 2005
@@ -32,6 +32,7 @@
import net.dpml.parts.part.Part;
import net.dpml.parts.part.PartHolder;
import net.dpml.parts.part.PartReference;
+
import net.dpml.composition.builder.datatypes.CategoriesDataType;
import net.dpml.composition.builder.datatypes.ConfigurationDataType;
import net.dpml.composition.builder.datatypes.ContextDataType;
@@ -44,18 +45,21 @@
import net.dpml.composition.data.ContextDirective;
import net.dpml.composition.data.DependencyDirective;
import net.dpml.composition.data.DeploymentProfile;
+import net.dpml.composition.data.CategoriesDirective;
import net.dpml.composition.data.Mode;
+import net.dpml.composition.info.EntryDescriptor;
+import net.dpml.composition.info.InfoDescriptor;
+import net.dpml.composition.info.Type;
+import net.dpml.composition.info.TypeHolder;
+
import net.dpml.configuration.Configuration;
-import net.dpml.logging.data.CategoriesDirective;
+
import net.dpml.magic.model.Definition;
import net.dpml.magic.model.Policy;
import net.dpml.magic.model.Resource;
import net.dpml.magic.model.ResourceRef;
import net.dpml.magic.tasks.ProjectTask;
-import net.dpml.composition.info.EntryDescriptor;
-import net.dpml.composition.info.InfoDescriptor;
-import net.dpml.composition.info.Type;
-import net.dpml.composition.info.TypeHolder;
+
import net.dpml.parameters.Parameters;
import net.dpml.parameters.impl.DefaultParameters;


Modified:
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/CategoriesDataType.java
==============================================================================
---
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/CategoriesDataType.java
(original)
+++
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/CategoriesDataType.java
Wed May 18 20:04:11 2005
@@ -21,8 +21,8 @@
import java.util.List;
import java.util.LinkedList;

-import net.dpml.logging.data.CategoryDirective;
-import net.dpml.logging.data.CategoriesDirective;
+import net.dpml.composition.data.CategoryDirective;
+import net.dpml.composition.data.CategoriesDirective;

/**
* Build datatype used to construct a categories descriptor.

Modified:
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/ReferenceDataType.java
==============================================================================
---
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/ReferenceDataType.java
(original)
+++
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/ReferenceDataType.java
Wed May 18 20:04:11 2005
@@ -48,7 +48,7 @@

/**
* Set the uri that this directive references.
- * @param key the context entry key
+ * @param uri the uri
*/
public void setURI( final URI uri )
{

Added:
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/package.html
==============================================================================
--- (empty file)
+++
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+Datatypes using in the construction of component type meta-info.
+</p>
+
+</body>

Added:
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/package.html
==============================================================================
--- (empty file)
+++
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+A set of ant tasks supporting the creation of component type and deployment
information.
+</p>
+
+</body>

Added: development/main/metro/composition/content/build.xml
==============================================================================
--- (empty file)
+++ development/main/metro/composition/content/build.xml Wed May 18
20:04:11 2005
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="dpml-composition-content" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core">
+
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="init" depends="standard.init">
+ <x:property key="dpml-composition-part" feature="uri" type="plugin"
name="part.plugin"/>
+ <filter token="COMPOSITION-CONTENT-PART-HANDLER-PLUGIN-URI"
value="${part.plugin}"/>
+ </target>
+
+ <target name="package" depends="standard.package">
+ <x:export
class="net.dpml.composition.content.CompositionContentHandlerRegistry"/>
+ </target>
+
+</project>

Added:
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerDescriptor.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerDescriptor.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2005 Stephen 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.content;
+
+import java.util.logging.Logger;
+import java.util.prefs.PreferenceChangeEvent;
+import java.util.prefs.Preferences;
+
+import net.dpml.transit.content.DefaultContentHandlerDescriptor;
+
+/**
+ * A description of a pluggable content handler. This class wraps an
underlying
+ * preference node that describes a content handler plugin. It exposes
operations
+ * through which the plugin name and URI can be retrieved without directly
accessing
+ * the underlying Preferences instance.
+ */
+public class CompositionContentHandlerDescriptor extends
DefaultContentHandlerDescriptor
+{
+
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
+ /**
+ * A description of a pluggable part handler including the part handler
title
+ * and a uri referencing a plugin that is castable to a ContentHandler
instance.
+ *
+ * @param logger an internal logging channel
+ * @param prefs the preferences node containing part handler description
+ */
+ public CompositionContentHandlerDescriptor( Logger logger, Preferences
prefs )
+ {
+ super( logger, prefs );
+ }
+
+ //
------------------------------------------------------------------------
+ // PreferencesChangeListener
+ //
------------------------------------------------------------------------
+
+ /**
+ * Listen to changes in the preferences object that defines this
descriptor
+ * and reflect the changes in the state of the descriptor class.
+ *
+ * @param event the preference change event
+ */
+ public void preferenceChange( PreferenceChangeEvent event )
+ {
+ super.preferenceChange( event );
+ }
+
+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
+ protected void dispose()
+ {
+ super.dispose();
+ }
+}

Added:
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistry.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistry.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2005 Stephen 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.content;
+
+import java.io.IOException;
+import java.net.ContentHandler;
+import java.util.logging.Logger;
+import java.util.prefs.BackingStoreException;
+import java.util.prefs.Preferences;
+
+import net.dpml.transit.content.ContentHandlerDescriptor;
+import net.dpml.transit.content.DefaultContentHandlerRegistry;
+
+/**
+ * A registry of descriptions of plugable content handlers. This
implementation
+ * maps user defined preferences to instance of ContentHandlerDescriptor.
+ */
+public class CompositionContentHandlerRegistry extends
DefaultContentHandlerRegistry
+{
+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
+ private Logger m_logger;
+
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
+ /**
+ * Responsible for the establishment of a map containing keys that
correspond to
+ * artifact types, and values that correspond to the description of a
+ * content type handler plugins.
+ *
+ * @param logger the assigned logging channel
+ * @param prefs the root preferences node for content handler plugin
settings
+ */
+ public CompositionContentHandlerRegistry( Logger logger, Preferences
prefs ) throws BackingStoreException
+ {
+ super( logger, prefs );
+ m_logger = logger;
+ }
+
+ //
------------------------------------------------------------------------
+ // ContentHandlerRegistry
+ //
------------------------------------------------------------------------
+
+ public ContentHandler getContentHandler( final String type ) throws
IOException
+ {
+ return super.getContentHandler( type );
+ }
+
+ //
------------------------------------------------------------------------
+ // internals
+ //
------------------------------------------------------------------------
+
+ /**
+ * Add a description of a content handler based on a supplied
+ * prefernces object. The name of the preferences object
+ * corresponds to an artifact type. Request for the resolution
+ * of URL content may be resolved by locating a content handler
+ * plugin for the type exposed by the URL.
+ */
+ protected void addContentHandlerDescriptor( ContentHandlerDescriptor
descriptor )
+ {
+ super.addContentHandlerDescriptor( descriptor );
+ }
+
+ /**
+ * Add a description of a content handler based on a supplied
+ * prefernces object. The name of the preferences object
+ * corresponds to an artifact type. Request for the resolution
+ * of URL content may be resolved by locating a content handler
+ * plugin for the type exposed by the URL.
+ */
+ protected void addContentHandlerDescriptor( Preferences prefs )
+ {
+ ContentHandlerDescriptor descriptor = new
CompositionContentHandlerDescriptor( m_logger, prefs );
+ addContentHandlerDescriptor( descriptor );
+ }
+
+ /**
+ * Remove a content handler descriptor.
+ * @param prefs the preferences node
+ */
+ protected ContentHandlerDescriptor removeContentHandlerDescriptor(
Preferences prefs )
+ {
+ return super.removeContentHandlerDescriptor( prefs );
+ }
+}

Added:
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistryInstaller.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistryInstaller.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005 Stephen 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.content;
+
+import java.util.prefs.Preferences;
+
+import net.dpml.transit.content.Transit;
+
+/**
+ * A registry of descriptions of plugable content handlers. This
implementation
+ * maps user defined preferences to instance of ContentHandlerDescriptor.
+ */
+public class CompositionContentHandlerRegistryInstaller
+{
+ public CompositionContentHandlerRegistryInstaller()
+ {
+ Preferences prefs = Preferences.userNodeForPackage( Transit.class
).node( "content" );
+ Preferences p = prefs.node( "part" );
+ p.put( "title", "Part Content Handler" );
+ p.put( "uri", "@COMPOSITION-CONTENT-PART-HANDLER-PLUGIN-URI@" );
+ }
+}

Added:
development/main/metro/composition/content/src/main/net/dpml/composition/content/package.html
==============================================================================
--- (empty file)
+++
development/main/metro/composition/content/src/main/net/dpml/composition/content/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+The 'content' package is a plugin that overrides the standard Transit
content handling sub-system. It includes a installer that handles the setup
of preferences through which the Metro part plugin is assigned as a content
handler for part types.
+</p>
+</body>
+

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/control/ComponentController.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/control/ComponentController.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/ComponentController.java
Wed May 18 20:04:11 2005
@@ -62,8 +62,6 @@
import net.dpml.parts.state.RecursiveInitializationException;
import net.dpml.parts.state.RecursiveTerminationException;

-import net.dpml.system.SystemContext;
-
/**
* The ComponentController class is a controller of a component instance.
*
@@ -77,14 +75,12 @@
private final URI m_uri;
private final CompositionController m_controller;
private final Monitor m_monitor;
- private final SystemContext m_system;

- public ComponentController( Monitor monitor, SystemContext system,
CompositionController controller )
+ public ComponentController( Monitor monitor, CompositionController
controller )
{
m_controller = controller;
m_monitor = monitor;
- m_system = system;
- m_lifecycleHandler = new LifecycleHandler( monitor, system );
+ m_lifecycleHandler = new LifecycleHandler( monitor );
URI uri = controller.getURI();
String path = uri.getSchemeSpecificPart();
m_uri = CompositionController.createURI( "manager", path );

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
Wed May 18 20:04:11 2005
@@ -42,6 +42,7 @@
import net.dpml.composition.model.CompositionModel;
import net.dpml.composition.model.ValueModel;

+import net.dpml.parts.control.ControllerContext;
import net.dpml.parts.control.HandlerNotFoundException;
import net.dpml.parts.control.ControlRuntimeException;
import net.dpml.parts.control.Controller;
@@ -50,7 +51,6 @@
import net.dpml.parts.control.LifecycleException;
import net.dpml.parts.control.Monitor;
import net.dpml.parts.control.PartNotFoundException;
-
import net.dpml.parts.control.Manager;

import net.dpml.parts.model.Model;
@@ -60,8 +60,6 @@

import net.dpml.parts.part.Part;

-import net.dpml.system.SystemContext;
-
/**
* A initial test controller.
*
@@ -81,9 +79,8 @@
//--------------------------------------------------------------------

private final Monitor m_monitor;
- private final SystemContext m_system;
+ private final ControllerContext m_context;
private final LifestyleHandler m_lifestyleHandler;
- private final URI m_partition;
private final ValueController m_valueController;

private final Logger m_logger;
@@ -92,20 +89,15 @@
// constructor
//--------------------------------------------------------------------

- CompositionController( SystemContext system, URI partition )
+ CompositionController( ControllerContext context )
{
super();
- m_logger = getLoggerForURI( partition );
- if( system.getDebugMode() )
- {
- m_logger.setLevel( Level.FINE );
- }
+ m_logger = getLoggerForURI( context.getURI() );
m_logger.info( "metro controller established" );
m_monitor = new DefaultMonitor( m_logger );
- m_system = system;
- m_partition = partition;
+ m_context = context;
m_valueController = new ValueController( this );
- ComponentController manager = new ComponentController( m_monitor,
system, this );
+ ComponentController manager = new ComponentController( m_monitor,
this );
m_lifestyleHandler = new LifestyleHandler( m_monitor, manager );
}

@@ -155,7 +147,7 @@
* 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:context.uri</li>
* <li>system:work.dir</li>
* <li>system:temp.dir</li>
* <li>model:name</li>
@@ -173,17 +165,17 @@
String key = urn.getSchemeSpecificPart();
if( "system".equals( scheme ) )
{
- if( "domain.uri".equals( key ) )
+ if( "context.uri".equals( key ) )
{
- return m_system.getDomain();
+ return m_context.getURI();
}
else if( "work.dir".equals( key ) )
{
- return m_system.getWorkingDirectory();
+ return m_context.getWorkingDirectory();
}
else if( "temp.dir".equals( key ) )
{
- return m_system.getTempDirectory();
+ return m_context.getTempDirectory();
}
else
{
@@ -229,7 +221,7 @@

public String getName()
{
- return m_partition.toString();
+ return m_context.getURI().toString();
}

public Model getPart( CompositionModel model, String key )
@@ -372,7 +364,7 @@
/**
* Return a nested component for a supplied part.
*
- * @param model the enclosing model
+ * @param owner the owning component (not used)
* @param classloader the parent classloader
* @param part the part datastructure
* @param key the key to assign to the model
@@ -387,6 +379,7 @@
/**
* Return a nested component for a supplied part using enclosing model.
*
+ * @param owner the owning component (not used)
* @param model the enclosing model
* @param classloader the parent classloader
* @param part the part datastructure
@@ -412,8 +405,8 @@
/**
* Return a default instance model.
*
+ * @param owner the owning component (not used)
* @param model the reference model
- * @param identity the instance identity
* @return the model
*/
public Component getComponent( Component owner, Model model )
@@ -432,8 +425,9 @@
/**
* Return a default instance model.
*
+ * @param owner the owning component (not used)
* @param model the reference model
- * @param identity the instance identity
+ * @param key the instance identity
* @return the model
*/
public Component getComponent( Component owner, Model model, Object key
)
@@ -444,8 +438,9 @@
/**
* Return a default instance model.
*
+ * @param owner the owning component (not used)
* @param model the reference model
- * @param identity the instance identity
+ * @param key the instance identity
* @return the model
*/
public ComponentEntry getComponentEntry( Component owner, Model model,
Object key )
@@ -489,11 +484,22 @@
return this;
}

+ /**
+ * Return a log channel for a supplied model.
+ * @param model the composition model
+ * @return the logging channel
+ */
public Logger getLogChannel( CompositionModel model )
{
return getLogChannel( model, null );
}

+ /**
+ * Return a named log channel for a supplied model.
+ * @param model the composition model
+ * @param category the logging category name
+ * @return the logging channel
+ */
public Logger getLogChannel( CompositionModel model, String category )
{
URI uri = model.getURI();
@@ -506,13 +512,6 @@
return Logger.getLogger( channel );
}

- public Object getLoggingChannel( CompositionModel model )
- {
- URI uri = model.getURI();
- String path = model.getURI().getSchemeSpecificPart();
- return m_system.getLoggingManager().getLoggerForCategory( path );
- }
-
/**
* Return the monitor assigned to this controller.
*
@@ -525,7 +524,7 @@

private URI getPartition()
{
- return m_partition;
+ return m_context.getURI();
}

private URI getPartition( Model model )

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
Wed May 18 20:04:11 2005
@@ -35,6 +35,7 @@

import net.dpml.parts.control.ControlRuntimeException;
import net.dpml.parts.control.Controller;
+import net.dpml.parts.control.ControllerContext;
import net.dpml.parts.control.DelegationException;
import net.dpml.parts.control.HandlerNotFoundException;
import net.dpml.parts.control.PartNotFoundException;
@@ -44,8 +45,6 @@
import net.dpml.parts.model.ModelException;
import net.dpml.parts.part.Part;

-import net.dpml.system.SystemContext;
-
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.GnuParser;
@@ -66,9 +65,8 @@
// state
//--------------------------------------------------------------------

- private final SystemContext m_context;
+ private final ControllerContext m_context;
private final ClassLoader m_classloader;
- private final URI m_partition;
private final Set m_components = Collections.synchronizedSet( new
HashSet() );
private final Map m_instances = new Hashtable();

@@ -76,12 +74,11 @@
// constructor
//--------------------------------------------------------------------

- public CompositionManager( SystemContext system, String[] args ) throws
Exception
+ public CompositionManager( ControllerContext context, String[] args )
throws Exception
{
- super( system, createPartition( system ) );
+ super( context );

- m_context = system;
- m_partition = createPartition( system );
+ m_context = context;
m_classloader =
net.dpml.composition.info.Type.class.getClassLoader();

setShutdownHook( this );
@@ -173,7 +170,7 @@

private URI getPartition()
{
- return m_partition;
+ return m_context.getURI();
}

private ClassLoader getClassLoader()
@@ -298,6 +295,7 @@
// static utilities
//--------------------------------------------------------------------

+ /*
private static URI createPartition( SystemContext system )
{
URI uri = system.getDomain();
@@ -322,6 +320,7 @@
throw new RuntimeException( error, e );
}
}
+ */

private static Options buildCommandLineOptions()
{

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
Wed May 18 20:04:11 2005
@@ -30,8 +30,6 @@
import net.dpml.composition.model.ComponentEntry;
import net.dpml.composition.model.CompositionModel;

-import net.dpml.system.SystemContext;
-
/**
* This makes a dynamic proxy for an object. The object can be represented
* by one, some or all of it's interfaces.
@@ -47,11 +45,6 @@
//-------------------------------------------------------------------

/**
- * The system context.
- */
- private final SystemContext m_system;
-
- /**
* The component model.
*/
private final ComponentEntry m_component;
@@ -66,10 +59,9 @@
* @param system the system context
* @param model the component model
*/
- ContextInvocationHandler( SystemContext system, ComponentEntry component
)
+ ContextInvocationHandler( ComponentEntry component )
throws LifecycleException, ModelException
{
- m_system = system;
m_component = component;
}


Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/control/ContextManagerInvocationHandler.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/control/ContextManagerInvocationHandler.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/ContextManagerInvocationHandler.java
Wed May 18 20:04:11 2005
@@ -27,8 +27,6 @@

import net.dpml.parts.model.ModelException;

-import net.dpml.system.SystemContext;
-
/**
* This makes a dynamic proxy for an object. The object can be represented
* by one, some or all of it's interfaces.
@@ -48,11 +46,10 @@
* @param system the system context
* @param model the component model
*/
- ContextManagerInvocationHandler(
- SystemContext system, ComponentEntry holder )
+ ContextManagerInvocationHandler( ComponentEntry holder )
throws LifecycleException, ModelException
{
- super( system, holder );
+ super( holder );
}

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

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/control/LifecycleHandler.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/control/LifecycleHandler.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/LifecycleHandler.java
Wed May 18 20:04:11 2005
@@ -24,17 +24,20 @@
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.URI;
+import java.util.logging.Logger;

import net.dpml.composition.model.ComponentEntry;
import net.dpml.composition.model.CompositionModel;
+
import net.dpml.configuration.Configuration;
+
import net.dpml.lang.DefaultInvocationHandler;
-import net.dpml.logging.Logger;
+
import net.dpml.parameters.Parameters;
+
import net.dpml.parts.control.LifecycleException;
import net.dpml.parts.control.LifecycleRuntimeException;
import net.dpml.parts.control.Monitor;
-import net.dpml.system.SystemContext;


/**
@@ -69,12 +72,10 @@
}

private final Monitor m_monitor;
- private final SystemContext m_system;

- LifecycleHandler( Monitor monitor, SystemContext system )
+ LifecycleHandler( Monitor monitor )
{
m_monitor = monitor;
- m_system = system;
}

/**
@@ -107,14 +108,10 @@
for( int i=0; i<classes.length; i++ )
{
Class c = classes[i];
- if( java.util.logging.Logger.class.isAssignableFrom( c ) )
+ if( Logger.class.isAssignableFrom( c ) )
{
args[i] = model.getCompositionController().getLogChannel(
model );
}
- else if( Logger.class.isAssignableFrom( c ) )
- {
- args[i] =
model.getCompositionController().getLoggingChannel( model );
- }
else if( ( null != parts ) && parts.isAssignableFrom( c ) )
{
args[i] = newPartsInvocationHandler( holder, parts );
@@ -342,7 +339,7 @@
{
try
{
- InvocationHandler handler = new ContextInvocationHandler(
m_system, holder );
+ InvocationHandler handler = new ContextInvocationHandler( holder
);
ClassLoader classloader =
holder.getModel().getDeploymentClass().getClassLoader();
return Proxy.newProxyInstance( classloader, new Class[]{ clazz
}, handler );
}
@@ -358,7 +355,7 @@
{
try
{
- InvocationHandler handler = new PartsInvocationHandler(
m_system, holder );
+ InvocationHandler handler = new PartsInvocationHandler( holder );
ClassLoader classloader =
holder.getModel().getDeploymentClass().getClassLoader();
return Proxy.newProxyInstance( classloader, new Class[]{ clazz
}, handler );
}

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/control/PartsInvocationHandler.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/control/PartsInvocationHandler.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/PartsInvocationHandler.java
Wed May 18 20:04:11 2005
@@ -34,8 +34,6 @@
import net.dpml.parts.model.Model;
import net.dpml.parts.control.Manager;

-import net.dpml.system.SystemContext;
-
/**
* The parts invocation handler maps client request for 'get', 'create' and
* 'release' relative to keys identified by the method name. Method name
@@ -63,11 +61,6 @@
*/
private final ComponentEntry m_holder;

- /**
- * The system context.
- */
- private final SystemContext m_system;
-
//-------------------------------------------------------------------
// constructor
//-------------------------------------------------------------------
@@ -77,11 +70,10 @@
*
* @param model the component model
*/
- PartsInvocationHandler( SystemContext system, ComponentEntry holder )
+ PartsInvocationHandler( ComponentEntry holder )
throws NullPointerException
{
m_holder = holder;
- m_system = system;
}

//-------------------------------------------------------------------
@@ -118,11 +110,6 @@
return m_holder.getModel();
}

- SystemContext getSystemContext()
- {
- return m_system;
- }
-
/**
* Invoke the specified method on underlying object.
* This is called by the proxy object.
@@ -228,9 +215,8 @@
Controller controller = model.getController();
ComponentEntry component = getComponentEntry( model, args );
ClassLoader classloader = model.getClassLoader();
- SystemContext system = getSystemContext();
ContextManagerInvocationHandler handler =
- new ContextManagerInvocationHandler( system, component );
+ new ContextManagerInvocationHandler( component );
return Proxy.newProxyInstance( classloader, new Class[]{
clazz }, handler );
}
else if( PartDescriptor.PROVIDER_KEY.equals( postfix ) )

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/control/package.html
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/control/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+Metro component model controller implementation.
+</p>
+
+</body>

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/data/CategoriesDirective.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/data/CategoriesDirective.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,162 @@
+/*
+ * 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.data;
+
+import java.io.Serializable;
+
+
+/**
+ * Description of the configuration of a set of categories.
+ *
+ * @see CategoryDirective
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Id: CategoriesDirective.java 259 2004-10-30 07:24:40Z mcconnell
$
+ */
+public class CategoriesDirective extends CategoryDirective implements
Serializable
+{
+ /**
+ * The root category hierachy.
+ */
+ private CategoryDirective[] m_categories;
+
+ /**
+ * Create a CategoriesDirective instance.
+ */
+ public CategoriesDirective()
+ {
+ this( "" );
+ }
+
+ /**
+ * Create a CategoriesDirective instance.
+ *
+ * @param name the base category name
+ */
+ public CategoriesDirective( final String name )
+ {
+ this( name, null, null, new CategoryDirective[0] );
+ }
+
+ /**
+ * Create a CategoriesDirective instance.
+ *
+ * @param categories the categories to include in the directive
+ */
+ public CategoriesDirective( CategoryDirective[] categories )
+ {
+ this( "", null, null, categories );
+ }
+
+
+ /**
+ * Create a CategoriesDirective instance.
+ *
+ * @param name the base category name
+ * @param priority the default logging priority
+ * @param target the default logging target
+ * @param categories the logging category descriptors
+ */
+ public CategoriesDirective( final String name,
+ final String priority,
+ final String target,
+ final CategoryDirective[] categories )
+ {
+ super( name, priority, target );
+ if( categories == null )
+ {
+ m_categories = new CategoryDirective[ 0 ];
+ }
+ else
+ {
+ m_categories = categories;
+ }
+ }
+
+ /**
+ * Return the set of logging categories.
+ *
+ * @return the set of category declarations
+ */
+ public CategoryDirective[] getCategories()
+ {
+ return m_categories;
+ }
+
+ /**
+ * Return a named category.
+ *
+ * @param name the category name
+ * @return the category declaration
+ */
+ public CategoryDirective getCategoryDirective( String name )
+ {
+ for( int i = 0; i < m_categories.length; i++ )
+ {
+ final CategoryDirective category = m_categories[ i ];
+ if( category.getName().equalsIgnoreCase( name ) )
+ {
+ return category;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Test this object for equality with the suppplied object.
+ *
+ * @return TRUE if this object equals the supplied object
+ * else FALSE
+ */
+ public boolean equals( Object other )
+ {
+ boolean isEqual = other instanceof CategoriesDirective;
+ if ( isEqual ) isEqual = super.equals( other );
+
+ if ( isEqual )
+ {
+ CategoriesDirective cat = (CategoriesDirective) other;
+ if ( isEqual ) isEqual = m_categories.length ==
cat.m_categories.length;
+ if ( isEqual )
+ {
+ for ( int i = 0; i < m_categories.length && isEqual; i++ )
+ {
+ isEqual = m_categories[i].equals( cat.m_categories[i] );
+ }
+ }
+ }
+ return isEqual;
+ }
+
+ /**
+ * Return the hashcode for the object.
+ * @return the cashcode
+ */
+ public int hashCode()
+ {
+ int hash = super.hashCode();
+ for ( int i = 0; i < m_categories.length; i++ )
+ {
+ hash = hash + 687364287;
+ hash ^= m_categories[i].hashCode();
+ }
+ return hash;
+ }
+
+
+}

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/data/CategoryDirective.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/data/CategoryDirective.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,225 @@
+/*
+ * 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.data;
+
+import java.io.Serializable;
+
+/**
+ * A logging category descriptor hierachy. The descriptor contains a
category name, a
+ * optional priority value, and an optional target. If the priority or
target values
+ * null, the resulting value will be derived from the parent category
desciptor. A
+ * category descriptor may 0-n subsidiary categories. CategoryDirective
names are relative.
+ * For example, the category "orb" will appear as "my-app.orb" if the parent
category
+ * name is "my-app".
+ *
+ * <p><b>XML</b></p>
+ * <pre>
+ * &lt;categories priority="<font color="darkred">INFO</font>"&gt;
+ * &lt;category priority="<font color="darkred">DEBUG</font>"
name="<font color="darkred">loader</font>" /&gt;
+ * &lt;category priority="<font color="darkred">WARN</font>"
name="<font color="darkred">types</font>" /&gt;
+ * &lt;category priority="<font color="darkred">ERROR</font>"
name="<font color="darkred">types.builder</font>" target="<font
color="darkred">default</font>"/&gt;
+ * &lt;category name="<font color="darkred">profiles</font>" /&gt;
+ * &lt;category name="<font color="darkred">lifecycle</font>" /&gt;
+ * &lt;category name="<font color="darkred">verifier</font>" /&gt;
+ * &lt;/categories&gt;
+ * </pre>
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Id: CategoryDirective.java 259 2004-10-30 07:24:40Z mcconnell $
+ */
+public class CategoryDirective implements Serializable
+{
+
+ /**
+ * Constant category priority value for debug mode.
+ */
+ public static final String DEBUG = "DEBUG";
+
+ /**
+ * Constant category priority value for info mode.
+ */
+ public static final String INFO = "INFO";
+
+ /**
+ * Constant category priority value for warning mode.
+ */
+ public static final String WARN = "WARN";
+
+ /**
+ * Constant category priority value for error mode.
+ */
+ public static final String ERROR = "ERROR";
+
+ /**
+ * The logging category name.
+ */
+ private String m_name;
+
+ /**
+ * The default logging priority.
+ */
+ private final String m_priority;
+
+ /**
+ * The default logging target.
+ */
+ private final String m_target;
+
+ /**
+ * Creation of a new CategoryDirective using a supplied name.
+ *
+ * @param name the category name
+ */
+ public CategoryDirective( final String name )
+ {
+ this( name, null, null );
+ }
+
+ /**
+ * Creation of a new CategoryDirective using a supplied name and
priority.
+ *
+ * @param name the category name
+ * @param priority the category priority - DEBUG, INFO, WARN, or ERROR
+ */
+ public CategoryDirective( final String name, String priority )
+ {
+ this( name, priority, null );
+ }
+
+ /**
+ * Creation of a new CategoryDirective using a supplied name, priority,
target and
+ * collection of subsidiary categories.
+ *
+ * @param name the category name
+ * @param priority the category priority - DEBUG, INFO, WARN, or ERROR
+ * @param target the name of a logging category target
+ *
+ */
+ public CategoryDirective(
+ final String name, final String priority, final String target )
+ {
+ m_name = name;
+ m_target = target;
+ if( priority != null )
+ {
+ m_priority = priority.trim().toUpperCase();
+ }
+ else
+ {
+ m_priority = null;
+ }
+ }
+
+ /**
+ * Return the category name.
+ *
+ * @return the category name
+ */
+ public String getName()
+ {
+ return m_name;
+ }
+
+ /**
+ * Return the logging priority for the category.
+ *
+ * @return the logging priority for the category
+ */
+ public String getPriority()
+ {
+ return m_priority;
+ }
+
+ /**
+ * Return the default log target for the category.
+ *
+ * @return the default target name
+ */
+ public String getTarget()
+ {
+ return m_target;
+ }
+
+ public boolean equals(Object other)
+ {
+ if( null == other )
+ {
+ return false;
+ }
+
+ if( ! ( other instanceof CategoryDirective ) )
+ {
+ return false;
+ }
+
+ CategoryDirective test = (CategoryDirective) other;
+ return ( equalName( test.getName() )
+ && equalPriority( test.getPriority() )
+ && equalTarget( test.getTarget() ) );
+ }
+
+ private boolean equalName( String other )
+ {
+ if( m_name == null )
+ {
+ return other == null;
+ }
+ else
+ {
+ return m_name.equals( other );
+ }
+ }
+
+ private boolean equalPriority( String other )
+ {
+ if( m_priority == null )
+ {
+ return other == null;
+ }
+ else
+ {
+ return m_priority.equals( other );
+ }
+ }
+
+ private boolean equalTarget( String other )
+ {
+ if( m_target == null )
+ {
+ return other == null;
+ }
+ else
+ {
+ return m_target.equals( other );
+ }
+ }
+
+ public int hashCode()
+ {
+ int hash = m_name.hashCode();
+ if( m_priority != null )
+ {
+ hash ^= m_priority.hashCode();
+ }
+ if( m_target != null )
+ {
+ hash ^= m_target.hashCode();
+ }
+ return hash;
+ }
+}

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/data/ComponentProfile.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/data/ComponentProfile.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/data/ComponentProfile.java
Wed May 18 20:04:11 2005
@@ -20,8 +20,6 @@

import net.dpml.parts.part.PartReference;
import net.dpml.configuration.Configuration;
-import net.dpml.lang.NullArgumentException;
-import net.dpml.logging.data.CategoriesDirective;
import net.dpml.composition.info.InfoDescriptor;
import net.dpml.parameters.Parameters;

@@ -154,7 +152,7 @@
* @param classname the classname of the component type
*/
public ComponentProfile( final String name, final String classname )
- throws NullArgumentException
+ throws NullPointerException
{
this(
name, DeploymentProfile.DEFAULT,
InfoDescriptor.UNDEFINED_COLLECTION, "request", classname, null, null, null,
@@ -167,7 +165,7 @@
* @param template the template deployment profile
*/
public ComponentProfile( String name, ComponentProfile template )
- throws NullArgumentException
+ throws NullPointerException
{
this(
name,
@@ -199,13 +197,13 @@
final Configuration config,
final ClassLoaderDirective classloader,
final Mode mode )
- throws NullArgumentException
+ throws NullPointerException
{
super( name, activation, mode, categories, classloader );

if( null == classname )
{
- throw new NullArgumentException( "classname" );
+ throw new NullPointerException( "classname" );
}

if( null == context )

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/data/ContextDirective.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/data/ContextDirective.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/data/ContextDirective.java
Wed May 18 20:04:11 2005
@@ -43,7 +43,6 @@
* &lt;/context&gt;
* </pre>
*
- * @see EntryDirective
* @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
* @version $Id$
*/

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/data/DeploymentProfile.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/data/DeploymentProfile.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/data/DeploymentProfile.java
Wed May 18 20:04:11 2005
@@ -25,8 +25,6 @@

import net.dpml.parts.part.Part;

-import net.dpml.logging.data.CategoriesDirective;
-
/**
* Abstract base class for ComponentProfile and ContainmentProfile.
*

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/data/ReferenceDirective.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/data/ReferenceDirective.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/data/ReferenceDirective.java
Wed May 18 20:04:11 2005
@@ -40,9 +40,8 @@

/**
* Creation of a new entry directive.
- * @param key the context entry key
- * @param containerKey the container scoped key value to import
- * @exception NullPointerExceptionif the containerKey argument is null.
+ * @param uri a uri referencing a a part in an enclosing container
+ * @exception NullPointerException if the uri argument is null.
*/
public ReferenceDirective( final URI uri )
throws NullPointerException

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/data/package.html
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/data/package.html
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/data/package.html
Wed May 18 20:04:11 2005
@@ -1,9 +1,7 @@

<body>
<p>
-The data package contains a revised implementation of the meta-data model
-that is focussed towards the creation of a serialized deployment scenario
-that can be supplied to a container for execution.
+Immutable datatypes used to describe a deployment scenario.
</p>

</body>

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/event/WeakEventProducer.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/event/WeakEventProducer.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/event/WeakEventProducer.java
Wed May 18 20:04:11 2005
@@ -200,12 +200,29 @@
*/
protected void enqueueEvent( EventObject event )
{
- if( m_listeners.size() != 0 )
+ enqueueEvent( event, true );
+ }
+
+ /**
+ * Enqueue an event for delivery to registered
+ * listeners unless there are no registered
+ * listeners.
+ */
+ protected void enqueueEvent( EventObject event, boolean asynchronouse )
+ {
+ if( m_listeners.size() != 0 )
{
- synchronized( EVENT_QUEUE )
+ if( asynchronouse )
+ {
+ synchronized( EVENT_QUEUE )
+ {
+ EVENT_QUEUE.add( event );
+ EVENT_QUEUE.notify();
+ }
+ }
+ else
{
- EVENT_QUEUE.add( event );
- EVENT_QUEUE.notify();
+ processEvent( event );
}
}
}

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/event/package.html
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/event/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+The event package contains utilities dealing with event delevery.
+</p>
+
+</body>

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/info/PartDescriptor.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/info/PartDescriptor.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/info/PartDescriptor.java
Wed May 18 20:04:11 2005
@@ -213,8 +213,7 @@
* Construct a part descriptor with the supplied key, type and default
get semantics.
*
* @param key the key resolved from the method name
- * @param type the argument type corresponding to the method return type
- * for get and create methods, and the single parameter for the
release method
+ * @param operations an array of operations
* @exception NullPointerException if key or operations array is null
*/
public PartDescriptor( final String key, final Operation[] operations )
throws NullPointerException

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/info/package.html
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/info/package.html
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/info/package.html
Wed May 18 20:04:11 2005
@@ -1,6 +1,10 @@

<body>
<p>
+Immutable datatypes that describe a component type.
+</p>
+
+<p>
Type is an assembly of descriptors of the constraints a component
type declares towards a container and includes declaration of service
dependencies, Logger establishment criteria, Configuration, Parameters

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/model/AbstractComponent.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/model/AbstractComponent.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/model/AbstractComponent.java
Wed May 18 20:04:11 2005
@@ -147,7 +147,7 @@
* exposes a component's service interfaces to a client. If the
isolation policy if
* FALSE the implementation shall return the component implementation
instance.
*
- * @param isolation the isolation policy
+ * @param policy the isolation policy
* @return the resolved instance
*/
public Object resolve( boolean policy ) throws Exception
@@ -191,7 +191,7 @@
*
* @param instance the instance to release
*/
- public void release( Object object )
+ public void release( Object instance )
{
}


Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/model/ComponentTable.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/model/ComponentTable.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/model/ComponentTable.java
Wed May 18 20:04:11 2005
@@ -40,7 +40,7 @@
/**
* Creation of a new instance table.
*
- * @param controller the controller
+ * @param model the model that this component table is a part of
*/
public ComponentTable( CompositionModel model )
{

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/model/CompositionModel.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/model/CompositionModel.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/model/CompositionModel.java
Wed May 18 20:04:11 2005
@@ -88,7 +88,6 @@
* @param partition a name defining the partition that this model exists
within
* @param classloader the classloader established for this model
* @param profile the component profile from which initial default values
are established
- * @param name the name of the model
*/
public CompositionModel(
CompositionController controller, URI partition, ClassLoader
classloader, ComponentProfile profile )

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/model/ReferenceEntry.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/model/ReferenceEntry.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/model/ReferenceEntry.java
Wed May 18 20:04:11 2005
@@ -67,9 +67,8 @@
*
* @param controller this model's controller
* @param key the entry key
- * @param model the default provider model
+ * @param provider the default provider model
* @param ref the reference uri used to establish the default provider
model
-
* @exception NullArgumentException if either the directive argument or
the
* context argument is null.
*/

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/model/ValueEntry.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/model/ValueEntry.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/model/ValueEntry.java
Wed May 18 20:04:11 2005
@@ -64,12 +64,13 @@
/**
* Creation of a new context entry import model.
*
- * @param name the name of this value model
- * @param controller the value model's controller
+ * @param monitor a monitor
+ * @param model the value model
+ * @param name the entry name
+ * @param manager the value model's manager
* @param classloader the assigned classloader
* @param directive the value directive from which we construct the value
model
- * @param model the enclosing model
-
+ * @param parent the parent model
* @exception NullArgumentException if either the directive argument or
the
* context argument is null.
*/

Modified:
development/main/metro/composition/control/src/main/net/dpml/composition/model/ValueModel.java
==============================================================================
---
development/main/metro/composition/control/src/main/net/dpml/composition/model/ValueModel.java
(original)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/model/ValueModel.java
Wed May 18 20:04:11 2005
@@ -60,11 +60,13 @@
/**
* Creation of a new context entry import model.
*
- * @param name the name of this value model
+ * @param monitor a monitor
* @param controller the value model's controller
+ * @param partition the assigned partition
+ * @param manager the models manager
* @param classloader the assigned classloader
* @param directive the value directive from which we construct the value
model
- * @param model the enclosing model
+ * @param parent the parent model
* @exception NullArgumentException if either the directive argument or
the
* context argument is null.
*/

Added:
development/main/metro/composition/control/src/main/net/dpml/composition/model/package.html
==============================================================================
--- (empty file)
+++
development/main/metro/composition/control/src/main/net/dpml/composition/model/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+Classes that maintain the state of components, component models, and value
types.
+</p>
+
+</body>

Added: development/main/metro/composition/part/build.xml
==============================================================================
--- (empty file)
+++ development/main/metro/composition/part/build.xml Wed May 18 20:04:11
2005
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="dpml-composition-part" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core">
+
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="init" depends="standard.init">
+ <x:filter feature="name" token="NAME"/>
+ <x:filter feature="version" token="VERSION"/>
+ <x:filter feature="group" token="GROUP"/>
+ </target>
+
+ <target name="package" depends="standard.package">
+ <x:export class="net.dpml.composition.part.CompositionContentHandler"/>
+ </target>
+
+</project>

Added:
development/main/metro/composition/part/src/main/net/dpml/composition/part/CompositionContentHandler.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/part/src/main/net/dpml/composition/part/CompositionContentHandler.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,185 @@
+/*
+ * 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.part;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLConnection;
+import java.net.ContentHandler;
+import java.net.UnknownServiceException;
+import java.util.Hashtable;
+import java.util.Map;
+
+import net.dpml.composition.control.CompositionManager;
+
+import net.dpml.transit.repository.Repository;
+
+import net.dpml.parts.control.ControlRuntimeException;
+
+import net.dpml.parts.part.Part;
+import net.dpml.parts.model.Model;
+import net.dpml.parts.model.Provider;
+import net.dpml.parts.model.Component;
+
+
+/**
+ * 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 CompositionContentHandler extends ContentHandler
+{
+ //------------------------------------------------------------------
+ // state
+ //------------------------------------------------------------------
+
+ private CompositionManager m_manager;
+
+ //------------------------------------------------------------------
+ // constructor
+ //------------------------------------------------------------------
+
+ public CompositionContentHandler( CompositionControllerContext context )
throws Exception
+ {
+ if( null == context )
+ {
+ throw new NullPointerException( "context" );
+ }
+ m_manager = new CompositionManager( context, new String[0] );
+ }
+
+ //------------------------------------------------------------------
+ // ContentHandler
+ //------------------------------------------------------------------
+
+ public Object getContent( URLConnection connection )
+ {
+ return getContent( connection, new Class[0] );
+ }
+
+ public Object getContent( URLConnection connection, Class[] classes )
+ {
+ URL url = connection.getURL();
+ if( classes.length == 0 )
+ {
+ return getPart( url );
+ }
+ else
+ {
+ for( int i=0; i<classes.length; i++ )
+ {
+ Class c = classes[i];
+ if( Part.class.isAssignableFrom( c ) )
+ {
+ return getPart( url );
+ }
+ else if( Model.class.isAssignableFrom( c ) )
+ {
+ return getModel( url );
+ }
+ else if( Provider.class.isAssignableFrom( c ) )
+ {
+ Model model = getModel( url );
+ return model.getProvider();
+ }
+ else if( Object.class.equals( c ) )
+ {
+ Model model = getModel( url );
+ try
+ {
+ return model.getProvider().resolve( false );
+ }
+ catch( Throwable e )
+ {
+ final String error =
+ "Unable to load part due: " + url;
+ throw new ControlRuntimeException(
m_manager.getURI(), error, e );
+ }
+ }
+ else
+ {
+ final String error =
+ "Unsupported class argument: " + c.getName();
+ throw new ControlRuntimeException( m_manager.getURI(),
error );
+ }
+ }
+ return null;
+ }
+ }
+
+ private Part getPart( URL url )
+ {
+ try
+ {
+ String path = url.toExternalForm();
+ URI uri = new URI( path );
+ return (Part) m_manager.loadPart( uri );
+ }
+ catch( Throwable e )
+ {
+ final String error =
+ "Error occured while attempting to load part: " + url;
+ throw new ControlRuntimeException( m_manager.getURI(), error, e
);
+ }
+ }
+
+ private Model getModel( URL url )
+ {
+ try
+ {
+ String path = url.toExternalForm();
+ URI uri = new URI( path );
+ return m_manager.getModel( uri );
+ }
+ catch( Throwable e )
+ {
+ final String error =
+ "Error occured while attempting to load part: " + url;
+ throw new ControlRuntimeException( m_manager.getURI(), error, e
);
+ }
+ }
+
+ //------------------------------------------------------------------
+ // internal
+ //------------------------------------------------------------------
+
+ public CompositionManager getCompositionManager()
+ {
+ return m_manager;
+ }
+
+ public void dispose()
+ {
+ getCompositionManager().dispose();
+ System.gc();
+ }
+
+ //------------------------------------------------------------------
+ // static utils
+ //------------------------------------------------------------------
+
+ static
+ {
+ System.setProperty( "java.util.logging.config.class",
"net.dpml.depot.logging.ConfigurationHandler" );
+ }
+}

Added:
development/main/metro/composition/part/src/main/net/dpml/composition/part/CompositionContentHandlerControlPanel.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/part/src/main/net/dpml/composition/part/CompositionContentHandlerControlPanel.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,369 @@
+/*
+ * Copyright 2005 Stephen 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.part;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.awt.Dialog;
+import java.awt.Dimension;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import javax.swing.JDialog;
+import javax.swing.border.EmptyBorder;
+import javax.swing.JPanel;
+import javax.swing.Action;
+import javax.swing.AbstractAction;
+import javax.swing.JLabel;
+import javax.swing.JTabbedPane;
+import javax.swing.JButton;
+import javax.swing.BoxLayout;
+import javax.swing.Box;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.ImageIcon;
+import javax.swing.JTextField;
+
+/**
+ * A registry of descriptions of plugable content handlers. This
implementation
+ * maps user defined preferences to instance of ContentHandlerDescriptor.
+ */
+public class CompositionContentHandlerControlPanel extends JDialog
implements PropertyChangeListener
+{
+ private static String METRO_ICON_FILENAME =
"net/dpml/composition/part/images/setup.png";
+
+ private static String SOURCE_ICON_FILENAME =
"net/dpml/composition/part/images/source.png";
+
+ private static String WORK_ICON_FILENAME =
"net/dpml/composition/part/images/working.png";
+
+ private static String TEMP_ICON_FILENAME =
"net/dpml/composition/part/images/temp.png";
+
+ private static String PLUGIN_VERSION = "@VERSION@";
+
+ private static String PLUGIN_GROUP = "@GROUP@";
+
+ private static String PLUGIN_NAME = "@NAME@";
+
+ private PropertyChangeSupport m_propertyChangeSupport;
+
+
+ public CompositionContentHandlerControlPanel( Dialog parent )
+ {
+ super( parent );
+
+ m_propertyChangeSupport = new PropertyChangeSupport( this );
+
+ setTitle( "Metro FT Content Controller" );
+ setModal( true );
+ setBackground( Color.white );
+
+ // create the header label
+
+ JLabel header = createHeaderLabel();
+
+ // create the body content
+
+ JPanel body = createBodyContent( this );
+ body.setBorder( new EmptyBorder( 0, 7, 7, 7 ) );
+
+ // create the buttons in the footer
+
+ ButtonPanel buttons = new ButtonPanel( this );
+ buttons.setBorder( new EmptyBorder( 0, 7, 7, 7 ) );
+
+ //
+ // package
+ //
+
+ JPanel assembly = new JPanel( new BorderLayout() );
+ assembly.setBackground( Color.white );
+ assembly.add( header, BorderLayout.NORTH );
+ assembly.add( body, BorderLayout.CENTER );
+ assembly.add( buttons, BorderLayout.SOUTH );
+ setContentPane( assembly );
+
+ setSize( new Dimension( 400, 360 ) );
+ getRootPane().setDefaultButton( buttons.getDefaultButton() );
+
+ m_propertyChangeSupport.addPropertyChangeListener( this );
+
+ }
+
+ //--------------------------------------------------------------
+ // PropertyChangeListener
+ //--------------------------------------------------------------
+
+ /**
+ * The actions dealing with changes to the dialog raise change events
that
+ * are captured here. This listener checks changes and enables or
disabled
+ * the ok and undo buttons based on the state of controls relative to the
+ * underlying preferences for this host.
+ */
+ public void propertyChange( PropertyChangeEvent event )
+ {
+ // TODO
+ }
+
+ private JLabel createHeaderLabel()
+ {
+ JLabel label =
+ IconHelper.createImageIconJLabel(
+ getClass().getClassLoader(), METRO_ICON_FILENAME, "", "Metro
(FT) Content Handler" );
+ label.setBorder( new EmptyBorder( 15, 10, 10, 10 ) );
+ return label;
+ }
+
+ private JPanel createBodyContent( JDialog parent )
+ {
+ JPanel panel = new JPanel( new BorderLayout() );
+ panel.setBackground( Color.white );
+ JPanel stack = createStack();
+ panel.add( stack, BorderLayout.NORTH );
+ return panel;
+ }
+
+ private JPanel createStack()
+ {
+ JPanel stack = new JPanel();
+ stack.setLayout( new BoxLayout( stack, BoxLayout.Y_AXIS ) );
+ stack.setBackground( Color.white );
+ JPanel spec = createPluginSpecPanel();
+ JPanel dirs = createDirectoryPanel();
+ stack.add( spec );
+ stack.add( dirs );
+ return stack;
+ }
+
+ private JPanel createPluginSpecPanel()
+ {
+ JPanel panel = new JPanel( new BorderLayout() );
+ panel.setBackground( Color.white );
+ panel.setBorder(
+ new CompoundBorder(
+ new TitledBorder(
+ null, "Plugin", TitledBorder.LEFT, TitledBorder.TOP),
+ new EmptyBorder( 5, 5, 5, 10)
+ )
+ );
+
+ /*
+ ImageIcon label =
+ IconHelper.createImageIcon(
+ getClass().getClassLoader(), SOURCE_ICON_FILENAME, "Plugin" );
+ JPanel labelHolder = new JPanel( new BorderLayout() );
+ labelHolder.setBackground( Color.white );
+ labelHolder.setBorder( new EmptyBorder( 3, 0, 0, 10 ) );
+ labelHolder.add( new JLabel( label ), BorderLayout.NORTH );
+ panel.add( labelHolder, BorderLayout.WEST );
+ */
+
+ JPanel stack = new JPanel();
+ stack.setLayout( new BoxLayout( stack, BoxLayout.Y_AXIS ) );
+ stack.setBackground( Color.white );
+ JLabel group = new JLabel( "Group: " + PLUGIN_GROUP );
+ JLabel name = new JLabel( "Name: " + PLUGIN_NAME );
+ JLabel version = new JLabel( "Version: " + PLUGIN_VERSION );
+ stack.add( group );
+ stack.add( name );
+ stack.add( version );
+
+ JPanel holder = new JPanel( new BorderLayout() );
+ holder.add( stack, BorderLayout.NORTH );
+ panel.add( holder );
+ return panel;
+ }
+
+ private JPanel createDirectoryPanel()
+ {
+ JPanel panel = new JPanel( new BorderLayout() );
+ panel.setBackground( Color.white );
+ panel.setBorder(
+ new CompoundBorder(
+ new TitledBorder(
+ null, "Directories", TitledBorder.LEFT, TitledBorder.TOP),
+ new EmptyBorder( 5, 5, 5, 10)
+ )
+ );
+
+ JPanel stack = new JPanel();
+ stack.setLayout( new BoxLayout( stack, BoxLayout.Y_AXIS ) );
+ JPanel working = createWorkingDirectoryPanel();
+ JPanel temp = createTempDirectoryPanel();
+ stack.add( working );
+ stack.add( temp );
+ panel.add( stack, BorderLayout.NORTH );
+ return panel;
+ }
+
+ private JPanel createWorkingDirectoryPanel()
+ {
+ JPanel panel = new JPanel( new BorderLayout() );
+ panel.setBackground( Color.white );
+
+ ImageIcon label =
+ IconHelper.createImageIcon(
+ getClass().getClassLoader(), WORK_ICON_FILENAME, "Working
Directory" );
+ JPanel labelHolder = new JPanel( new BorderLayout() );
+ labelHolder.setBackground( Color.white );
+ labelHolder.setBorder( new EmptyBorder( 3, 0, 0, 10 ) );
+ labelHolder.add( new JLabel( label ), BorderLayout.SOUTH );
+ panel.add( labelHolder, BorderLayout.WEST );
+
+ JPanel stack = new JPanel();
+ stack.setLayout( new BoxLayout( stack, BoxLayout.Y_AXIS ) );
+ stack.setBackground( Color.white );
+ JLabel dirLabel = new JLabel( "Working Directory:" );
+ JPanel dirLabelHolder = new JPanel( new BorderLayout() );
+ dirLabelHolder.add( dirLabel, BorderLayout.WEST );
+ dirLabelHolder.setBackground( Color.white );
+ dirLabelHolder.setBorder( new EmptyBorder( 0, 0, 3, 0 ) );
+ JTextField dirValue = new JTextField( "${user.dir}" );
+ stack.add( dirLabelHolder );
+ stack.add( dirValue );
+
+ JPanel holder = new JPanel( new BorderLayout() );
+ holder.add( stack, BorderLayout.NORTH );
+ panel.add( holder );
+ return panel;
+ }
+
+ private JPanel createTempDirectoryPanel()
+ {
+ JPanel panel = new JPanel( new BorderLayout() );
+ panel.setBackground( Color.white );
+ panel.setBorder( new EmptyBorder( 10, 0, 5, 0 ) );
+
+ ImageIcon label =
+ IconHelper.createImageIcon(
+ getClass().getClassLoader(), TEMP_ICON_FILENAME, "Temp
Directory" );
+ JPanel labelHolder = new JPanel( new BorderLayout() );
+ labelHolder.setBackground( Color.white );
+ labelHolder.setBorder( new EmptyBorder( 3, 0, 0, 10 ) );
+ labelHolder.add( new JLabel( label ), BorderLayout.SOUTH );
+ panel.add( labelHolder, BorderLayout.WEST );
+
+ JPanel stack = new JPanel();
+ stack.setLayout( new BoxLayout( stack, BoxLayout.Y_AXIS ) );
+ stack.setBackground( Color.white );
+ JLabel dirLabel = new JLabel( "Temporary Directory:" );
+ JPanel dirLabelHolder = new JPanel( new BorderLayout() );
+ dirLabelHolder.add( dirLabel, BorderLayout.WEST );
+ dirLabelHolder.setBackground( Color.white );
+ dirLabelHolder.setBorder( new EmptyBorder( 0, 0, 3, 0 ) );
+ JTextField dirValue = new JTextField( "${java.temp.dir}" );
+ stack.add( dirLabelHolder );
+ stack.add( dirValue );
+
+ JPanel holder = new JPanel( new BorderLayout() );
+ holder.add( stack, BorderLayout.NORTH );
+ panel.add( holder );
+ return panel;
+ }
+
+ private class ButtonPanel extends Box
+ {
+ private JButton m_close = new JButton();
+ private JButton m_ok = new JButton();
+ private JButton m_revert = new JButton( new RevertAction( "Undo" ) );
+
+ ButtonPanel( CompositionContentHandlerControlPanel dialog )
+ {
+ super( BoxLayout.Y_AXIS );
+ setBackground( Color.white );
+
+ OKAction ok = new OKAction( "OK", dialog );
+ m_ok.setAction( ok );
+ Action closeAction = new CancelAction( "Close", dialog );
+ m_close.setAction( closeAction );
+
+ JPanel buttonPanel = new JPanel( new FlowLayout(
FlowLayout.RIGHT ) );
+ buttonPanel.setBackground( Color.white );
+ buttonPanel.add( m_revert );
+ buttonPanel.add( m_ok );
+ buttonPanel.add( m_close );
+ add( buttonPanel );
+ }
+
+ JButton getDefaultButton()
+ {
+ return m_close;
+ }
+ }
+
+ private class CancelAction extends AbstractAction
+ {
+ private CompositionContentHandlerControlPanel m_dialog;
+
+ public CancelAction( String label,
CompositionContentHandlerControlPanel dialog )
+ {
+ super( label );
+ m_dialog = dialog;
+ }
+
+ /**
+ * Called when the cancel button is trigged.
+ * @param event the action event
+ */
+ public void actionPerformed( ActionEvent event )
+ {
+ m_propertyChangeSupport.removePropertyChangeListener( m_dialog );
+ m_dialog.hide();
+ }
+ }
+
+ private class OKAction extends AbstractAction
+ {
+ private CompositionContentHandlerControlPanel m_dialog;
+
+ OKAction( String name, CompositionContentHandlerControlPanel dialog )
+ {
+ super( name );
+ setEnabled( false );
+ m_dialog = dialog;
+ }
+
+ // TODO: we need a solution in place under which we log
+ // information about preference changes
+
+ public void actionPerformed( ActionEvent event )
+ {
+ m_propertyChangeSupport.removePropertyChangeListener( m_dialog );
+ m_dialog.hide();
+ }
+ }
+
+ private class RevertAction extends AbstractAction
+ {
+ RevertAction( String name )
+ {
+ super( name );
+ setEnabled( false );
+ }
+
+ public void actionPerformed( ActionEvent event )
+ {
+ PropertyChangeEvent e =
+ new PropertyChangeEvent(
+ this, "revert", null, null );
+ m_propertyChangeSupport.firePropertyChange( e );
+ }
+ }
+}

Added:
development/main/metro/composition/part/src/main/net/dpml/composition/part/CompositionControllerContext.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/part/src/main/net/dpml/composition/part/CompositionControllerContext.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,270 @@
+/*
+ * 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.part;
+
+import java.io.File;
+import java.util.prefs.Preferences;
+import java.util.prefs.PreferenceChangeListener;
+import java.util.prefs.PreferenceChangeEvent;
+import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.Properties;
+import java.net.URI;
+
+import net.dpml.composition.event.WeakEventProducer;
+
+import net.dpml.parts.control.ControllerContext;
+import net.dpml.parts.control.ControllerContextListener;
+import net.dpml.parts.control.WorkingDirectoryChangeEvent;
+import net.dpml.parts.control.TempDirectoryChangeEvent;
+
+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 CompositionControllerContext implements ControllerContext,
PreferenceChangeListener
+{
+
//----------------------------------------------------------------------------
+ // state
+
//----------------------------------------------------------------------------
+
+ private Preferences m_preferences;
+
+ private File m_work;
+
+ private File m_temp;
+
+ private Map m_listeners = new WeakHashMap();
+
+ /**
+ * Internal synchronization lock.
+ */
+ protected final Object m_lock = new Object();
+
+
//----------------------------------------------------------------------------
+ // constructor
+
//----------------------------------------------------------------------------
+
+ /**
+ * Creation of a new DefaultControllerContext using a supplied
preferences node.
+ *
+ * @param prefs the preferences node assigned to the context from which
default
+ * values may be resolved
+ */
+ public CompositionControllerContext( Preferences prefs )
+ {
+ m_preferences = prefs;
+ synchronized( this )
+ {
+ prefs.addPreferenceChangeListener( this );
+ m_work = getWorkingDirectory( prefs );
+ m_temp = getTempDirectory( prefs );
+ }
+ }
+
+
//----------------------------------------------------------------------------
+ // ControllerContext
+
//----------------------------------------------------------------------------
+
+ /**
+ * Return the context uri.
+ *
+ * @return the uri for this context.
+ */
+ public URI getURI()
+ {
+ return CONTEXT_URI;
+ }
+
+ /**
+ * Return the root working directory.
+ *
+ * @return directory representing the root of the working directory
hierachy
+ */
+ public File getWorkingDirectory()
+ {
+ synchronized( m_work )
+ {
+ return m_work;
+ }
+ }
+
+ /**
+ * Return the root temporary directory.
+ *
+ * @return directory representing the root of the temporary directory
hierachy.
+ */
+ public File getTempDirectory()
+ {
+ synchronized( m_temp )
+ {
+ 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 )
+ {
+ if( null == listener )
+ {
+ throw new NullPointerException( "listener" );
+ }
+ synchronized( m_lock )
+ {
+ m_listeners.put( listener, null );
+ }
+ }
+
+ /**
+ * Remove the supplied controller context listener from the controller
context.
+ *
+ * @param listener the controller context listener to remove
+ */
+ public void removeControllerContextlistener( ControllerContextListener
listener )
+ {
+ if( null == listener )
+ {
+ return;
+ }
+
+ synchronized( m_lock )
+ {
+ m_listeners.remove( listener );
+ }
+ }
+
+
//----------------------------------------------------------------------------
+ // PreferenceChangeListener
+
//----------------------------------------------------------------------------
+
+ public void preferenceChange( PreferenceChangeEvent event )
+ {
+ String key = event.getKey();
+ if( "working-directory".equals( key ) )
+ {
+ synchronized( m_work )
+ {
+ File old = m_work;
+ Preferences prefs = event.getNode();
+ m_work = getWorkingDirectory( prefs );
+ WorkingDirectoryChangeEvent e = new
WorkingDirectoryChangeEvent( this, old, m_work );
+ processEvent( e );
+ }
+ }
+ else if( "temp-directory".equals( key ) )
+ {
+ synchronized( m_temp )
+ {
+ File old = m_temp;
+ Preferences prefs = event.getNode();
+ m_temp = getTempDirectory( prefs );
+ TempDirectoryChangeEvent e = new TempDirectoryChangeEvent(
this, old, m_temp );
+ processEvent( e );
+ }
+ }
+ }
+
+
//----------------------------------------------------------------------------
+ // private
+
//----------------------------------------------------------------------------
+
+ /**
+ * Return the connected listeners.
+ * @return the register listeners
+ */
+ private ControllerContextListener[] listeners()
+ {
+ synchronized( m_lock )
+ {
+ return
(ControllerContextListener[])m_listeners.keySet().toArray( new
ControllerContextListener[0] );
+ }
+ }
+
+ private void processEvent( WorkingDirectoryChangeEvent event )
+ {
+ synchronized( m_lock )
+ {
+ ControllerContextListener[] listeners = listeners();
+ for( int i=0; i<listeners.length; i++ )
+ {
+ ControllerContextListener listener = listeners[i];
+ listener.contextChanged( event );
+ }
+ }
+ }
+
+ private void processEvent( TempDirectoryChangeEvent event )
+ {
+ synchronized( m_lock )
+ {
+ ControllerContextListener[] listeners = listeners();
+ for( int i=0; i<listeners.length; i++ )
+ {
+ ControllerContextListener listener = listeners[i];
+ listener.contextChanged( event );
+ }
+ }
+ }
+
+ private File getWorkingDirectory( Preferences prefs )
+ {
+ String value = prefs.get( "working-directory", "${user.dir}" );
+ Properties properties = System.getProperties();
+ String path = PropertyResolver.resolve( properties, value );
+ return new File( path );
+ }
+
+ private File getTempDirectory( Preferences prefs )
+ {
+ String value = prefs.get( "temp-directory", "${java.temp.dir}" );
+ 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;
+ }
+ }
+}

Added:
development/main/metro/composition/part/src/main/net/dpml/composition/part/IconHelper.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/part/src/main/net/dpml/composition/part/IconHelper.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,53 @@
+/*
+ * 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.part;
+
+import java.net.URL;
+
+import javax.swing.JLabel;
+import javax.swing.ImageIcon;
+
+/**
+ */
+public class IconHelper
+{
+ public static JLabel createImageIconJLabel( ClassLoader classloader,
String path, String description, String text )
+ {
+ ImageIcon icon = createImageIcon( classloader, path, description );
+ JLabel label = new JLabel( text, icon, JLabel.LEFT );
+ return label;
+ }
+
+ public static ImageIcon createImageIcon( ClassLoader classloader, String
path, String description )
+ {
+ URL url = classloader.getResource( path );
+ if( null != url )
+ {
+ return new ImageIcon( url );
+ }
+ else
+ {
+ final String error =
+ "Supplied image icon resource path is unknown ["
+ + path
+ + "].";
+ throw new IllegalArgumentException( error );
+ }
+ }
+}

Added:
development/main/metro/composition/part/src/main/net/dpml/composition/part/images/setup.png
==============================================================================
Binary file. No diff available.

Added:
development/main/metro/composition/part/src/main/net/dpml/composition/part/images/source.png
==============================================================================
Binary file. No diff available.

Added:
development/main/metro/composition/part/src/main/net/dpml/composition/part/images/temp.png
==============================================================================
Binary file. No diff available.

Added:
development/main/metro/composition/part/src/main/net/dpml/composition/part/images/working.png
==============================================================================
Binary file. No diff available.

Added:
development/main/metro/composition/part/src/main/net/dpml/composition/part/package.html
==============================================================================
--- (empty file)
+++
development/main/metro/composition/part/src/main/net/dpml/composition/part/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,9 @@
+
+<body>
+<p>
+The 'part' package contains a ContentHandler that supports the "part"
content type. The
+implementation establishes a anonomouse controller context using preferences
as the source
+for container configuration.
+</p>
+
+</body>

Modified:
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/CompositeTestCase.java
==============================================================================
---
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/CompositeTestCase.java
(original)
+++
development/main/metro/composition/testing/test/src/test/net/dpml/composition/testing/CompositeTestCase.java
Wed May 18 20:04:11 2005
@@ -87,7 +87,7 @@

private void executeTestOnPart( String path ) throws Exception
{
- CompositionHelper helper = new CompositionHelper( false );
+ CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( path );
Component component = helper.getCompositionManager().addComponent(
uri, "acme" );
AcmeContainer container = (AcmeContainer) component.resolve( false );

Modified:
development/main/metro/composition/testing/test/src/test/net/dpml/test/state/ManagementTestCase.java
==============================================================================
---
development/main/metro/composition/testing/test/src/test/net/dpml/test/state/ManagementTestCase.java
(original)
+++
development/main/metro/composition/testing/test/src/test/net/dpml/test/state/ManagementTestCase.java
Wed May 18 20:04:11 2005
@@ -86,7 +86,7 @@

Component getComponent( String path ) throws Exception
{
- CompositionHelper helper = new CompositionHelper( false );
+ CompositionHelper helper = new CompositionHelper();
URI uri = helper.toURI( path );
Model model = helper.getCompositionManager().getModel( uri );
return model.getController().getComponent( null, model, this );

Modified: development/main/metro/composition/testing/workshop/build.xml
==============================================================================
--- development/main/metro/composition/testing/workshop/build.xml
(original)
+++ development/main/metro/composition/testing/workshop/build.xml Wed
May 18 20:04:11 2005
@@ -5,6 +5,11 @@

<transit:import uri="artifact:template:dpml/magic/standard"/>

+ <target name="init" depends="standard.init">
+ <x:property key="dpml-composition-part" feature="uri" type="plugin"
name="part.plugin"/>
+ <filter token="COMPOSITION-CONTENT-HANDLER-PLUGIN-URI"
value="${part.plugin}"/>
+ </target>
+
<target name="build" depends="standard.build">

<types xmlns="plugin:dpml/composition/dpml-composition-builder">

Modified:
development/main/metro/composition/testing/workshop/src/test/net/dpml/test/PartTestCase.java
==============================================================================
---
development/main/metro/composition/testing/workshop/src/test/net/dpml/test/PartTestCase.java
(original)
+++
development/main/metro/composition/testing/workshop/src/test/net/dpml/test/PartTestCase.java
Wed May 18 20:04:11 2005
@@ -41,12 +41,12 @@
public void setUp() throws Exception
{
System.setProperty( "java.protocol.handler.pkgs", "net.dpml.transit"
);
- System.setProperty( "java.util.logging.config.class",
"net.dpml.transit.logging.ConfigurationHandler" );
+ System.setProperty( "java.util.logging.config.class",
"net.dpml.depot.logging.ConfigurationHandler" );
System.setProperty( "dpml.transit.preferences.enabled", "true" );
Preferences prefs = Preferences.userNodeForPackage(
ContentHandlerRegistry.class );
Preferences p = prefs.node( "part" );
p.put( "title", "Part Content Handler" );
- p.put( "uri",
"artifact:plugin:dpml/tools/dpml-composition-unit#SNAPSHOT" );
+ p.put( "uri", "@COMPOSITION-CONTENT-HANDLER-PLUGIN-URI@" );
}

public void tearDown() throws Exception

Modified:
development/main/metro/composition/testing/workshop/src/test/net/dpml/test/WorkshopTestCase.java
==============================================================================
---
development/main/metro/composition/testing/workshop/src/test/net/dpml/test/WorkshopTestCase.java
(original)
+++
development/main/metro/composition/testing/workshop/src/test/net/dpml/test/WorkshopTestCase.java
Wed May 18 20:04:11 2005
@@ -48,7 +48,7 @@
Preferences prefs = Preferences.userNodeForPackage(
ContentHandlerRegistry.class );
Preferences p = prefs.node( "part" );
p.put( "title", "Part Content Handler" );
- p.put( "uri",
"artifact:plugin:dpml/tools/dpml-composition-unit#SNAPSHOT" );
+ p.put( "uri", "@COMPOSITION-CONTENT-HANDLER-PLUGIN-URI@" );
System.setProperty( "java.protocol.handler.pkgs", "net.dpml.transit"
);
System.setProperty( "java.util.logging.config.class",
"net.dpml.transit.logging.ConfigurationHandler" );
System.setProperty( "dpml.transit.preferences.enabled", "true" );

Modified: development/main/metro/composition/unit/build.xml
==============================================================================
--- development/main/metro/composition/unit/build.xml (original)
+++ development/main/metro/composition/unit/build.xml Wed May 18 20:04:11
2005
@@ -6,14 +6,9 @@
<transit:import uri="artifact:template:dpml/magic/standard"/>

<target name="init" depends="standard.init">
- <x:filter key="dpml-system-impl" feature="plugin"
token="SYSTEM-PLUGIN-URI"/>
<x:filter feature="name" token="NAME"/>
<x:filter feature="version" token="VERSION"/>
<x:filter feature="group" token="GROUP"/>
</target>

- <target name="package" depends="standard.package">
- <x:export class="net.dpml.composition.unit.CompositionContentHandler"/>
- </target>
-
</project>

Modified:
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionHelper.java
==============================================================================
---
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionHelper.java
(original)
+++
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/CompositionHelper.java
Wed May 18 20:04:11 2005
@@ -23,11 +23,14 @@
import java.net.URI;
import java.util.Hashtable;
import java.util.Map;
+import java.util.prefs.Preferences;
+
+import net.dpml.depot.lang.DPML;

import net.dpml.composition.control.CompositionManager;
-import net.dpml.system.SystemContext;
-import net.dpml.system.SystemContextFactory;
-import net.dpml.system.SystemCriteria;
+
+import net.dpml.parts.control.ControllerContext;
+
import net.dpml.transit.repository.Repository;
import net.dpml.transit.repository.StandardLoader;

@@ -44,6 +47,11 @@
// 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" );
@@ -67,7 +75,7 @@
// state
//------------------------------------------------------------------

- private SystemContext m_system;
+ private ControllerContext m_context;
private CompositionManager m_manager;

//------------------------------------------------------------------
@@ -81,31 +89,19 @@

public CompositionHelper( File base ) throws Exception
{
- this( base, new Hashtable() );
- }
-
- public CompositionHelper( Map map ) throws Exception
- {
- this( getTestWorkingDir(), map );
- }
-
- public CompositionHelper( boolean debug ) throws Exception
- {
- this( getTestWorkingDir(), getSystemContextMap( debug ) );
- }
-
- public CompositionHelper( File base, Map map ) throws Exception
- {
if( null == base )
{
throw new NullPointerException( "base" );
}
- if( null == map )
- {
- throw new NullPointerException( "map" );
- }
- m_system = createSystemContext( map, base );
- m_manager = new CompositionManager( m_system, new String[0] );
+
+ Preferences prefs = Preferences.userNodeForPackage( DPML.class );
+ Preferences profiles = prefs.node( "profiles" );
+ Preferences unit = profiles.node( "unit" );
+
+ DefaultControllerContext context = new DefaultControllerContext(
unit );
+ context.setWorkingDirectory( base );
+ m_context = context;
+ m_manager = new CompositionManager( context, new String[0] );
}

//------------------------------------------------------------------
@@ -121,7 +117,7 @@
{
try
{
- File base = m_system.getWorkingDirectory();
+ File base = m_context.getWorkingDirectory();
File target = new File( base, path );
return target.toURI();
}
@@ -137,28 +133,6 @@
System.gc();
}

- /**
- * Setup the system context.
- *
- * @param map a map of supplimentary factory criteria that will be
- * applied to the system context factory
- */
- private SystemContext createSystemContext( Map map, File dir )
- throws Exception
- {
- ClassLoader classloader = CompositionHelper.class.getClassLoader();
- Repository repository = new StandardLoader();
- SystemContextFactory factory =
- (SystemContextFactory) repository.getPlugin( classloader,
SYSTEM_PLUGIN_URI, new Object[]{ map } );
- SystemCriteria criteria = factory.createDefaultSystemCriteria();
-
- criteria.setWorkingDirectory( dir );
- criteria.setAnchorDirectory( dir );
- return factory.createSystemContext( criteria );
- }
-
- private static final URI SYSTEM_PLUGIN_URI = createStaticURI(
"@SYSTEM-PLUGIN-URI@" );
-
private static URI createStaticURI( String path )
{
try
@@ -171,14 +145,4 @@
}
}

- private static Map getSystemContextMap( boolean debug )
- {
- Hashtable map = new Hashtable();
- if( debug )
- {
- map.put( "urn:transit.debug.policy", "true" );
- }
- return map;
- }
-
}

Added:
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/DefaultControllerContext.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/DefaultControllerContext.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,194 @@
+/*
+ * 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.util.prefs.Preferences;
+import java.util.prefs.PreferenceChangeListener;
+import java.util.prefs.PreferenceChangeEvent;
+import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.Properties;
+import java.util.prefs.Preferences;
+import java.net.URI;
+
+import net.dpml.composition.event.WeakEventProducer;
+
+import net.dpml.parts.control.ControllerContext;
+import net.dpml.parts.control.ControllerContextListener;
+
+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 DefaultControllerContext implements ControllerContext
+{
+
//----------------------------------------------------------------------------
+ // state
+
//----------------------------------------------------------------------------
+
+ private File m_work;
+
+ private File m_temp;
+
+
//----------------------------------------------------------------------------
+ // constructor
+
//----------------------------------------------------------------------------
+
+ /**
+ * Creation of a new DefaultControllerContext using a supplied
preferences node.
+ *
+ * @param prefs the preferences node assigned to the context from which
default
+ * values may be resolved
+ */
+ public DefaultControllerContext( Preferences prefs )
+ {
+ synchronized( this )
+ {
+ m_work = getWorkingDirectory( prefs );
+ m_temp = getTempDirectory( prefs );
+ }
+ }
+
+
//----------------------------------------------------------------------------
+ // ControllerContext
+
//----------------------------------------------------------------------------
+
+ /**
+ * Return the context uri.
+ *
+ * @return the uri for this context.
+ */
+ public URI getURI()
+ {
+ return CONTEXT_URI;
+ }
+
+ /**
+ * Return the root working directory.
+ *
+ * @return directory representing the root of the working directory
hierachy
+ */
+ public File getWorkingDirectory()
+ {
+ synchronized( this )
+ {
+ return m_work;
+ }
+ }
+
+ /**
+ * Return the root temporary directory.
+ *
+ * @return directory representing the root of the temporary directory
hierachy.
+ */
+ public File getTempDirectory()
+ {
+ synchronized( this )
+ {
+ 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 )
+ {
+ throw new UnsupportedOperationException(
"addControllerContextlistener/1" );
+ }
+
+ /**
+ * Remove the supplied controller context listener from the controller
context.
+ *
+ * @param listener the controller context listener to remove
+ */
+ public void removeControllerContextlistener( ControllerContextListener
listener )
+ {
+ throw new UnsupportedOperationException(
"removeControllerContextlistener/1" );
+ }
+
+
//----------------------------------------------------------------------------
+ // ControllerManager
+
//----------------------------------------------------------------------------
+
+ public void setWorkingDirectory( File file )
+ {
+ synchronized( this )
+ {
+ m_work = file;
+ }
+ }
+
+ public void setTempDirectory( File file )
+ {
+ synchronized( this )
+ {
+ m_temp = file;
+ }
+ }
+
+
//----------------------------------------------------------------------------
+ // private
+
//----------------------------------------------------------------------------
+
+ private File getWorkingDirectory( Preferences prefs )
+ {
+ String value = prefs.get( "working-directory", "${user.dir}" );
+ Properties properties = System.getProperties();
+ String path = PropertyResolver.resolve( properties, value );
+ return new File( path );
+ }
+
+ private File getTempDirectory( Preferences prefs )
+ {
+ String value = prefs.get( "temp-directory", "${java.temp.dir}" );
+ 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( "unit:local" );
+ }
+ catch( Throwable e )
+ {
+ return null;
+ }
+ }
+}

Added:
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/package.html
==============================================================================
--- (empty file)
+++
development/main/metro/composition/unit/src/main/net/dpml/composition/unit/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,7 @@
+
+<body>
+<p>
+Utility class that provides support for component testing.
+</p>
+
+</body>

Modified:
development/main/metro/configuration/api/src/main/net/dpml/configuration/package.html
==============================================================================
---
development/main/metro/configuration/api/src/main/net/dpml/configuration/package.html
(original)
+++
development/main/metro/configuration/api/src/main/net/dpml/configuration/package.html
Wed May 18 20:04:11 2005
@@ -1,17 +1,11 @@
<body bgcolor="white">
- Component configuration interfaces and XML-based implementations.
+ Component configuration interfaces.
<br><br>
- <p>The <code>org.apache.avalon.framework.configuration</code> package
contains primarily:</p>
+ <p>The <code>net.dpml.configuration</code> package contains</p>
<ul>
- <li>The <a href="Configurable.html">Configurable</a> interface, which
a Component implements
- if it needs to be configured with externally-specified data before it
is initialized.
- </li>
<li>The <a href="Configuration.html">Configuration</a> interface, an
implementation of which
- will be passed to Components that implement <a
href="Configurable.html">Configurable</a>.</li>
- <li>The <a href="Reconfigurable.html">Reconfigurable</a> interface,
which Components implement if
- they need to be reconfigured at runtime.</li>
- <li>Various classes providing the default XML-based implementation of
<a
- href="Configuration.html">Configuration</a>. The mapping from XML to
Configuration tree is
- described in <a
href="DefaultConfigurationBuilder.html">DefaultConfigurationBuilder</a>.
+ will be passed to components that declares <a
href="Configuration.html">Configuration</a> type
+ as a constructor parameter.</li>
</ul>
</body>
+

Modified:
development/main/metro/configuration/impl/src/main/net/dpml/configuration/impl/package.html
==============================================================================
---
development/main/metro/configuration/impl/src/main/net/dpml/configuration/impl/package.html
(original)
+++
development/main/metro/configuration/impl/src/main/net/dpml/configuration/impl/package.html
Wed May 18 20:04:11 2005
@@ -1,17 +1,9 @@
<body bgcolor="white">
- Component configuration interfaces and XML-based implementations.
+ Component configuration interfaces implementations.
<br><br>
- <p>The <code>org.apache.avalon.framework.configuration</code> package
contains primarily:</p>
- <ul>
- <li>The <a href="Configurable.html">Configurable</a> interface, which
a Component implements
- if it needs to be configured with externally-specified data before it
is initialized.
- </li>
- <li>The <a href="Configuration.html">Configuration</a> interface, an
implementation of which
- will be passed to Components that implement <a
href="Configurable.html">Configurable</a>.</li>
- <li>The <a href="Reconfigurable.html">Reconfigurable</a> interface,
which Components implement if
- they need to be reconfigured at runtime.</li>
- <li>Various classes providing the default XML-based implementation of
<a
- href="Configuration.html">Configuration</a>. The mapping from XML to
Configuration tree is
+ <p>The <code>net.dpml.configuration</code> package contains various
classes
+ providing the default XML-based implementation of <a
href="../Configuration.html">
+ Configuration</a>. The mapping from XML to Configuration tree is
described in <a
href="DefaultConfigurationBuilder.html">DefaultConfigurationBuilder</a>.
- </ul>
+ </p>
</body>

Modified: development/main/metro/index.xml
==============================================================================
--- development/main/metro/index.xml (original)
+++ development/main/metro/index.xml Wed May 18 20:04:11 2005
@@ -3,6 +3,7 @@
<index key="dpml-metro">

<import uri="${dpml.transit.uri}"/>
+ <import uri="${dpml.depot.uri}"/>
<import uri="${dpml.magic.uri}"/>

<!--
@@ -17,7 +18,7 @@
</info>
<dependencies>
<include key="dpml-transit"/>
- <include key="dpml-util"/>
+ <include key="dpml-depot"/>
</dependencies>
</project>

@@ -25,7 +26,7 @@

<project basedir="parts">
<info>
- <group>dpml/metro/protected</group>
+ <group>dpml/metro</group>
<name>dpml-parts-api</name>
<types>
<type>jar</type>
@@ -37,7 +38,7 @@

<project basedir="activity">
<info>
- <group>dpml/metro/public</group>
+ <group>dpml/metro</group>
<name>dpml-activity-api</name>
<types>
<type>jar</type>
@@ -49,7 +50,7 @@

<project basedir="configuration/api">
<info>
- <group>dpml/metro/public</group>
+ <group>dpml/metro</group>
<name>dpml-configuration-api</name>
<types>
<type>jar</type>
@@ -59,7 +60,7 @@

<project basedir="configuration/impl">
<info>
- <group>dpml/metro/private</group>
+ <group>dpml/metro</group>
<name>dpml-configuration-impl</name>
<types>
<type>jar</type>
@@ -75,7 +76,7 @@

<project basedir="parameters/api">
<info>
- <group>dpml/metro/public</group>
+ <group>dpml/metro</group>
<name>dpml-parameters-api</name>
<types>
<type>jar</type>
@@ -85,7 +86,7 @@

<project basedir="parameters/impl">
<info>
- <group>dpml/metro/private</group>
+ <group>dpml/metro</group>
<name>dpml-parameters-impl</name>
<types>
<type>jar</type>
@@ -98,341 +99,90 @@
</dependencies>
</project>

- <!-- Context -->
-
- <project basedir="context/api">
- <info>
- <group>dpml/metro/public</group>
- <name>dpml-context-api</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- </project>
-
- <project basedir="context/impl">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-context-impl</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-context-api"/>
- <include key="dpml-meta-api"/>
- </dependencies>
- </project>
-
- <!-- Service -->
-
- <project basedir="service/api">
- <info>
- <group>dpml/metro/public</group>
- <name>dpml-service-api</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- </project>
-
- <!-- Logging -->
-
- <project basedir="logging/api">
- <info>
- <group>dpml/metro/public</group>
- <name>dpml-logging-api</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- </project>
-
- <!-- Meta -->
-
- <project basedir="classic/meta/api">
- <info>
- <group>dpml/metro/protected</group>
- <name>dpml-meta-api</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-parameters-api"/>
- <include key="dpml-configuration-api"/>
- <include key="dpml-configuration-impl" build="false" test="true"
runtime="false"/>
- <include key="dpml-parameters-impl" build="false" test="true"
runtime="false"/>
- </dependencies>
- </project>
-
- <project basedir="classic/meta/spi">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-meta-spi</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-meta-api"/>
- <include key="dpml-configuration-api"/>
- <include key="dpml-parameters-api"/>
- </dependencies>
- </project>
-
- <project basedir="classic/meta/impl">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-meta-impl</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-meta-spi"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-configuration-impl"/>
- <include key="dpml-parameters-impl"/>
- <include key="dpml-service-api"/>
- </dependencies>
- </project>
-
- <project basedir="classic/meta/tools">
- <info>
- <group>dpml/metro/tools</group>
- <name>dpml-meta-tools</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-meta-impl"/>
- <include key="qdox"/>
- <include key="ant"/>
- <include key="ant-junit"/>
- </dependencies>
- </project>
-
- <!-- Metro -->
+ <!-- FT Composition -->

- <project basedir="main">
+ <project basedir="composition/control">
<info>
- <group>dpml/metro/tools</group>
- <name>dpml-metro-main</name>
+ <group>dpml/metro</group>
+ <name>dpml-composition-control</name>
<types>
<type>jar</type>
<type>plugin</type>
</types>
</info>
<dependencies>
- <include key="dpml-logging-api" tag="api"/>
- <include key="dpml-activity-api" tag="api"/>
<include key="dpml-parts-api" tag="api"/>
- <include key="dpml-context-api" tag="api"/>
<include key="dpml-transit-main" tag="api"/>
- <include key="dpml-system-api" tag="spi"/>
- <include key="dpml-logging-spi" tag="spi"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-util-exception"/>
- <include key="dpml-util-criteria"/>
- <include key="dpml-util-cli"/>
+ <include key="dpml-activity-api" tag="api"/>
+ <include key="dpml-parameters-api" tag="api"/>
+ <include key="dpml-configuration-api" tag="api"/>
+ <include key="dpml-parameters-impl"/>
+ <include key="dpml-configuration-impl"/>
<include key="commons-cli"/>
- <include key="dpml-system-impl" build="false"/>
- <include key="dpml-classic-impl" build="false"/>
</dependencies>
</project>

- <project basedir="classic/unit">
+ <project basedir="composition/builder">
<info>
- <group>dpml/metro/tools</group>
- <name>dpml-classic-unit</name>
- <status>SNAPSHOT</status>
+ <group>dpml/metro</group>
+ <name>dpml-composition-builder</name>
<types>
<type>jar</type>
</types>
</info>
<dependencies>
- <include key="dpml-parts-api" tag="api"/>
- <include key="dpml-classic-spi"/>
- <include key="dpml-classic-impl" build="false"/>
+ <include key="dpml-parts-api"/>
+ <include key="dpml-magic-core"/>
<include key="dpml-configuration-api"/>
<include key="dpml-configuration-impl"/>
- <include key="dpml-context-api"/>
- <include key="dpml-context-impl"/>
<include key="dpml-parameters-api"/>
<include key="dpml-parameters-impl"/>
- <include key="dpml-service-api"/>
- <include key="dpml-system-impl" build="false"/>
- <include key="dpml-util-exception"/>
- <include key="junit"/>
- </dependencies>
- </project>
-
- <!-- FROM PROTECTED INDEX -->
-
- <!-- Classic Composition -->
-
- <project basedir="classic/composition/api">
- <info>
- <group>dpml/metro/protected</group>
- <name>dpml-classic-api</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-parts-api"/>
- <include key="dpml-transit-main"/>
- <include key="dpml-meta-api"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-configuration-api"/>
- <include key="dpml-context-api"/>
- <include key="dpml-service-api"/>
- <include key="dpml-parameters-api"/>
- <include key="dpml-logging-api"/>
- <include key="dpml-logging-data"/>
- <include key="dpml-configuration-impl" build="false" test="true"
runtime="false"/>
- <include key="dpml-parameters-impl" build="false" test="true"
runtime="false"/>
+ <include key="dpml-composition-control"/>
+ <include key="xstream"/>
</dependencies>
</project>

- <project basedir="classic/composition/spi">
+ <project basedir="composition/unit">
<info>
- <group>dpml/metro/private</group>
- <name>dpml-classic-spi</name>
+ <group>dpml/metro</group>
+ <name>dpml-composition-unit</name>
<types>
<type>jar</type>
</types>
</info>
<dependencies>
- <include key="dpml-system-api"/>
- <include key="dpml-classic-api"/>
- <include key="dpml-logging-spi"/>
+ <include key="dpml-depot-console"/>
+ <include key="dpml-composition-control"/>
</dependencies>
</project>

- <project basedir="classic/composition/impl">
+ <project basedir="composition/part">
<info>
- <group>dpml/metro/private</group>
- <name>dpml-classic-impl</name>
+ <group>dpml/metro</group>
+ <name>dpml-composition-part</name>
<types>
<type>jar</type>
<type>plugin</type>
</types>
</info>
<dependencies>
- <include key="dpml-transit-main" tag="api"/>
- <include key="dpml-logging-api" tag="api"/>
- <include key="dpml-activity-api" tag="api"/>
- <include key="dpml-parameters-api" tag="api"/>
- <include key="dpml-classic-api" tag="api"/>
- <include key="dpml-configuration-api" tag="api"/>
- <include key="dpml-service-api" tag="api"/>
- <include key="dpml-meta-api" tag="api"/>
- <include key="dpml-classic-spi" tag="spi"/>
- <include key="dpml-meta-spi" tag="spi"/>
- <include key="dpml-configuration-impl"/>
- <include key="dpml-meta-impl"/>
- <include key="dpml-util-exception"/>
- <include key="dpml-context-impl"/>
- <include key="dpml-util-criteria"/>
- <include key="dpml-util-cli"/>
- <include key="dpml-activation-impl" build="false"/>
- <include key="dpml-test-playground" build="false"/>
- </dependencies>
- </project>
-
- <project basedir="classic/composition/test">
- <info>
- <group>dpml/test</group>
- <name>dpml-classic-test</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-system-api"/>
- <include key="dpml-classic-spi"/>
- <include key="dpml-classic-impl"/>
- <include key="dpml-system-impl" test="false"/>
- <include key="dpml-classic-impl" test="false"/>
- <include key="dpml-util-exception"/>
- <include key="dpml-test-testa" test="false"/>
- <include key="dpml-test-testb" test="false"/>
- <include key="dpml-test-testc" test="false"/>
- <include key="dpml-test-testcyclic" test="false"/>
- <include key="dpml-test-includes" test="false"/>
- <include key="dpml-test-dynamics" test="false"/>
- <include key="dpml-system-impl" build="false"/>
- <include key="dpml-logging-logkit-impl" build="false"/>
- <include key="dpml-test-testschema"/>
- <include key="ant-junit"/>
+ <include key="dpml-depot-console"/>
+ <include key="dpml-composition-control"/>
</dependencies>
</project>

- <!-- FT Composition -->
-
- <project basedir="composition/control">
+ <project basedir="composition/content">
<info>
- <group>dpml/metro/private</group>
- <name>dpml-composition-control</name>
+ <group>dpml/metro</group>
+ <name>dpml-composition-content</name>
<types>
<type>jar</type>
<type>plugin</type>
</types>
</info>
<dependencies>
- <include key="dpml-parts-api" tag="spi"/>
+ <include key="dpml-composition-part" build="false"/>
<include key="dpml-transit-main" tag="api"/>
- <include key="dpml-activity-api" tag="api"/>
- <include key="dpml-parameters-api" tag="api"/>
- <include key="dpml-configuration-api" tag="api"/>
- <include key="dpml-system-api"/>
- <include key="dpml-util-exception"/>
- <include key="dpml-parameters-impl"/>
- <include key="dpml-configuration-impl"/>
- <include key="commons-cli"/>
- <include key="dpml-logging-api"/>
- <include key="dpml-logging-data"/>
- </dependencies>
- </project>
-
- <project basedir="composition/builder">
- <info>
- <group>dpml/metro/tools</group>
- <name>dpml-composition-builder</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-parts-api"/>
- <include key="dpml-magic-core"/>
- <include key="dpml-logging-spi"/>
- <include key="dpml-configuration-api"/>
- <include key="dpml-configuration-impl"/>
- <include key="dpml-parameters-api"/>
- <include key="dpml-parameters-impl"/>
- <include key="dpml-composition-control"/>
- <include key="xstream"/>
- </dependencies>
- </project>
-
- <project basedir="composition/unit">
- <info>
- <group>dpml/tools</group>
- <name>dpml-composition-unit</name>
- <types>
- <type>jar</type>
- <type>part</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-logging-api"/>
- <include key="dpml-composition-control"/>
- <include key="dpml-system-impl" runtime="false"/>
</dependencies>
</project>

@@ -463,11 +213,9 @@
<include key="dpml-parts-api"/>
<include key="dpml-configuration-api"/>
<include key="dpml-activity-api"/>
- <include key="dpml-util-exception"/>
<include key="dpml-composition-testing-acme"/>
<include key="dpml-composition-control"/>
<include key="dpml-composition-unit" runtime="false"/>
- <include key="dpml-logging-logkit-impl" build="false"/>
</dependencies>
<plugins>
<include key="dpml-composition-builder"/>
@@ -487,585 +235,18 @@
<include key="dpml-parts-api"/>
<include key="dpml-transit-main"/>
<include key="dpml-activity-api"/>
+ <include key="dpml-depot-console"/>
+ <include key="dpml-composition-part" build="false"/>
</dependencies>
<plugins>
<include key="dpml-composition-builder"/>
</plugins>
</project>

- <!-- Utilities -->
-
- <project basedir="util/defaults">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-util-defaults</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-transit-main"/>
- </dependencies>
- </project>
-
- <!-- System -->
-
- <project basedir="system/api">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-system-api</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-context-api"/>
- <include key="dpml-logging-spi"/>
- <include key="dpml-transit-main"/>
- </dependencies>
- </project>
-
- <project basedir="system/impl">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-system-impl</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-system-api" tag="spi"/>
- <include key="dpml-context-impl"/>
- <include key="dpml-util-criteria"/>
- <include key="dpml-util-defaults"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-util-cli"/>
- </dependencies>
- </project>
-
- <project basedir="system/test">
- <info>
- <group>dpml/test</group>
- <name>dpml-system-test</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-system-api"/>
- <include key="dpml-system-impl" build="false"/>
- </dependencies>
- </project>
-
- <!-- Logging -->
-
- <project basedir="logging/data">
- <info>
- <group>dpml/metro/protected</group>
- <name>dpml-logging-data</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- </project>
-
- <project basedir="logging/spi">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-logging-spi</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-logging-api" tag="api"/>
- <include key="dpml-logging-data" tag="api"/>
- <include key="dpml-transit-main" tag="api"/>
- </dependencies>
- </project>
-
- <project basedir="logging/criteria">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-logging-criteria</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-logging-spi"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-util-criteria"/>
- <include key="dpml-util-defaults"/>
- </dependencies>
- </project>
-
- <project basedir="logging/providers/log4j/impl">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-logging-log4j</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-logging-spi" tag="spi"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-logging-criteria"/>
- <include key="dpml-configuration-api"/>
- <include key="log4j"/>
- </dependencies>
- </project>
-
- <project basedir="logging/providers/log4j/test">
- <info>
- <group>dpml/test</group>
- <name>dpml-logging-log4j-test</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-logging-logkit-api"/>
- <include key="dpml-logging-log4j" test="false"/>
- <include key="dpml-transit-main"/>
- </dependencies>
- </project>
-
- <project basedir="logging/providers/logkit/api">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-logging-logkit-api</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-logging-spi"/>
- <include key="dpml-configuration-api"/>
- </dependencies>
- </project>
-
- <project basedir="logging/providers/logkit/impl">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-logging-logkit-impl</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-transit-main" runtime="false" tag="api"/>
- <include key="dpml-logging-spi" tag="spi"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-util-exception"/>
- <include key="dpml-logging-criteria"/>
- <include key="dpml-logging-logkit-api"/>
- <include key="dpml-configuration-impl"/>
- </dependencies>
- </project>
-
- <project basedir="logging/providers/logkit/plugins/datagram">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-logging-logkit-datagram</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-util-i18n"/>
- <include key="dpml-logging-logkit-impl"/>
- <include key="dpml-configuration-impl"/>
- </dependencies>
- </project>
-
- <project basedir="logging/providers/logkit/plugins/socket">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-logging-logkit-socket</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-util-i18n"/>
- <include key="dpml-logging-logkit-impl"/>
- <include key="dpml-configuration-impl"/>
- </dependencies>
- </project>
-
- <project basedir="logging/providers/logkit/plugins/syslog">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-logging-logkit-syslog</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-util-i18n"/>
- <include key="dpml-configuration-impl"/>
- <include key="dpml-logging-logkit-api"/>
- <include key="dpml-logging-logkit-datagram"/>
- </dependencies>
- </project>
-
- <project basedir="logging/providers/logkit/test">
- <info>
- <group>dpml/test</group>
- <name>dpml-logging-logkit-test</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-logging-logkit-impl" build="false" test="false"/>
- <include key="dpml-logging-logkit-datagram" build="false"
test="false"/>
- <include key="dpml-logging-logkit-socket" build="false" test="false"/>
- <include key="dpml-logging-logkit-syslog" build="false" test="false"/>
- <include key="dpml-transit-main"/>
- <include key="dpml-logging-logkit-api"/>
- </dependencies>
- </project>
-
- <!--
- DPML Activation.
- -->
-
- <project basedir="classic/activation/api">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-activation-api</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-classic-spi"/>
- </dependencies>
- </project>
-
- <project basedir="classic/activation/providers/metro">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-activation-metro-provider</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-activation-api" tag="api"/>
- <include key="dpml-activity-api" tag="api"/>
- <include key="dpml-classic-api" tag="api"/>
- <include key="dpml-classic-spi" tag="spi"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-util-defaults"/>
- <include key="dpml-system-api"/>
- <include key="dpml-context-impl"/>
- </dependencies>
- </project>
-
- <project basedir="classic/activation/providers/avalon">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-activation-avalon-provider</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-classic-api" tag="api"/>
- <include key="avalon-framework-api" tag="api"/>
- <include key="dpml-activation-api" tag="api"/>
- <include key="dpml-system-api" tag="spi"/>
- <include key="dpml-classic-spi" tag="spi"/>
- <include key="dpml-util-i18n"/>
- <include key="dpml-util-defaults"/>
- <include key="dpml-context-impl"/>
- <include key="dpml-parameters-impl"/>
- <include key="avalon-framework-impl"/>
- </dependencies>
- </project>
-
- <project basedir="classic/activation/impl">
- <info>
- <group>dpml/metro/private</group>
- <name>dpml-activation-impl</name>
- <types>
- <type>jar</type>
- <type>plugin</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-transit-main" tag="api"/>
- <include key="dpml-activation-api" tag="api"/>
- <include key="dpml-classic-api" tag="api"/>
- <include key="dpml-parts-api" tag="api"/>
- <include key="dpml-activation-metro-provider" build="false"/>
- <include key="dpml-activation-avalon-provider" build="false"/>
- <include key="dpml-system-impl" build="false"/>
- </dependencies>
- </project>
-
- <project basedir="classic/activation/test">
- <info>
- <group>dpml/test</group>
- <name>dpml-activation-test</name>
- <types>
- <type>jar</type>
- </types>
- </info>
- <dependencies>
- <include key="dpml-classic-test"/>
- <include key="dpml-activation-impl"/>
- <include key="dpml-test-components"/>
- </dependencies>
- </project>
-
- <!--
- Metro Test.
- -->
-
- <project basedir="classic/testing/dynamics">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-dynamics</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-logging-api"/>
- <include key="dpml-service-api"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
- <project basedir="classic/testing/playground">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-playground</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-logging-api"/>
- <include key="dpml-context-api"/>
- <include key="dpml-configuration-api"/>
- <include key="dpml-service-api"/>
- <include key="dpml-activity-api"/>
- <include key="dpml-classic-api"/>
- <include key="dpml-context-impl"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
- <project basedir="classic/testing/testa">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-testa</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-activity-api"/>
- <include key="dpml-logging-api"/>
- <include key="dpml-context-api"/>
- <include key="dpml-configuration-api"/>
- <include key="dpml-transit-main"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
- <project basedir="classic/testing/testb">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-testb</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-activity-api"/>
- <include key="dpml-logging-api"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
- <project basedir="classic/testing/testc">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-testc</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-test-testa"/>
- <include key="dpml-test-testb"/>
- <include key="dpml-activity-api"/>
- <include key="dpml-logging-api"/>
- <include key="dpml-service-api"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
- <project basedir="classic/testing/testd">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-testd</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-test-testa"/>
- <include key="dpml-activity-api"/>
- <include key="dpml-logging-api"/>
- <include key="dpml-service-api"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
- <project basedir="classic/testing/teste">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-teste</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-test-testa"/>
- <include key="dpml-activity-api"/>
- <include key="dpml-logging-api"/>
- <include key="dpml-service-api"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
- <project basedir="classic/testing/testcyclic">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-testcyclic</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-logging-api"/>
- <include key="dpml-service-api"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
- <project basedir="classic/testing/testschema">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-testschema</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-logging-api"/>
- <include key="dpml-configuration-api"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
- <project basedir="classic/testing/includes">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-includes</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-test-playground" build="false" runtime="false"/>
- <include key="dpml-test-testa" build="false" runtime="false"/>
- <include key="dpml-test-testb" build="false" runtime="false"/>
- <include key="dpml-test-testc" build="false" runtime="false"/>
- <include key="dpml-test-testd" build="false" runtime="false"/>
- <include key="dpml-test-teste" build="false" runtime="false"/>
- </dependencies>
- </project>
-
- <project basedir="classic/testing/components">
- <info>
- <group>dpml/test</group>
- <name>dpml-test-components</name>
- <type>jar</type>
- </info>
- <dependencies>
- <include key="dpml-logging-api"/>
- <include key="dpml-context-api"/>
- <include key="dpml-service-api"/>
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools"/>
- </plugins>
- </project>
-
-
<!-- EXTERNAL RESOURCES -->

<resource>
<info>
- <group>qdox</group>
- <name>qdox</name>
- <version>1.4</version>
- <type>jar</type>
- </info>
- </resource>
-
- <resource>
- <info>
- <group>log4j</group>
- <name>log4j</name>
- <version>1.2.8</version>
- <type>jar</type>
- </info>
- <gump>
- <alias>logging-log4j-12</alias>
- </gump>
- </resource>
-
- <resource>
- <info>
- <group>qdox</group>
- <name>qdox</name>
- <version>1.4</version>
- <type>jar</type>
- </info>
- </resource>
-
- <resource>
- <info>
- <group>avalon-framework</group>
- <name>avalon-framework-api</name>
- <version>4.2.0</version>
- </info>
- </resource>
-
- <resource>
- <info>
- <group>avalon-framework</group>
- <name>avalon-framework-impl</name>
- <version>4.2.0</version>
- </info>
- </resource>
-
- <resource>
- <info>
<name>xercesImpl</name>
<version>2.6.2</version>
<group>xerces</group>

Modified: development/main/metro/module.xml
==============================================================================
--- development/main/metro/module.xml (original)
+++ development/main/metro/module.xml Wed May 18 20:04:11 2005
@@ -41,19 +41,6 @@
<target name="install" depends="docs,standard.install">
<echo>

#----------------------------------------------------------------------------------
-# Updating DPML SYSTEM ${dpml.system}/bin
-#----------------------------------------------------------------------------------
- </echo>
- <copy todir="${dpml.system}" preservelastmodified="true">
- <fileset dir="${share}">
- <include name="bin/**"/>
- </fileset>
- </copy>
- <chmod file="${dpml.system}/bin/metro" perm="755"/>
- <chmod file="${dpml.system}/bin/transit" perm="755"/>
- <chmod dir="${dpml.system}/bin" includes="*.sh" perm="755"/>
- <echo>
-#----------------------------------------------------------------------------------
# Updating DPML PREFS ${dpml.prefs}

#----------------------------------------------------------------------------------
</echo>
@@ -109,10 +96,12 @@
<!--
Add the non-version bin files to the bin directory.
-->
+ <!--
<copy todir="${share}/bin">
<fileset dir="${basedir}/main/target/bin"/>
</copy>
<chmod file="${share}/bin/metro" perm="755"/>
+ -->

<!--
Add the javadoc to the dist.
@@ -153,15 +142,21 @@
<x:javadoc>
<link href="http://java.sun.com/j2se/1.4/docs/api"/>
<link href="http://www.dpml.net/api/commons-cli/1.0"/>
- <group title="Parts API">
+ <group title="Component API">
+ <package name="net.dpml.activity"/>
+ <package name="net.dpml.configuration"/>
+ <package name="net.dpml.parameters"/>
+ </group>
+ <group title="Containment SPI">
<package name="net.dpml.parts.builder"/>
<package name="net.dpml.parts.control"/>
<package name="net.dpml.parts.model"/>
<package name="net.dpml.parts.part"/>
<package name="net.dpml.parts.state"/>
</group>
- <group title="Composition API">
+ <group title="Composition Package">
<package name="net.dpml.composition.builder"/>
+ <package name="net.dpml.composition.builder.datatypes"/>
<package name="net.dpml.composition.control"/>
<package name="net.dpml.composition.event"/>
<package name="net.dpml.composition.model"/>
@@ -169,40 +164,11 @@
<package name="net.dpml.composition.info"/>
<package name="net.dpml.composition.state"/>
<package name="net.dpml.composition.unit"/>
+ <package name="net.dpml.composition.content"/>
+ <package name="net.dpml.composition.part"/>
+ <package name="net.dpml.configuration.impl"/>
+ <package name="net.dpml.parameters.impl"/>
</group>
-
- <!--
- <group title="Public API">
- <package name="net.dpml.service"/>
- <package name="net.dpml.context"/>
- <package name="net.dpml.logging"/>
- <package name="net.dpml.parameters"/>
- <package name="net.dpml.configuration"/>
- <package name="net.dpml.activity"/>
- </group>
- <group title="Protected API">
- <package name="net.dpml.part"/>
- <package name="net.dpml.control"/>
- <package name="net.dpml.builder"/>
- <package name="net.dpml.composition.data"/>
- <package name="net.dpml.composition.event"/>
- <package name="net.dpml.composition.info"/>
- <package name="net.dpml.composition.model"/>
- <package name="net.dpml.composition.models"/>
- <package name="net.dpml.composition.control"/>
- <package name="net.dpml.logging.data"/>
- <package name="net.dpml.meta.info"/>
- </group>
- <group title="Tools API">
- <package name="net.dpml.metro"/>
- <package name="net.dpml.metro.unit"/>
- <package name="net.dpml.meta.info.ant"/>
- <package name="net.dpml.composition.builder"/>
- </group>
- <group title="Private API">
- <package name="net.dpml.*"/>
- </group>
- -->
</x:javadoc>
</target>


Modified: development/main/metro/parts/build.xml
==============================================================================
--- development/main/metro/parts/build.xml (original)
+++ development/main/metro/parts/build.xml Wed May 18 20:04:11 2005
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>

-<project name="dpml-parts-api" default="install" basedir="."
+<project name="dpml-parts-api" default="default" basedir="."
xmlns:transit="antlib:net.dpml.transit">

<transit:import uri="artifact:template:dpml/magic/standard"/>

</project>
-

Added:
development/main/metro/parts/src/main/net/dpml/parts/builder/package.html
==============================================================================
--- (empty file)
+++ development/main/metro/parts/src/main/net/dpml/parts/builder/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,8 @@
+
+<body>
+
+<p>
+Interface implemented by part construction tools.
+</p>
+
+</body>

Added:
development/main/metro/parts/src/main/net/dpml/parts/control/ControllerContext.java
==============================================================================
--- (empty file)
+++
development/main/metro/parts/src/main/net/dpml/parts/control/ControllerContext.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,68 @@
+/*
+ * 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.parts.control;
+
+import java.net.URI;
+import java.io.File;
+
+/**
+ * The ControllerContext is a management service supplied to a controller
instance.
+ *
+ * @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 interface ControllerContext
+{
+ /**
+ * Return the URI identifying the controller working context.
+ * @return the context uri
+ */
+ URI getURI();
+
+ /**
+ * Return the root working directory.
+ *
+ * @return directory representing the root of the working directory
hierachy
+ */
+ File getWorkingDirectory();
+
+ /**
+ * Return the root temporary directory.
+ *
+ * @return directory representing the root of the temporary directory
hierachy.
+ */
+ File getTempDirectory();
+
+ /**
+ * 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
+ */
+ void addControllerContextlistener( ControllerContextListener listener );
+
+ /**
+ * Remove the supplied controller context listener from the controller
context.
+ *
+ * @param listener the controller context listener to remove
+ */
+ void removeControllerContextlistener( ControllerContextListener listener
);
+
+}

Added:
development/main/metro/parts/src/main/net/dpml/parts/control/ControllerContextEvent.java
==============================================================================
--- (empty file)
+++
development/main/metro/parts/src/main/net/dpml/parts/control/ControllerContextEvent.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,68 @@
+/*
+ * 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.parts.control;
+
+import java.io.File;
+import java.util.EventObject;
+
+/**
+ * The ControllerContextEvent is an abstract base class for working and
+ * temporty directory change notification events.
+ *
+ * @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 abstract class ControllerContextEvent extends EventObject
+{
+ private ControllerContext m_context;
+
+ private File m_old;
+
+ private File m_new;
+
+ /**
+ * Creation of a new controller context event object.
+ *
+ * @param source the controller context initiating the event
+ * @param oldDir the original directory value
+ * @param newDir the new directory value
+ */
+ public ControllerContextEvent( ControllerContext source, File oldDir,
File newDir )
+ {
+ super( source );
+ m_context = source;
+ m_old = oldDir;
+ m_new = newDir;
+ }
+
+ public ControllerContext getContext()
+ {
+ return m_context;
+ }
+
+ public File getOldDirectory()
+ {
+ return m_old;
+ }
+
+ public File getNewDirectory()
+ {
+ return m_new;
+ }
+}

Added:
development/main/metro/parts/src/main/net/dpml/parts/control/ControllerContextListener.java
==============================================================================
--- (empty file)
+++
development/main/metro/parts/src/main/net/dpml/parts/control/ControllerContextListener.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,46 @@
+/*
+ * 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.parts.control;
+
+import java.util.EventListener;
+
+/**
+ * An interface implementation by controller concerned with or responsible
+ * for handling changes in the runtime directory context.
+ *
+ * @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 interface ControllerContextListener extends EventListener
+{
+ /**
+ * Notify the listener that the working directory has changed.
+ *
+ * @param event the change event
+ */
+ void contextChanged( WorkingDirectoryChangeEvent event );
+
+ /**
+ * Notify the listener that the temporary directory has changed.
+ *
+ * @param event the change event
+ */
+ void contextChanged( TempDirectoryChangeEvent event );
+
+}

Modified:
development/main/metro/parts/src/main/net/dpml/parts/control/Manager.java
==============================================================================
--- development/main/metro/parts/src/main/net/dpml/parts/control/Manager.java
(original)
+++ development/main/metro/parts/src/main/net/dpml/parts/control/Manager.java
Wed May 18 20:04:11 2005
@@ -42,6 +42,7 @@
/**
* Applies a state transition identified by a supplied transition key.
*
+ * @param instance the component instance to which the transition is to
be applied
* @param key the key identifying the transition to apply to the
component's controller
* @return the state resulting from the transition
* @exception if a transition error occurs
@@ -51,6 +52,7 @@
/**
* Executes an operation identified by a supplied operation key.
*
+ * @param instance the component instance to which the operation is to be
executed against
* @param key the key identifying the operation to execute
* @exception if a transition error occurs
*/
@@ -61,16 +63,18 @@
*
* @param instance the instance to release
*/
- void release( Object object );
+ void release( Object instance );

/**
* Initialize the component.
+ * @param component the component
*/
- void initialize( Component entry ) throws Exception;
+ void initialize( Component component ) throws Exception;

/**
* Termination of the component.
+ * @param component the component
*/
- void terminate( Component entry );
+ void terminate( Component component );

}

Added:
development/main/metro/parts/src/main/net/dpml/parts/control/TempDirectoryChangeEvent.java
==============================================================================
--- (empty file)
+++
development/main/metro/parts/src/main/net/dpml/parts/control/TempDirectoryChangeEvent.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,43 @@
+/*
+ * 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.parts.control;
+
+import java.io.File;
+
+/**
+ * The TempDirectoryChangeEvent describes the change of the temporary
directory
+ * assigned to a controller.
+ *
+ * @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 TempDirectoryChangeEvent extends ControllerContextEvent
+{
+ /**
+ * Creation of a new controller context temp directory change event.
+ *
+ * @param source the controller context initiating the event
+ * @param oldDir the original working directory value
+ * @param newDir the new working directory value
+ */
+ public TempDirectoryChangeEvent( ControllerContext source, File oldDir,
File newDir )
+ {
+ super( source, oldDir, newDir );
+ }
+}

Added:
development/main/metro/parts/src/main/net/dpml/parts/control/WorkingDirectoryChangeEvent.java
==============================================================================
--- (empty file)
+++
development/main/metro/parts/src/main/net/dpml/parts/control/WorkingDirectoryChangeEvent.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,43 @@
+/*
+ * 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.parts.control;
+
+import java.io.File;
+
+/**
+ * The WorkingDirectoryChangeEvent describes the change of the working
directory
+ * assigned to a controller.
+ *
+ * @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 WorkingDirectoryChangeEvent extends ControllerContextEvent
+{
+ /**
+ * Creation of a new controller context working directory change event.
+ *
+ * @param source the controller context initiating the event
+ * @param oldDir the original working directory value
+ * @param newDir the new working directory value
+ */
+ public WorkingDirectoryChangeEvent( ControllerContext source, File
oldDir, File newDir )
+ {
+ super( source, oldDir, newDir );
+ }
+}

Added:
development/main/metro/parts/src/main/net/dpml/parts/control/package.html
==============================================================================
--- (empty file)
+++ development/main/metro/parts/src/main/net/dpml/parts/control/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,8 @@
+
+<body>
+
+<p>
+Interface implemented by part controllers.
+</p>
+
+</body>

Modified:
development/main/metro/parts/src/main/net/dpml/parts/model/Provider.java
==============================================================================
--- development/main/metro/parts/src/main/net/dpml/parts/model/Provider.java
(original)
+++ development/main/metro/parts/src/main/net/dpml/parts/model/Provider.java
Wed May 18 20:04:11 2005
@@ -43,8 +43,16 @@
*/
boolean isOperational();

+ /**
+ * Add an availability listener to the provider.
+ * @param listener the availability listener
+ */
void addAvailabilityListener( AvailabilityListener listener );

+ /**
+ * Remove an availability listener from the provider.
+ * @param listener the availability listener
+ */
void removeAvailabilityListener( AvailabilityListener listener );

/**
@@ -53,8 +61,16 @@
*/
State getState();

+ /**
+ * Add a state listener to the provider.
+ * @param listener the state listener
+ */
void addStateListener( StateListener listener );

+ /**
+ * Remove a state listener from the provider.
+ * @param listener the state listener
+ */
void removeStateListener( StateListener listener );

/**
@@ -98,5 +114,5 @@
*
* @param instance the instance to release
*/
- void release( Object object );
+ void release( Object instance );
}

Added: development/main/metro/parts/src/main/net/dpml/parts/model/package.html
==============================================================================
--- (empty file)
+++ development/main/metro/parts/src/main/net/dpml/parts/model/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,8 @@
+
+<body>
+
+<p>
+Generic interfaces defining a common component model.
+</p>
+
+</body>

Modified:
development/main/metro/parts/src/main/net/dpml/parts/part/PartReference.java
==============================================================================
---
development/main/metro/parts/src/main/net/dpml/parts/part/PartReference.java
(original)
+++
development/main/metro/parts/src/main/net/dpml/parts/part/PartReference.java
Wed May 18 20:04:11 2005
@@ -44,7 +44,8 @@
* Creation of a new parameter using the default
<code>java.lang.String</code>
* type and a supplied value.
*
- * @param value the string value
+ * @param key the key identifying this part within the scope of its
container
+ * @param part the part
*/
public PartReference( final String key, Part part )
{

Added: development/main/metro/parts/src/main/net/dpml/parts/part/package.html
==============================================================================
--- (empty file)
+++ development/main/metro/parts/src/main/net/dpml/parts/part/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,8 @@
+
+<body>
+
+<p>
+Interfaces defining a generic 'part'.
+</p>
+
+</body>

Added:
development/main/metro/parts/src/main/net/dpml/parts/state/DuplicateKeyException.java
==============================================================================
--- (empty file)
+++
development/main/metro/parts/src/main/net/dpml/parts/state/DuplicateKeyException.java
Wed May 18 20:04:11 2005
@@ -0,0 +1,42 @@
+/*
+ * 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.parts.state;
+
+
+/**
+ * Exception thrown when a operation attempts to overrite an existing key.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ */
+public class DuplicateKeyException extends RuntimeException
+{
+ private String m_transition;
+
+ /**
+ * Construct a new <code>DuplicateKeyException</code> instance.
+ *
+ * @param transition the transition name
+ */
+ public DuplicateKeyException( final String transition )
+ {
+ super( transition );
+ }
+
+}
+

Modified:
development/main/metro/parts/src/main/net/dpml/parts/state/RecursiveInitializationException.java
==============================================================================
---
development/main/metro/parts/src/main/net/dpml/parts/state/RecursiveInitializationException.java
(original)
+++
development/main/metro/parts/src/main/net/dpml/parts/state/RecursiveInitializationException.java
Wed May 18 20:04:11 2005
@@ -28,7 +28,7 @@
/**
* Construct a new <code>RecursiveTerminationException</code> instance.
*
- * @param handler the handler name
+ * @param message the exception message
*/
public RecursiveInitializationException( final String message )
{

Modified:
development/main/metro/parts/src/main/net/dpml/parts/state/RecursiveTerminationException.java
==============================================================================
---
development/main/metro/parts/src/main/net/dpml/parts/state/RecursiveTerminationException.java
(original)
+++
development/main/metro/parts/src/main/net/dpml/parts/state/RecursiveTerminationException.java
Wed May 18 20:04:11 2005
@@ -28,7 +28,7 @@
/**
* Construct a new <code>RecursiveTerminationException</code> instance.
*
- * @param handler the handler name
+ * @param message the exception message
*/
public RecursiveTerminationException( final String message )
{

Modified:
development/main/metro/parts/src/main/net/dpml/parts/state/ResourceUnavailableException.java
==============================================================================
---
development/main/metro/parts/src/main/net/dpml/parts/state/ResourceUnavailableException.java
(original)
+++
development/main/metro/parts/src/main/net/dpml/parts/state/ResourceUnavailableException.java
Wed May 18 20:04:11 2005
@@ -28,7 +28,6 @@
/**
* Creation of a new unavailable resource exception.
* @param message the message
- * @param cause the causal exception
*/
public ResourceUnavailableException( String message )
{

Modified:
development/main/metro/parts/src/main/net/dpml/parts/state/State.java
==============================================================================
--- development/main/metro/parts/src/main/net/dpml/parts/state/State.java
(original)
+++ development/main/metro/parts/src/main/net/dpml/parts/state/State.java
Wed May 18 20:04:11 2005
@@ -25,8 +25,6 @@
import java.util.List;
import java.net.URI;

-import net.dpml.parts.model.DuplicateKeyException;
-
/**
* The State interface is an interface representing an immutable state of
* a component instance.
@@ -345,7 +343,7 @@
* fired. This process will continue until a state is established that
does not
* delcare an initializor.
*
- * @param target the target initialization state
+ * @param uri the initialization uri
*/
public void setInitialization( URI uri )
{

Modified:
development/main/metro/parts/src/main/net/dpml/parts/state/StateEvent.java
==============================================================================
---
development/main/metro/parts/src/main/net/dpml/parts/state/StateEvent.java
(original)
+++
development/main/metro/parts/src/main/net/dpml/parts/state/StateEvent.java
Wed May 18 20:04:11 2005
@@ -34,7 +34,7 @@
/**
* Construct a new <code>StateEvent</code>.
*
- * @param instance the source compoent model
+ * @param model the source compoent model
* @param from the originating state
* @param to the new current state
*/

Modified:
development/main/metro/parts/src/main/net/dpml/parts/state/Transition.java
==============================================================================
---
development/main/metro/parts/src/main/net/dpml/parts/state/Transition.java
(original)
+++
development/main/metro/parts/src/main/net/dpml/parts/state/Transition.java
Wed May 18 20:04:11 2005
@@ -38,8 +38,6 @@
*
* @param handler the uri identifying the handler
* @param target the transition target state
- * @param system if TRUE this is a system transition otherwise the
transition
- * is a user (application) transition
*/
protected Transition( URI handler, State target )
{

Added: development/main/metro/parts/src/main/net/dpml/parts/state/package.html
==============================================================================
--- (empty file)
+++ development/main/metro/parts/src/main/net/dpml/parts/state/package.html
Wed May 18 20:04:11 2005
@@ -0,0 +1,8 @@
+
+<body>
+
+<p>
+Classes and interfaces that collectively defined a generic state model.
+</p>
+
+</body>

Modified:
development/main/metro/parts/src/test/net/dpml/parts/state/OperationTestCase.java
==============================================================================
---
development/main/metro/parts/src/test/net/dpml/parts/state/OperationTestCase.java
(original)
+++
development/main/metro/parts/src/test/net/dpml/parts/state/OperationTestCase.java
Wed May 18 20:04:11 2005
@@ -23,8 +23,6 @@

import junit.framework.TestCase;

-import net.dpml.parts.model.DuplicateKeyException;
-
/**
* Test creation of the default operation implentation.
*

Modified:
development/main/metro/parts/src/test/net/dpml/parts/state/StateTestCase.java
==============================================================================
---
development/main/metro/parts/src/test/net/dpml/parts/state/StateTestCase.java
(original)
+++
development/main/metro/parts/src/test/net/dpml/parts/state/StateTestCase.java
Wed May 18 20:04:11 2005
@@ -21,8 +21,6 @@
import java.net.URI;
import java.util.logging.Logger;

-import net.dpml.parts.model.DuplicateKeyException;
-
import junit.framework.TestCase;

/**

Modified:
development/main/metro/parts/src/test/net/dpml/parts/state/TransitionTestCase.java
==============================================================================
---
development/main/metro/parts/src/test/net/dpml/parts/state/TransitionTestCase.java
(original)
+++
development/main/metro/parts/src/test/net/dpml/parts/state/TransitionTestCase.java
Wed May 18 20:04:11 2005
@@ -23,8 +23,6 @@

import junit.framework.TestCase;

-import net.dpml.parts.model.DuplicateKeyException;
-
/**
* Test creation of a state model.
*

Modified: development/main/module.properties
==============================================================================
--- development/main/module.properties (original)
+++ development/main/module.properties Wed May 18 20:04:11 2005
@@ -17,3 +17,5 @@
dpml.metro.version = ${dpml.build.signature}
dpml.metro.uri = artifact:module:dpml/metro/dpml-metro#${dpml.metro.version}

+dpml.depot.version = ${dpml.build.signature}
+dpml.depot.uri = artifact:module:dpml/depot/dpml-depot#${dpml.depot.version}



  • svn commit: r2595 - in development: central central/site central/site/src/resources/images/depot central/tutorials central/tutorials/classic central/tutorials/classic/composition central/tutorials/classic/configuration central/tutorials/classic/context central/tutorials/classic/dependencies central/tutorials/classic/dynamics central/tutorials/classic/hello central/tutorials/classic/main central/tutorials/classic/parameterization central/tutorials/classic/profiles central/tutorials/classic/selection central/tutorials/classic/startable central/tutorials/metro laboratory/ide/common laboratory/ide/common/magic laboratory/spells/xdoclet/plugin laboratory/spells/xdoclet/plugin-test laboratory/spells/xdoclet/tutorial main main/depot main/depot/console main/depot/console/etc/bin main/depot/console/src/main/net/dpml/depot/lang main/depot/console/src/main/net/dpml/depot/logging main/depot/console/src/main/net/dpml/depot/logging/nodes main/depot/content main/depot/station/src/main/net/dpml/depot/prefs main/magic/core/src/main/net/dpml/magic/tasks main/metro main/metro/activity main/metro/activity/src/main/net/dpml/activity main/metro/classic main/metro/composition/builder/src/main/net/dpml/composition/builder main/metro/composition/builder/src/main/net/dpml/composition/builder/datatypes main/metro/composition/content main/metro/composition/content/src main/metro/composition/content/src/main main/metro/composition/content/src/main/net main/metro/composition/content/src/main/net/dpml main/metro/composition/content/src/main/net/dpml/composition main/metro/composition/content/src/main/net/dpml/composition/content main/metro/composition/control/src/main/net/dpml/composition/control main/metro/composition/control/src/main/net/dpml/composition/data main/metro/composition/control/src/main/net/dpml/composition/event main/metro/composition/control/src/main/net/dpml/composition/info main/metro/composition/control/src/main/net/dpml/composition/model main/metro/composition/part main/metro/composition/part/src main/metro/composition/part/src/main main/metro/composition/part/src/main/net main/metro/composition/part/src/main/net/dpml main/metro/composition/part/src/main/net/dpml/composition main/metro/composition/part/src/main/net/dpml/composition/part main/metro/composition/part/src/main/net/dpml/composition/part/images main/metro/composition/testing/test/src/test/net/dpml/composition/testing main/metro/composition/testing/test/src/test/net/dpml/test/state main/metro/composition/testing/workshop main/metro/composition/testing/workshop/src/test/net/dpml/test main/metro/composition/unit main/metro/composition/unit/src/main/net/dpml/composition/unit main/metro/composition/unit/src/main/net/dpml/composition/unit/images main/metro/configuration/api/src/main/net/dpml/configuration main/metro/configuration/impl/src/main/net/dpml/configuration/impl main/metro/context main/metro/logging main/metro/main main/metro/parts main/metro/parts/api main/metro/parts/spi main/metro/parts/src/main/net/dpml/parts/builder main/metro/parts/src/main/net/dpml/parts/control main/metro/parts/src/main/net/dpml/parts/model main/metro/parts/src/main/net/dpml/parts/part main/metro/parts/src/main/net/dpml/parts/state main/metro/parts/src/test/net/dpml/parts/state main/metro/service main/metro/system main/metro/util, mcconnell, 05/18/2005

Archive powered by MHonArc 2.6.24.

Top of Page