Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2801 - in development/main/depot/console: . etc/bin src/main/net/dpml/depot src/main/net/dpml/depot/profile

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: r2801 - in development/main/depot/console: . etc/bin src/main/net/dpml/depot src/main/net/dpml/depot/profile
  • Date: Wed, 08 Jun 2005 18:23:02 -0400

Author: mcconnell AT dpml.net
Date: Wed Jun 8 18:22:59 2005
New Revision: 2801

Modified:
development/main/depot/console/build.xml
development/main/depot/console/etc/bin/depot-cygwin.sh
development/main/depot/console/etc/bin/depot-unix.sh
development/main/depot/console/etc/bin/depot.bat
development/main/depot/console/src/main/net/dpml/depot/Main.java

development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfile.java

development/main/depot/console/src/main/net/dpml/depot/profile/DepotStorage.java

development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfile.java
development/main/depot/console/src/main/net/dpml/depot/profile/Profile.java

development/main/depot/console/src/main/net/dpml/depot/profile/ProfileStorage.java
Log:
Updates to the console including the bumping up of the Main class to
net.dpml.depot package.

Modified: development/main/depot/console/build.xml
==============================================================================
--- development/main/depot/console/build.xml (original)
+++ development/main/depot/console/build.xml Wed Jun 8 18:22:59 2005
@@ -14,7 +14,12 @@
<x:property name="prefs.filename" key="dpml-depot-prefs"
feature="filename"/>
<filter token="TRANSIT-MAIN-LIB" value="${transit.filename}" />
<filter token="DEPOT-PREFS-LIB" value="${prefs.filename}" />
+ <filter token="DEPOT-MAIN-CLASS" value="net.dpml.depot.Main" />
<property name="project.jar.classpath" value="${transit.filename}" />
+ <x:property name="station.plugin" key="dpml-depot-station" feature="uri"
type="plugin"/>
+ <filter token="STATION-PLUGIN-URI" value="${station.plugin}" />
+ <x:property name="test.plugin" key="dpml-depot-test" feature="uri"
type="plugin"/>
+ <filter token="TEST-PLUGIN-URI" value="${test.plugin}" />
</target>

<target name="install" depends="standard.install">

