Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2497 - in development/main: . depot depot/station depot/station/src depot/station/src/main depot/station/src/main/net depot/station/src/main/net/dpml depot/station/src/main/net/dpml/depot depot/station/src/main/net/dpml/depot/station metro/composition/testing/workshop/src/test/net/dpml/test

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: r2497 - in development/main: . depot depot/station depot/station/src depot/station/src/main depot/station/src/main/net depot/station/src/main/net/dpml depot/station/src/main/net/dpml/depot depot/station/src/main/net/dpml/depot/station metro/composition/testing/workshop/src/test/net/dpml/test
  • Date: Tue, 10 May 2005 15:44:14 +0000

Author: mcconnell AT dpml.net
Date: Tue May 10 15:44:13 2005
New Revision: 2497

Added:
development/main/depot/ (props changed)
development/main/depot/build.xml
development/main/depot/index.xml
development/main/depot/module.properties
development/main/depot/module.xml
development/main/depot/station/ (props changed)
development/main/depot/station/build.xml
development/main/depot/station/src/
development/main/depot/station/src/main/
development/main/depot/station/src/main/net/
development/main/depot/station/src/main/net/dpml/
development/main/depot/station/src/main/net/dpml/depot/
development/main/depot/station/src/main/net/dpml/depot/station/

development/main/depot/station/src/main/net/dpml/depot/station/DepotContentHandlerDescriptor.java

development/main/depot/station/src/main/net/dpml/depot/station/DepotContentHandlerRegistry.java

development/main/depot/station/src/main/net/dpml/depot/station/DepotContentHandlerRegistryControlPanel.java
Modified:
development/main/build.bat

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
Log:
Addition of the "Depot" project dealing with projects that are pluggable
Transit sub-system extensions. The inital commit include the
dpml-depot-station plugin that is a replacement contrller for the default
content handler controller. This plugin will provide enhanced management
services related to registered plugins.

Modified: development/main/build.bat
==============================================================================
--- development/main/build.bat (original)
+++ development/main/build.bat Tue May 10 15:44:13 2005
@@ -25,6 +25,7 @@
IF "%TARGET%" == "" set TARGET=all
IF "%TARGET%" == "transit" CALL :transit
IF "%TARGET%" == "magic" CALL :magic
+IF "%TARGET%" == "depot" CALL :depot
IF "%TARGET%" == "metro" CALL :metro
IF "%TARGET%" == "all" CALL :all
goto end
@@ -36,6 +37,8 @@
IF ERRORLEVEL 1 goto fail
CALL :metro
if ERRORLEVEL 1 goto fail
+CALL :depot
+if ERRORLEVEL 1 goto fail
GOTO :EOF

:fail
@@ -63,6 +66,12 @@
POPD
GOTO :EOF

+:depot
+PUSHD depot
+CALL :build clean install
+POPD
+GOTO :EOF
+
:metro
PUSHD metro
CALL :build clean install

Added: development/main/depot/build.xml
==============================================================================
--- (empty file)
+++ development/main/depot/build.xml Tue May 10 15:44:13 2005
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+
+<project name="dpml-depot" default="default" basedir="."
+ xmlns:transit="antlib:net.dpml.transit">
+
+ <transit:import uri="artifact:template:dpml/magic/reactor"/>
+
+</project>

Added: development/main/depot/index.xml
==============================================================================
--- (empty file)
+++ development/main/depot/index.xml Tue May 10 15:44:13 2005
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<index key="dpml-metro">
+
+ <import uri="${dpml.transit.uri}"/>
+ <import uri="${dpml.magic.uri}"/>
+
+ <!--
+ Depot Modules
+ -->
+
+ <project file="module.xml">
+ <info>
+ <group>dpml/depot</group>
+ <name>dpml-depot</name>
+ <type>module</type>
+ </info>
+ <dependencies>
+ <include key="dpml-transit"/>
+ <include key="dpml-util"/>
+ </dependencies>
+ </project>
+
+ <!-- Station -->
+
+ <project basedir="station">
+ <info>
+ <group>dpml/depot</group>
+ <name>dpml-depot-station</name>
+ <types>
+ <type>jar</type>
+ <type>plugin</type>
+ </types>
+ </info>
+ <dependencies>
+ <include key="dpml-transit-main" tag="api"/>
+ </dependencies>
+ </project>
+
+</index>

Added: development/main/depot/module.properties
==============================================================================
--- (empty file)
+++ development/main/depot/module.properties Tue May 10 15:44:13 2005
@@ -0,0 +1 @@
+

