Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2804 - in development/main/depot/console/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: r2804 - in development/main/depot/console/src/main/net/dpml/depot: . profile
  • Date: Wed, 08 Jun 2005 20:44:53 -0400

Author: mcconnell AT dpml.net
Date: Wed Jun 8 20:44:53 2005
New Revision: 2804

Modified:
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:
housekeeping

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 20:44:53 2005
@@ -68,17 +68,7 @@
{
long start = new Date().getTime();
System.setSecurityManager(new RMISecurityManager());
-
- boolean server = true;
- for( int i=0; i < args.length; i++ )
- {
- String arg = args[i];
- if( arg.equals( "-execute" ) )
- {
- server = false;
- break;
- }
- }
+ boolean termination = false;

//
// check if debug level logging should be enabled
@@ -126,6 +116,16 @@
DepotManager manager = store.getDepotManager();
String target = getTargetProfile( args );
Profile profile = getApplicationProfile( manager, target );
+ termination = profile.getCommandPolicy();
+ for( int i=0; i < args.length; i++ )
+ {
+ String arg = args[i];
+ if( arg.equals( "-execute" ) )
+ {
+ termination = true;
+ break;
+ }
+ }
Properties properties = profile.getSystemProperties();
setSystemProperties( properties );
DepotClassLoader system = getSystemClassLoader();
@@ -248,7 +248,7 @@
java.math.BigInteger d = new java.math.BigInteger ( "" + 1000 );
java.math.BigInteger[] result = r.divideAndRemainder( d );
getLogger().info( "startup completed in " + result[0] + "." +
result[1] + " seconds" );
- if( false == server )
+ if( termination )
{
System.exit( 0 );
}

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 20:44:53 2005
@@ -37,11 +37,11 @@

public BootstrapProfile(
Logger logger, Date creation, Home home, String id, String title,
- Properties properties, Connection connection,
+ Properties properties, boolean command, Connection connection,
String classname, String[] classpath )
throws NullPointerException
{
- super( logger, creation, home, id, title, properties, connection );
+ super( logger, creation, home, id, title, properties, command,
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 20:44:53 2005
@@ -153,6 +153,7 @@
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@" );
+ prefs.putBoolean( "command", false );
ProfileStorage store = new ProfileStorage( prefs, logger, creation,
policy );
return store.getProfile();
}
@@ -166,6 +167,7 @@
Preferences prefs = getPreferences().node( "profiles" ).node( id );
prefs.put( "plugin", "@STATION-PLUGIN-URI@" );
prefs.put( "title", "Depot Station" );
+ prefs.putBoolean( "command", false );
prefs.node( "connection" );
ProfileStorage store = new ProfileStorage( prefs, logger, creation,
policy );
return store.getProfile();
@@ -180,6 +182,7 @@
Preferences prefs = getPreferences().node( "profiles" ).node( id );
prefs.put( "plugin", "@TEST-PLUGIN-URI@" );
prefs.put( "title", "Depot Station Test" );
+ prefs.putBoolean( "command", true );
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 20:44:53 2005
@@ -35,9 +35,9 @@

public PluginProfile(
Logger logger, Date creation, Home home, String id, String title,
- Properties properties, Connection connection, URI uri )
+ Properties properties, boolean command, Connection connection, URI uri
)
{
- super( logger, creation, home, id, title, properties, connection );
+ super( logger, creation, home, id, title, properties, command,
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 20:44:53 2005
@@ -36,10 +36,11 @@
private String m_title;
private Properties m_properties;
private Connection m_connection;
+ private boolean m_command;

public Profile(
Logger logger, Date creation, Home home, String id, String title,
- Properties properties, Connection connection )
+ Properties properties, boolean command, Connection connection )
throws NullPointerException
{
super( logger, creation, home );
@@ -48,6 +49,7 @@
m_title = title;
m_properties = properties;
m_connection = connection;
+ m_command = command;
}

public String getID()
@@ -65,6 +67,16 @@
m_title = title;
}

+ public boolean getCommandPolicy()
+ {
+ return m_command;
+ }
+
+ public void setCommandPolicy( boolean policy )
+ {
+ m_command = policy;
+ }
+
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 20:44:53 2005
@@ -58,12 +58,16 @@
Properties properties = getProperties();
Connection connection = getConnection();
String path = prefs.get( "plugin", null );
+ boolean command = prefs.getBoolean( "command", false );
if( null != path )
{
try
{
URI uri = new URI( path );
- m_profile = new PluginProfile( logger, creation, this, id,
title, properties, connection, uri );
+ m_profile =
+ new PluginProfile(
+ logger, creation, this, id, title, properties, command,
+ connection, uri );
}
catch( URISyntaxException e )
{
@@ -81,7 +85,8 @@
String[] classpath = getClasspath();
m_profile =
new BootstrapProfile(
- logger, creation, this, id, title, properties,
connection, classname, classpath );
+ logger, creation, this, id, title, properties, command,
+ connection, classname, classpath );
}
else
{



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

Archive powered by MHonArc 2.6.24.

Top of Page