Modified: development/main/depot/console/etc/bin/depot-cygwin.sh
==============================================================================
--- development/main/depot/console/etc/bin/depot-cygwin.sh (original)
+++ development/main/depot/console/etc/bin/depot-cygwin.sh Wed Jun 8
18:22:59 2005
@@ -1,48 +1,48 @@
-#!/bin/sh
-#
-# 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.
-
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-
-JAVA="$JAVA_HOME/bin/java"
-
-# switch necessary paths to Windows format before running java
-JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
-DPML_HOME=`cygpath --windows "$DPML_HOME"`
-DPML_SYSTEM=`cygpath --windows "$DPML_SYSTEM"`
-DEPOT_CLASSPATH=`cygpath --windows "$DEPOT_CLASSPATH"`
-[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
-
-TITLE="Starting Depot $DEPOT_VERSION."
-echo $TITLE
-echo "$TITLE" | sed 's/./=/g'
-echo " Platform: $PLATFORM"
-echo " Java Home: $JAVA_HOME"
-echo " DPML System: $DPML_SYSTEM"
-echo " DPML Home: $DPML_HOME"
-echo " Security policy: $SECURITY_POLICY"
-echo " JVM Options: $DEPOT_JVM_OPTS"
-echo " Depot Classpath: $DEPOT_CLASSPATH"
-echo " Depot Arguments: $DEPOT_ARGS $@"
-echo ""
-
-ARGS="$DEPOT_JVM_OPTS
-Djava.system.class.loader=net.dpml.depot.lang.DepotClassLoader
\"-Djava.security.policy=$SECURITY_POLICY\" -classpath \"$DEPOT_CLASSPATH\"
net.dpml.depot.lang.Main $DEPOT_ARGS $@"
-
-echo $ARGS | xargs "$JAVA"
+#!/bin/sh
+#
+# 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.
+
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+
+JAVA="$JAVA_HOME/bin/java"
+
+# switch necessary paths to Windows format before running java
+JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
+DPML_HOME=`cygpath --windows "$DPML_HOME"`
+DPML_SYSTEM=`cygpath --windows "$DPML_SYSTEM"`
+DEPOT_CLASSPATH=`cygpath --windows "$DEPOT_CLASSPATH"`
+[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+
+TITLE="Starting Depot $DEPOT_VERSION."
+echo $TITLE
+echo "$TITLE" | sed 's/./=/g'
+echo " Platform: $PLATFORM"
+echo " Java Home: $JAVA_HOME"
+echo " DPML System: $DPML_SYSTEM"
+echo " DPML Home: $DPML_HOME"
+echo " Security policy: $SECURITY_POLICY"
+echo " JVM Options: $DEPOT_JVM_OPTS"
+echo " Depot Classpath: $DEPOT_CLASSPATH"
+echo " Depot Arguments: $DEPOT_ARGS $@"
+echo ""
+
+ARGS="$DEPOT_JVM_OPTS
-Djava.system.class.loader=net.dpml.depot.lang.DepotClassLoader
\"-Djava.security.policy=$SECURITY_POLICY\" -classpath \"$DEPOT_CLASSPATH\"
@DEPOT-MAIN-CLASS@ $DEPOT_ARGS $@"
+
+echo $ARGS | xargs "$JAVA"

Modified: development/main/depot/console/etc/bin/depot-unix.sh
==============================================================================
--- development/main/depot/console/etc/bin/depot-unix.sh (original)
+++ development/main/depot/console/etc/bin/depot-unix.sh Wed Jun 8
18:22:59 2005
@@ -1,37 +1,37 @@
-#!/bin/sh
-#
-# Copyright 2004 Niclas Hedhman
-# 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.
-
-TITLE="Starting Depot $DEPOT_VERSION."
-echo $TITLE
-echo "$TITLE" | sed 's/./=/g'
-echo " Platform: $PLATFORM"
-echo " Java Home: $JAVA_HOME"
-echo " DPML System: $DPML_SYSTEM"
-echo " DPML Home: $DPML_HOME"
-echo " Security policy: $SECURITY_POLICY"
-echo " JVM Options: $DEPOT_JVM_OPTS"
-echo " Depot Classpath: $DEPOT_CLASSPATH"
-echo " Depot Arguments: $DEPOT_ARGS $@"
-echo ""
-
-JAVA="$JAVA_HOME/bin/java"
-
-ARGS="$DEPOT_JVM_OPTS
-Djava.system.class.loader=net.dpml.depot.lang.DepotClassLoader
\"-Djava.security.policy=$SECURITY_POLICY\" -classpath \"$DEPOT_CLASSPATH\"
net.dpml.depot.lang.Main $DEPOT_ARGS $@"
-
-echo $ARGS | xargs "$JAVA"
+#!/bin/sh
+#
+# Copyright 2004 Niclas Hedhman
+# 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.
+
+TITLE="Starting Depot $DEPOT_VERSION."
+echo $TITLE
+echo "$TITLE" | sed 's/./=/g'
+echo " Platform: $PLATFORM"
+echo " Java Home: $JAVA_HOME"
+echo " DPML System: $DPML_SYSTEM"
+echo " DPML Home: $DPML_HOME"
+echo " Security policy: $SECURITY_POLICY"
+echo " JVM Options: $DEPOT_JVM_OPTS"
+echo " Depot Classpath: $DEPOT_CLASSPATH"
+echo " Depot Arguments: $DEPOT_ARGS $@"
+echo ""
+
+JAVA="$JAVA_HOME/bin/java"
+
+ARGS="$DEPOT_JVM_OPTS
-Djava.system.class.loader=net.dpml.depot.lang.DepotClassLoader
\"-Djava.security.policy=$SECURITY_POLICY\" -classpath \"$DEPOT_CLASSPATH\"
@DEPOT-MAIN-CLASS@ $DEPOT_ARGS $@"
+
+echo $ARGS | xargs "$JAVA"

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 Jun 8 18:22:59
2005
@@ -25,7 +25,7 @@
set $ARGS=%*

:RUN_DEPOT
-%JAVA% -Djava.system.class.loader=net.dpml.depot.lang.DepotClassLoader
%$POLICY% %DEPOT_JVM_OPTS% -classpath %$DEPOT_CLASSPATH%
net.dpml.depot.lang.Main %DEPOT_ARGS% %$ARGS%
+%JAVA% -Djava.system.class.loader=net.dpml.depot.lang.DepotClassLoader
%$POLICY% %DEPOT_JVM_OPTS% -classpath %$DEPOT_CLASSPATH% @DEPOT-MAIN-CLASS@
%DEPOT_ARGS% %$ARGS%
goto EndOfScript
:EndOfScript


Modified: development/main/depot/console/src/main/net/dpml/depot/Main.java
==============================================================================
--- development/main/depot/console/src/main/net/dpml/depot/Main.java
(original)
+++ development/main/depot/console/src/main/net/dpml/depot/Main.java Wed
Jun 8 18:22:59 2005
@@ -24,6 +24,8 @@
import java.net.URL;
import java.net.URI;
import java.rmi.Remote;
+import java.rmi.ConnectException;
+import java.rmi.RemoteException;
import java.rmi.registry.Registry;
import java.rmi.registry.LocateRegistry;
import java.util.Date;
@@ -80,45 +82,57 @@
public static void main( final String[] args )
throws Exception
{
- try
+ boolean server = false;
+ for( int i=0; i < args.length; i++ )
{
- //
- // check if debug level logging should be enabled
- //
-
- for( int i=0; i < args.length; i++ )
+ String arg = args[i];
+ if( arg.equals( "-server" ) )
{
- String arg = args[i];
- if( arg.equals( "-debug" ) )
- {
- System.setProperty( "dpml.logging.level", "FINE" );
- }
+ server = true;
+ break;
}
+ }
+
+ //
+ // check if debug level logging should be enabled
+ //

- Logger logger = getLogger();
- logger.info( "Depot (Build ID: " + DPML.BUILD_ID + ")." );
-
- //
- // check if a preferences reset has been requested
- //
+ for( int i=0; i < args.length; i++ )
+ {
+ String arg = args[i];
+ if( arg.equals( "-debug" ) )
+ {
+ System.setProperty( "dpml.logging.level", "FINE" );
+ break;
+ }
+ }
+
+ LOGGER = new LoggingAdapter( java.util.logging.Logger.getLogger(
"depot" ) );
+ Logger logger = getLogger();
+ logger.info( "Depot (Build ID: " + DPML.BUILD_ID + ")." );

- for( int i=0; i < args.length; i++ )
+ //
+ // check if a preferences reset has been requested
+ //
+
+ for( int i=0; i < args.length; i++ )
+ {
+ String arg = args[i];
+ if( arg.equals( "-reset" ) )
{
- String arg = args[i];
- if( arg.equals( "-reset" ) )
- {
- clearPreferences( Main.class );
- clearPreferences( Transit.class );
- return;
- }
+ clearPreferences( Main.class );
+ clearPreferences( Transit.class );
+ return;
}
+ }

+ try
+ {
//
// setup the depot managment model, get the name of the
requested
// application profile and load the profile from the depot
manager
//

-
Date creation = new Date();
Preferences prefs = getRootPreferences();
DepotStorage store = new DepotStorage( prefs, logger, creation,
false );
@@ -137,7 +151,6 @@
URI uri = p.getURI();
try
{
- Thread thread = null;
TransitHome home = new TransitStorageUnit();
TransitManager model = home.create();
Transit transit = Transit.getInstance( model );
@@ -150,6 +163,7 @@
logger.info(
"service bound to " + connection.getHost()
+ ":" + connection.getPort() + "/" + id );
+ server = true;
}
else if( object instanceof Runnable )
{
@@ -157,11 +171,18 @@
// run the plugin
//

+ Thread thread = null;
logger.info( "starting " +
object.getClass().getName() );
thread = new Thread( (Runnable) object );
thread.start();
+ setShutdownHook( thread );
+ server = true;
+ }
+ else
+ {
+ logger.info( "loaded " + object.getClass().getName()
);
+ //setShutdownHook( object );
}
- setShutdownHook( thread );
}
catch( TransitError e )
{
@@ -235,6 +256,12 @@
{
System.exit( -1 );
}
+ getLogger().info( "done" );
+ if( false == server )
+ {
+ System.exit( 0 );
+ }
+
}

public static Registry getRegistry( Connection connection )
@@ -245,18 +272,47 @@
}
else
{
- try
+ String host = connection.getHost();
+ int port = connection.getPort();
+
+ if( ( null == host ) || ( "localhost".equals( host ) ) )
{
- String host = connection.getHost();
- int port = connection.getPort();
- return LocateRegistry.getRegistry( host, port );
+ try
+ {
+ Registry registry = LocateRegistry.createRegistry( port
);
+ getLogger().debug( "created local registry on port " +
port );
+ return registry;
+ }
+ catch( RemoteException e )
+ {
+ try
+ {
+ Registry registry = LocateRegistry.getRegistry( port
);
+ getLogger().debug( "using local registry on port " +
port );
+ return registry;
+ }
+ catch( RemoteException ee )
+ {
+ final String error =
+ "Unable to locate the RMI Registry.";
+ getLogger().error( error, ee );
+ throw new HandledError();
+ }
+ }
}
- catch( Throwable e )
+ else
{
- final String error =
- "Unable to establish the RMI Registry.";
- getLogger().error( error, e );
- throw new HandledError();
+ try
+ {
+ return LocateRegistry.getRegistry( host, port );
+ }
+ catch( RemoteException e )
+ {
+ final String error =
+ "Unable to establish the RMI Registry.";
+ getLogger().error( error, e );
+ throw new HandledError();
+ }
}
}
}
@@ -389,23 +445,24 @@
* Create a shutdown hook that will trigger shutdown of the supplied
plugin.
* @param thread the application thread
*/
- private static void setShutdownHook( final Thread thread )
+ private static void setShutdownHook( final Object object )
{
//
// Create a shutdown hook to trigger clean disposal of the
// controller
//

+
Runtime.getRuntime().addShutdownHook(
new Thread()
{
public void run()
{
- if( null != thread )
+ if( ( null != object ) && ( object instanceof Thread ) )
{
try
{
- thread.interrupt();
+ ((Thread)object).interrupt();
}
catch( Throwable e )
{
@@ -425,11 +482,11 @@

private static Logger getLogger()
{
- return DEFAULT_LOGGER;
+ return LOGGER;
}

- private static final Logger DEFAULT_LOGGER =
- new LoggingAdapter( java.util.logging.Logger.getLogger( "depot" ) );
+ private static Logger LOGGER = null;
+ //new LoggingAdapter( java.util.logging.Logger.getLogger( "depot" ) );
private static final Preferences ROOT_PREFS =
Preferences.userNodeForPackage( Main.class );


Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfile.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfile.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfile.java
Wed Jun 8 18:22:59 2005
@@ -36,12 +36,12 @@
private String[] m_classpath;

public BootstrapProfile(
- Logger logger, Date creation, Home home, String title,
+ Logger logger, Date creation, Home home, String id, String title,
Properties properties, Connection connection,
String classname, String[] classpath )
throws NullPointerException
{
- super( logger, creation, home, title, properties, connection );
+ super( logger, creation, home, id, title, properties, connection );

m_classname = classname;
m_classpath = classpath;

Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/DepotStorage.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/DepotStorage.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/DepotStorage.java
Wed Jun 8 18:22:59 2005
@@ -92,22 +92,25 @@

private Profile[] getProfiles() throws ProfileException
{
- Preferences prefs = getPreferences().node( "profiles" );
try
{
- String[] names = prefs.childrenNames();
- Profile[] profiles = new Profile[ names.length ];
- for( int i=0; i<names.length; i++ )
+ if( false == getPreferences().node( "profiles" ).nodeExists(
"prefs" ) )
{
- String id = names[i];
- Preferences p = prefs.node( id );
- Logger logger = getLogger().getChildLogger( id );
- boolean policy = getStoragePolicy();
- Date creation = getCreationDate();
- ProfileStorage store = new ProfileStorage( p, logger,
creation, policy );
- profiles[i] = store.getProfile();
+ return createBootstrapProfiles();
+ }
+ else
+ {
+ Preferences prefs = getPreferences().node( "profiles" );
+ String[] names = prefs.childrenNames();
+ Profile[] profiles = new Profile[ names.length ];
+ for( int i=0; i<names.length; i++ )
+ {
+ String id = names[i];
+ Profile profile = createProfile( id );
+ profiles[i] = profile;
+ }
+ return profiles;
}
- return profiles;
}
catch( BackingStoreException e )
{
@@ -117,8 +120,68 @@
}
}

+ private Profile createProfile( String id ) throws ProfileException
+ {
+ Preferences prefs = getPreferences().node( "profiles" ).node( id );
+ Logger logger = getLogger().getChildLogger( id );
+ boolean policy = getStoragePolicy();
+ Date creation = getCreationDate();
+ ProfileStorage store = new ProfileStorage( prefs, logger, creation,
policy );
+ return store.getProfile();
+ }
+
private void store( DepotManager manager )
{
throw new UnsupportedOperationException( "store/1" );
}
+
+ private Profile[] createBootstrapProfiles() throws ProfileException
+ {
+ Profile prefs = createPrefsProfile();
+ Profile station = createStationProfile();
+ Profile test = createTestProfile();
+ return new Profile[]{ prefs, station, test };
+ }
+
+ private Profile createPrefsProfile() throws ProfileException
+ {
+ String id = "prefs";
+ Date creation = getCreationDate();
+ Logger logger = getLogger().getChildLogger( id );
+ boolean policy = getStoragePolicy();
+ Preferences prefs = getPreferences().node( "profiles" ).node( id );
+ prefs.put( "classname", "net.dpml.depot.prefs.Main" );
+ prefs.put( "title", "Depot Preferences" );
+ prefs.node( "classpath" ).put( "dpml-depot-prefs",
"${dpml.data}/lib/@DEPOT-PREFS-LIB@" );
+ ProfileStorage store = new ProfileStorage( prefs, logger, creation,
policy );
+ return store.getProfile();
+ }
+
+ private Profile createStationProfile() throws ProfileException
+ {
+ String id = "station";
+ Date creation = getCreationDate();
+ Logger logger = getLogger().getChildLogger( id );
+ boolean policy = getStoragePolicy();
+ Preferences prefs = getPreferences().node( "profiles" ).node( id );
+ prefs.put( "plugin", "@STATION-PLUGIN-URI@" );
+ prefs.put( "title", "Depot Station" );
+ prefs.node( "connection" );
+ ProfileStorage store = new ProfileStorage( prefs, logger, creation,
policy );
+ return store.getProfile();
+ }
+
+ private Profile createTestProfile() throws ProfileException
+ {
+ String id = "test";
+ Date creation = getCreationDate();
+ Logger logger = getLogger().getChildLogger( id );
+ boolean policy = getStoragePolicy();
+ Preferences prefs = getPreferences().node( "profiles" ).node( id );
+ prefs.put( "plugin", "@TEST-PLUGIN-URI@" );
+ prefs.put( "title", "Depot Station Test" );
+ ProfileStorage store = new ProfileStorage( prefs, logger, creation,
policy );
+ return store.getProfile();
+ }
+
}

Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfile.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfile.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfile.java
Wed Jun 8 18:22:59 2005
@@ -34,10 +34,10 @@
private URI m_uri;

public PluginProfile(
- Logger logger, Date creation, Home home, String title,
+ Logger logger, Date creation, Home home, String id, String title,
Properties properties, Connection connection, URI uri )
{
- super( logger, creation, home, title, properties, connection );
+ super( logger, creation, home, id, title, properties, connection );

m_uri = uri;
}

Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/Profile.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/Profile.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/Profile.java
Wed Jun 8 18:22:59 2005
@@ -32,16 +32,18 @@
*/
public class Profile extends DefaultManager
{
- private String m_id;
+ private final String m_id;
+ private String m_title;
private Properties m_properties;
private Connection m_connection;

- public Profile( Logger logger, Date creation, Home home, String id,
Properties properties, Connection connection )
+ public Profile( Logger logger, Date creation, Home home, String id,
String title, Properties properties, Connection connection )
throws NullPointerException
{
super( logger, creation, home );

m_id = id;
+ m_title = title;
m_properties = properties;
m_connection = connection;
}
@@ -51,6 +53,16 @@
return m_id;
}

+ public String getTitle()
+ {
+ return m_title;
+ }
+
+ public void setTitle( String title )
+ {
+ m_title = title;
+ }
+
public Properties getSystemProperties()
{
return m_properties;

Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/ProfileStorage.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/ProfileStorage.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/ProfileStorage.java
Wed Jun 8 18:22:59 2005
@@ -53,7 +53,8 @@
{
super( prefs, logger, creation, policy );

- String title = prefs.get( "title", prefs.name() );
+ String id = prefs.name();
+ String title = prefs.get( "title", id );
Properties properties = getProperties();
Connection connection = getConnection();
String path = prefs.get( "plugin", null );
@@ -62,7 +63,7 @@
try
{
URI uri = new URI( path );
- m_profile = new PluginProfile( logger, creation, this,
title, properties, connection, uri );
+ m_profile = new PluginProfile( logger, creation, this, id,
title, properties, connection, uri );
}
catch( URISyntaxException e )
{
@@ -80,7 +81,7 @@
String[] classpath = getClasspath();
m_profile =
new BootstrapProfile(
- logger, creation, this, title, properties, connection,
classname, classpath );
+ logger, creation, this, id, title, properties,
connection, classname, classpath );
}
else
{
@@ -132,7 +133,14 @@
Preferences prefs = getPreferences().node( "classpath" );
try
{
- return prefs.keys();
+ String[] keys = prefs.keys();
+ String[] values = new String[ keys.length ];
+ for( int i=0; i<keys.length; i++ )
+ {
+ String key = keys[i];
+ values[i] = prefs.get( key, null );
+ }
+ return values;
}
catch( BackingStoreException e )
{



  • svn commit: r2801 - in development/main/depot/console: . etc/bin src/main/net/dpml/depot src/main/net/dpml/depot/profile, mcconnell, 06/08/2005

Archive powered by MHonArc 2.6.24.

Top of Page