livespace.osgi.bootstrap
Class DeployConfig
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
startlevel
public int startlevel
startlevelLoggedIn
public int startlevelLoggedIn
startlevelLoggedOff
public int startlevelLoggedOff
defines
public Properties defines
DeployConfig
public DeployConfig()
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:
- default_config: The URL for the default config set.
- current_config: The URL for the current config set.
- current_config_name: The logical name for the current config
set. This is currently deduced from the last element of the
current config path.
- platform: win32, mac, solaris, linux, etc.
- swt_platform: win32, carbon, gtk, motif, etc.
- os.name: same as Java property with same name.
- os.arch: same as Java property with same name.
- 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