Added: development/main/depot/module.xml
==============================================================================
--- (empty file)
+++ development/main/depot/module.xml Tue May 10 15:44:13 2005
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+
+<project name="dpml-depot" 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">
+ <filter token="PROJECT-NAME" value="${project.name}"/>
+ <filter token="PROJECT-VERSION" value="${project.version}"/>
+ <property name="bundle" value="${basedir}/target/bundle"/>
+ </target>
+
+ <target name="build" depends="standard.build">
+ <x:module index="index.xml">
+ <header>
+ <svn href="http://scm.dpml.net/repos/dpml/development/main/depot"/>
+ <home href="http://www.dpml.net/central/products/depot/"/>
+ </header>
+ </x:module>
+ <x:javadoc>
+ <link href="http://java.sun.com/j2se/1.4/docs/api"/>
+ </x:javadoc>
+ </target>
+
+ <target name="test" depends="standard.test">
+ <mkdir dir="target/reports/junit"/>
+ <junitreport todir="target/reports/junit">
+ <fileset dir=".">
+ <include name="**/target/test-reports/TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="target/reports/junit"/>
+ </junitreport>
+ </target>
+
+</project>

Added: development/main/depot/station/build.xml
==============================================================================
--- (empty file)
+++ development/main/depot/station/build.xml Tue May 10 15:44:13 2005
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="dpml-depot-station" 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="package" depends="standard.package">
+ <x:export class="net.dpml.depot.station.DepotContentHandlerRegistry"/>
+ </target>
+
+</project>

Added:
development/main/depot/station/src/main/net/dpml/depot/station/DepotContentHandlerDescriptor.java
==============================================================================
--- (empty file)
+++
development/main/depot/station/src/main/net/dpml/depot/station/DepotContentHandlerDescriptor.java
Tue May 10 15:44:13 2005
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2004 Niclas Hedhman
+ * 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.depot.station;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.prefs.PreferenceChangeListener;
+import java.util.prefs.PreferenceChangeEvent;
+import java.util.prefs.Preferences;
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+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 DepotContentHandlerDescriptor 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 DepotContentHandlerDescriptor( 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/depot/station/src/main/net/dpml/depot/station/DepotContentHandlerRegistry.java
==============================================================================
--- (empty file)
+++
development/main/depot/station/src/main/net/dpml/depot/station/DepotContentHandlerRegistry.java
Tue May 10 15:44:13 2005
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2004 Niclas Hedhman
+ * 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.depot.station;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URL;
+import java.net.URISyntaxException;
+import java.net.ContentHandler;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.prefs.Preferences;
+import java.util.prefs.NodeChangeListener;
+import java.util.prefs.NodeChangeEvent;
+import java.util.prefs.BackingStoreException;
+import java.util.logging.Logger;
+
+import net.dpml.io.CascadingIOException;
+
+import net.dpml.transit.TransitException;
+import net.dpml.transit.content.ContentHandlerRegistry;
+import net.dpml.transit.content.ContentHandlerDescriptor;
+import net.dpml.transit.content.DefaultContentHandlerRegistry;
+import net.dpml.transit.repository.StandardLoader;
+
+/**
+ * A registry of descriptions of plugable content handlers. This
implementation
+ * maps user defined preferences to instance of ContentHandlerDescriptor.
+ */
+public class DepotContentHandlerRegistry extends
DefaultContentHandlerRegistry
+{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
+ // The following static operations is here simply to setup an example
content
+ // handler plugin declaration that we can use for testing. This will be
+ // removed once a proper installation strategy is established for
content
+ // handler plugins.
+
+ static
+ {
+ 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" );
+ }
+
+ //
------------------------------------------------------------------------
+ // 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 DepotContentHandlerRegistry( 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
DepotContentHandlerDescriptor( 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/depot/station/src/main/net/dpml/depot/station/DepotContentHandlerRegistryControlPanel.java
==============================================================================
--- (empty file)
+++
development/main/depot/station/src/main/net/dpml/depot/station/DepotContentHandlerRegistryControlPanel.java
Tue May 10 15:44:13 2005
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004 Niclas Hedhman
+ * 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.depot.station;
+
+import javax.swing.JDialog;
+
+/**
+ * A registry of descriptions of plugable content handlers. This
implementation
+ * maps user defined preferences to instance of ContentHandlerDescriptor.
+ */
+public class DepotContentHandlerRegistryControlPanel extends JDialog
+{
+
+}

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
Tue May 10 15:44:13 2005
@@ -39,6 +39,7 @@
{
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/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
Tue May 10 15:44:13 2005
@@ -39,6 +39,7 @@
{
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" );
}

private ClassLoader m_classloader;



  • svn commit: r2497 - in development/main: . depot depot/station depot/station/src depot/station/src/main depot/station/src/main/net depot/station/src/main/net/dpml depot/station/src/main/net/dpml/depot depot/station/src/main/net/dpml/depot/station metro/composition/testing/workshop/src/test/net/dpml/test, mcconnell, 05/10/2005

Archive powered by MHonArc 2.6.24.

Top of Page