org.eclipse.birt.core.framework
Class Platform

java.lang.Object
  extended by org.eclipse.birt.core.framework.Platform

public class Platform
extends java.lang.Object

Defines a generic Platform class that wraps around an EclipsePlatform or ServerPlatform class. This class is a singleton.


Field Summary
static int ECLIPSE_PLATFORM
           
protected static OSGILauncher launcher
           
protected static java.util.logging.Logger log
           
protected static IPlatform platform
           
protected static int platformType
           
static java.lang.String PROPERTY_BIRT_HOME
           
static java.lang.String PROPERTY_RUN_UNDER_ECLIPSE
          Deprecated. since BIRT 2.1
static int SERVER_PLATFORM
          Deprecated. since BIRT 2.1
static int UNKNOWN_PLATFORM
           
 
Constructor Summary
Platform()
           
 
Method Summary
static java.net.URL asLocalURL(java.net.URL url)
          Deprecated. since BIRT 2.1
static java.lang.Object createFactoryObject(java.lang.String extensionId)
          create an object inside the OSGIframework and give it out of the framework.
static java.net.URL find(IBundle bundle, IPlatformPath path)
          Deprecated. since BIRT 2.1
static IBundle getBundle(java.lang.String symbolicName)
          Deprecated. since BIRT 2.1
static java.lang.ClassLoader getContextClassLoader()
           
static java.lang.String getDebugOption(java.lang.String name)
          Deprecated. since BIRT 2.1
static IExtensionRegistry getExtensionRegistry()
           
static int getPlatformType()
          Deprecated. since BIRT 2.1
static void initialize(PlatformConfig config)
          Deprecated. since BIRT 2.1
static void intializeTracing(java.lang.String pluginName)
           
static boolean runningEclipse()
          Deprecated. since BIRT 2.1
static void setContextClassLoader(java.lang.ClassLoader classLoader)
           
static void setPlatform(IPlatform platform)
          this class can only be called by org.eclipse.birt.core.plugin.CorePlugin#start(BundleContext)
static void shutdown()
           
static void startup(PlatformConfig config)
          startup the platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_RUN_UNDER_ECLIPSE

public static final java.lang.String PROPERTY_RUN_UNDER_ECLIPSE
Deprecated. since BIRT 2.1
See Also:
Constant Field Values

PROPERTY_BIRT_HOME

public static final java.lang.String PROPERTY_BIRT_HOME
See Also:
Constant Field Values

UNKNOWN_PLATFORM

public static int UNKNOWN_PLATFORM

ECLIPSE_PLATFORM

public static int ECLIPSE_PLATFORM

SERVER_PLATFORM

public static final int SERVER_PLATFORM
Deprecated. since BIRT 2.1
See Also:
Constant Field Values

platformType

protected static int platformType

platform

protected static IPlatform platform

log

protected static java.util.logging.Logger log

launcher

protected static OSGILauncher launcher
Constructor Detail

Platform

public Platform()
Method Detail

startup

public static void startup(PlatformConfig config)
                    throws BirtException
startup the platform. The PlatformContext is get from the config.

Parameters:
config - PlatformConfig
Throws:
BirtException

shutdown

public static void shutdown()

initialize

public static void initialize(PlatformConfig config)
Deprecated. since BIRT 2.1

Parameters:
context -
See Also:
org.eclipse.birt.core.Platform.startup(IPlatformContext context)

setPlatform

public static void setPlatform(IPlatform platform)
this class can only be called by org.eclipse.birt.core.plugin.CorePlugin#start(BundleContext)

Parameters:
platform -
See Also:
org.eclipes.birt.core.plugin.CorePlugin#start(BundleContext)

getExtensionRegistry

public static IExtensionRegistry getExtensionRegistry()
Returns:
an extension registry
See Also:
IExtensionRegistry

getBundle

public static IBundle getBundle(java.lang.String symbolicName)
Deprecated. since BIRT 2.1

Parameters:
symbolicName -
Returns:

find

public static java.net.URL find(IBundle bundle,
                                IPlatformPath path)
Deprecated. since BIRT 2.1

Parameters:
bundle -
path -
Returns:

getPlatformType

public static int getPlatformType()
Deprecated. since BIRT 2.1

Returns:
the type of the platform. Available values are ECLIPSE_PLATFORM and SERVER_PLATFORM.

asLocalURL

public static java.net.URL asLocalURL(java.net.URL url)
                               throws java.io.IOException
Deprecated. since BIRT 2.1

Parameters:
url -
Returns:
Throws:
java.io.IOException

runningEclipse

public static boolean runningEclipse()
Deprecated. since BIRT 2.1

Checks whether Eclipse is running

Returns:
whether we are running in Eclipse

intializeTracing

public static void intializeTracing(java.lang.String pluginName)

getDebugOption

public static java.lang.String getDebugOption(java.lang.String name)
Deprecated. since BIRT 2.1

Parameters:
name -
Returns:
See Also:
org.eclipse.core.runtime.Platform.getDebugOption(String name)

createFactoryObject

public static java.lang.Object createFactoryObject(java.lang.String extensionId)
create an object inside the OSGIframework and give it out of the framework. This object can be used in client side. If a bundle need export some function outside of the framework, it need implmenet a extension "org.eclipse.birt.core.FactoryService".

Parameters:
extensionId - factory extension id
Returns:
the service object.
See Also:
org.eclipse.birt.core.IPlatform#

setContextClassLoader

public static void setContextClassLoader(java.lang.ClassLoader classLoader)

getContextClassLoader

public static java.lang.ClassLoader getContextClassLoader()


Copyright © 2008 Actuate Corp. All rights reserved.