Package org.eclipse.birt.core.framework

# Class Platform

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

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

## Field Summary

Fields
Modifier and Type
Field
Description
`static int`
`ECLIPSE_PLATFORM`
`static int`
`JAVA_PLATFORM`
`protected static PlatformLauncher`
`launcher`
`protected static Logger`
`log`
`protected static IPlatform`
`platform`
`protected static int`
`platformType`
`static final String`
`PROPERTY_BIRT_HOME`
`static final String`
`PROPERTY_RUN_UNDER_ECLIPSE`
Deprecated.
since BIRT 2.1
`static final int`
`SERVER_PLATFORM`
Deprecated.
since BIRT 2.1
`static int`
`UNKNOWN_PLATFORM`

## Constructor Summary

Constructors
Constructor
Description
`Platform()`

## Method Summary

Modifier and Type
Method
Description
`static URL`
`asLocalURL(URL url)`
Deprecated.
since BIRT 2.1
`static Object`
`createFactoryObject(String extensionId)`
create an object inside the OSGIframework and give it out of the framework.
`protected static PlatformLauncher`
`createPlatformLauncher(PlatformConfig config)`
`static Object`
`enterPlatformContext()`
`static void`
`exitPlatformContext(Object context)`
`static URL`
`find(IBundle bundle, IPlatformPath path)`
Deprecated.
since BIRT 2.1
`static org.eclipse.core.runtime.IAdapterManager`
`getAdapterManager()`
`static IBundle`
`getBundle(String symbolicName)`
Deprecated.
since BIRT 2.1
`static String`
`getDebugOption(String name)`
Deprecated.
since BIRT 2.1
`static URL`
`getEntry(String symbolicName, String resource)`
`static IExtensionRegistry`
`getExtensionRegistry()`
`static String`
`getOS()`
`static int`
`getPlatformType()`
Deprecated.
since BIRT 2.1
`static String`
`getStateLocation(String symbolicName)`
`static void`
`initialize(PlatformConfig config)`
Deprecated.
since BIRT 2.1
`static void`
`intializeTracing(String pluginName)`
`static boolean`
`runningEclipse()`
Deprecated.
since BIRT 2.1
`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()`
`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 Details

### PROPERTY_RUN_UNDER_ECLIPSE

@Deprecated public static final String PROPERTY_RUN_UNDER_ECLIPSE
Deprecated.
since BIRT 2.1

See Also:
  - Constant Field Values

### PROPERTY_BIRT_HOME

public static final 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

@Deprecated public static final int SERVER_PLATFORM
Deprecated.
since BIRT 2.1

See Also:
  - Constant Field Values

### JAVA_PLATFORM

public static int JAVA_PLATFORM

### platformType

protected static int platformType

### platform

protected static IPlatform platform

### launcher

protected static PlatformLauncher launcher

### log

protected static Logger log

## Constructor Details

### Platform

public Platform()

## Method Details

### startup

public static void startup() throws BirtException

Throws:
  `BirtException`

### startup

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

Parameters:
  `config` - PlatformConfig
Throws:
  `BirtException`

### createPlatformLauncher

protected static PlatformLauncher createPlatformLauncher(PlatformConfig config)

### shutdown

public static void shutdown()

### initialize

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

Parameters:
  `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:
  - invalid reference

        org.eclipes.birt.core.plugin.CorePlugin#start(BundleContext)

### getExtensionRegistry

public static IExtensionRegistry getExtensionRegistry()

Returns:
  an extension registry
See Also:
  - `IExtensionRegistry`

### getAdapterManager

public static org.eclipse.core.runtime.IAdapterManager getAdapterManager()

### getBundle

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

Parameters:
  `symbolicName` -
Returns:

### find

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

Parameters:
  `bundle` -
  `path` -
Returns:

### getPlatformType

@Deprecated public static int getPlatformType()
Deprecated.
since BIRT 2.1

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

### asLocalURL

@Deprecated public static URL asLocalURL(URL url) throws IOException
Deprecated.
since BIRT 2.1

Parameters:
  `url` -
Returns:
Throws:
  `IOException`

### runningEclipse

@Deprecated 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(String pluginName)

### getDebugOption

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

Parameters:
  `name` -
Returns:

### createFactoryObject

public static Object createFactoryObject(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 implement a extension "org.eclipse.birt.core.FactoryService".

Parameters:
  `extensionId` - factory extension id
Returns:
  the service object.

### enterPlatformContext

public static Object enterPlatformContext()

### exitPlatformContext

public static void exitPlatformContext(Object context)

### getOS

public static String getOS()

### getStateLocation

public static String getStateLocation(String symbolicName)

### getEntry

public static URL getEntry(String symbolicName, String resource)