Package org.eclipse.birt.core.framework
Class Platform
- java.lang.Object
-
- org.eclipse.birt.core.framework.Platform
-
public class Platform extends java.lang.ObjectDefines a generic Platform class that wraps around anEclipsePlatformorServerPlatformclass. This class is a singleton.
-
-
Field Summary
Fields Modifier and Type Field Description static intECLIPSE_PLATFORMstatic intJAVA_PLATFORMprotected static PlatformLauncherlauncherprotected static java.util.logging.Loggerlogprotected static IPlatformplatformprotected static intplatformTypestatic java.lang.StringPROPERTY_BIRT_HOMEstatic java.lang.StringPROPERTY_RUN_UNDER_ECLIPSEDeprecated.since BIRT 2.1static intSERVER_PLATFORMDeprecated.since BIRT 2.1static intUNKNOWN_PLATFORM
-
Constructor Summary
Constructors Constructor Description Platform()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.net.URLasLocalURL(java.net.URL url)Deprecated.since BIRT 2.1static java.lang.ObjectcreateFactoryObject(java.lang.String extensionId)create an object inside the OSGIframework and give it out of the framework.protected static PlatformLaunchercreatePlatformLauncher(PlatformConfig config)static java.lang.ObjectenterPlatformContext()static voidexitPlatformContext(java.lang.Object context)static java.net.URLfind(IBundle bundle, IPlatformPath path)Deprecated.since BIRT 2.1static org.eclipse.core.runtime.IAdapterManagergetAdapterManager()static IBundlegetBundle(java.lang.String symbolicName)Deprecated.since BIRT 2.1static java.lang.StringgetDebugOption(java.lang.String name)Deprecated.since BIRT 2.1static java.net.URLgetEntry(java.lang.String symbolicName, java.lang.String resource)static IExtensionRegistrygetExtensionRegistry()static java.lang.StringgetOS()static intgetPlatformType()Deprecated.since BIRT 2.1static java.lang.StringgetStateLocation(java.lang.String symbolicName)static voidinitialize(PlatformConfig config)Deprecated.since BIRT 2.1static voidintializeTracing(java.lang.String pluginName)static booleanrunningEclipse()Deprecated.since BIRT 2.1static voidsetPlatform(IPlatform platform)this class can only be called by org.eclipse.birt.core.plugin.CorePlugin#start(BundleContext)static voidshutdown()static voidstartup()static voidstartup(PlatformConfig config)startup the platform.
-
-
-
Field Detail
-
PROPERTY_RUN_UNDER_ECLIPSE
@Deprecated 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
@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 java.util.logging.Logger log
-
-
Method Detail
-
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:
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(java.lang.String symbolicName)
Deprecated.since BIRT 2.1- Parameters:
symbolicName-- Returns:
-
find
@Deprecated public static java.net.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 java.net.URL asLocalURL(java.net.URL url) throws java.io.IOExceptionDeprecated.since BIRT 2.1- Parameters:
url-- Returns:
- Throws:
java.io.IOException
-
runningEclipse
@Deprecated public static boolean runningEclipse()
Deprecated.since BIRT 2.1Checks whether Eclipse is running- Returns:
- whether we are running in Eclipse
-
intializeTracing
public static void intializeTracing(java.lang.String pluginName)
-
getDebugOption
@Deprecated public static java.lang.String getDebugOption(java.lang.String name)
Deprecated.since BIRT 2.1- Parameters:
name-- Returns:
-
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 implement a extension "org.eclipse.birt.core.FactoryService".- Parameters:
extensionId- factory extension id- Returns:
- the service object.
-
enterPlatformContext
public static java.lang.Object enterPlatformContext()
-
exitPlatformContext
public static void exitPlatformContext(java.lang.Object context)
-
getOS
public static java.lang.String getOS()
-
getStateLocation
public static java.lang.String getStateLocation(java.lang.String symbolicName)
-
getEntry
public static java.net.URL getEntry(java.lang.String symbolicName, java.lang.String resource)
-
-