livespace.osgi.bootstrap
Class DeployConfig

java.lang.Object
  extended by livespace.osgi.bootstrap.DeployConfig

public class DeployConfig
extends Object

Reads the deploy/*.deploy files for a given host and assembles a service start list. Use startServices(BundleContext, String) to start things rolling.

Author:
Matthew Phillips

Field Summary
 Properties defines
           
 int startlevel
           
 int startlevelLoggedIn
           
 int startlevelLoggedOff
           
 
Constructor Summary
DeployConfig()
           
 
Method Summary
 int bundleCount()
           
static void defineStandardProperties(Map<String,String> symbols)
          Define the standard global variables that should be available in all service config and deploy config files.
static void defineStandardProperties(Properties symbols)
           
static String platform()
           
 void read(URL defaultPath, URL currentPath, String configFile, int startlevelOverride)
           
 void startServices(org.osgi.framework.BundleContext context, String defaultBundleVersion)
          Start the services configured in this deploy config.
static String swtPlatform(String os)
          Get the SWT platform name.
 String toDebugString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startlevel

public int startlevel

startlevelLoggedIn

public int startlevelLoggedIn

startlevelLoggedOff

public int startlevelLoggedOff

defines

public Properties defines
Constructor Detail

DeployConfig

public DeployConfig()
Method Detail

bundleCount

public int bundleCount()

read

public void read(URL defaultPath,
                 URL currentPath,
                 String configFile,
                 int startlevelOverride)
          throws IOException
Throws:
IOException

startServices

public void startServices(org.osgi.framework.BundleContext context,
                          String defaultBundleVersion)
                   throws IOException,
                          org.osgi.framework.BundleException
Start the services configured in this deploy config.

Parameters:
context - An OSGi bundle context.
defaultBundleVersion - The default version string to append to bundles that do not have one.
Throws:
IOException
org.osgi.framework.BundleException

toDebugString

public String toDebugString()

defineStandardProperties

public static void defineStandardProperties(Map<String,String> symbols)
Define the standard global variables that should be available in all service config and deploy config files. These include:

Parameters:
symbols - The symbol map to add symbols to.

defineStandardProperties

public static void defineStandardProperties(Properties symbols)

platform

public static String platform()

swtPlatform

public static String swtPlatform(String os)
Get the SWT platform name. This may be different from the OS name due to SWT using the toolkit as part of the platform.

Parameters:
os - The OS name (should be ${platform}). See also ticket #95.


Copyright © 2008 Commonwealth of Australia