org.eclipse.birt.chart.util
Class PluginSettings

java.lang.Object
  extended byorg.eclipse.birt.chart.util.PluginSettings

public final class PluginSettings
extends java.lang.Object

Provides a framework for locating extension implementations either via the BIRT plugin.xml paradigm or via extensions that are explicitly specified in this singleton instance. If the BIRT extension paradigm is to be used, ensure that the BIRT_HOME 'JVM system variable' points to a valid folder containing all chart extensions within a plugins/ subfolder. If the BIRT extension paradigm is not to be used and the default classloader is requested for loading extensions, ensure that the BIRT_HOME 'JVM system variable' is undefined.


Method Summary
 IAggregateFunction getAggregateFunction(java.lang.String sName)
          Retrieves the first instance of a device renderer registered as an extension for a given name
 IDataPointDefinition getDataPointDefinition(java.lang.Class cSeries)
          Retrieves the first instance of a series renderer registered as an extension for a given series type.
 IDataSetProcessor getDataSetProcessor(java.lang.Class cSeries)
          Retrieves the first instance of a data set processor registered as an extension for a given series type.
 IDeviceRenderer getDevice(java.lang.String sName)
          Retrieves the first instance of a device renderer registered as an extension for a given name
 IDisplayServer getDisplayServer(java.lang.String sName)
          Retrieves the first instance of a display server registered as an extension for a given name
 java.lang.String[] getRegisteredAggregateFunctionDisplayNames()
          Returns a list of all aggregate function display names registered via extension point implementations (or simulated)
 java.lang.String[] getRegisteredAggregateFunctions()
          Returns a list of all aggregate function names registered via extension point implementations (or simulated)
 java.lang.String[][] getRegisteredOutputFormats()
          Returns a list of registered device renderer output formats and descriptions.
 java.lang.String[] getRegisteredSeries()
          Returns a list of all series registered via extension point implementations (or simulated)
 BaseRenderer getRenderer(java.lang.Class cSeries)
          Retrieves the first instance of a series renderer registered as an extension for a given series type.
 java.lang.String getSeriesDisplayName(java.lang.String seriesClassName)
          Returns the localized display name of given Series Class.
static PluginSettings instance()
          Returns a singleton instance of the plugin settings framework which uses the default configuration.
static PluginSettings instance(PlatformConfig config)
          Returns a singleton instance of the plugin settings framework with specific configuration.
 void registerAggregateFunction(java.lang.String sName, java.lang.String sAggregateFunctionClass)
          Registers an aggregate function implementation, the class should implement the IAggregateFunction interface.
 void registerAggregateFunction(java.lang.String sName, java.lang.String sDisplayName, java.lang.String sAggregateFunctionClass)
          Registers an aggregate function implementation, the class should implement the IAggregateFunction interface.
 void registerDevice(java.lang.String sName, java.lang.String sDeviceClass)
          Registers a device renderer implementation, this class should implement the IDeviceRenderer interface.
 void registerDisplayServer(java.lang.String sName, java.lang.String sServerClass)
          Registers a display server implementation, this class should implement the IDisplayServer interface.
 void registerOutputFormat(java.lang.String sDeviceName, java.lang.String sFormat, java.lang.String sDescription)
          Registers an output format for given device renderer name.
 void registerSeriesRenderer(java.lang.String sSeriesClass, java.lang.String sDataSetProcessorClass, java.lang.String sRendererClass)
          Registers a new Series renderer implementation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static PluginSettings instance()
Returns a singleton instance of the plugin settings framework which uses the default configuration.

Returns:
A singleton instance of the plugin settings framework

instance

public static PluginSettings instance(PlatformConfig config)
Returns a singleton instance of the plugin settings framework with specific configuration. Initializes the OSGi Platform framework to load chart extension bundles unless the STANDALONE flag was set in PlatformConfig property.

Returns:
A singleton instance of the plugin settings framework

getDataSetProcessor

public final IDataSetProcessor getDataSetProcessor(java.lang.Class cSeries)
                                            throws ChartException
Retrieves the first instance of a data set processor registered as an extension for a given series type.

Parameters:
cSeries - The Class instance associated with the given series type
Returns:
A newly created instance of a registered data set processor extension
Throws:
PluginException
ChartException

getRenderer

public final BaseRenderer getRenderer(java.lang.Class cSeries)
                               throws ChartException
Retrieves the first instance of a series renderer registered as an extension for a given series type.

Parameters:
cSeries - The Class instance associated with the given series type
Returns:
A newly created (and initialized) instance of a registered series renderer
Throws:
PluginException
ChartException

getDevice

public final IDeviceRenderer getDevice(java.lang.String sName)
                                throws ChartException
Retrieves the first instance of a device renderer registered as an extension for a given name

Parameters:
sName - The name of the device renderer. Values registered in the default distribution are dv.SWT, dv.SWING, dv.PNG, dv.JPEG, dv.BMP
Returns:
An newly initialized instance of the requested device renderer
Throws:
PluginException
ChartException

getDisplayServer

public final IDisplayServer getDisplayServer(java.lang.String sName)
                                      throws ChartException
Retrieves the first instance of a display server registered as an extension for a given name

Parameters:
sName - The name of the display server. Values registered in the default distribution are ds.SWT, ds.SWING
Returns:
An newly initialized instance of the requested display server
Throws:
PluginException
ChartException

getAggregateFunction

public final IAggregateFunction getAggregateFunction(java.lang.String sName)
                                              throws ChartException
Retrieves the first instance of a device renderer registered as an extension for a given name

Parameters:
sName - The name of the aggregate function.
Returns:
An newly initialized instance of the requested aggregate function.
Throws:
PluginException
ChartException

getDataPointDefinition

public final IDataPointDefinition getDataPointDefinition(java.lang.Class cSeries)
                                                  throws ChartException
Retrieves the first instance of a series renderer registered as an extension for a given series type.

Parameters:
cSeries - The Class instance associated with the given series type
Returns:
A newly created (and initialized) instance of a registered series renderer
Throws:
PluginException
ChartException

getSeriesDisplayName

public final java.lang.String getSeriesDisplayName(java.lang.String seriesClassName)
Returns the localized display name of given Series Class.

Parameters:
seriesClassName -
Returns:

getRegisteredSeries

public final java.lang.String[] getRegisteredSeries()
                                             throws ChartException
Returns a list of all series registered via extension point implementations (or simulated)

Returns:
A list of series registered via extension point implementations (or simulated)
Throws:
ChartException

getRegisteredOutputFormats

public final java.lang.String[][] getRegisteredOutputFormats()
                                                      throws ChartException
Returns a list of registered device renderer output formats and descriptions.

Returns:
Throws:
ChartException

getRegisteredAggregateFunctions

public final java.lang.String[] getRegisteredAggregateFunctions()
                                                         throws ChartException
Returns a list of all aggregate function names registered via extension point implementations (or simulated)

Returns:
A list of all aggregate function names registered via extension point implementations (or simulated)
Throws:
ChartException

getRegisteredAggregateFunctionDisplayNames

public final java.lang.String[] getRegisteredAggregateFunctionDisplayNames()
                                                                    throws ChartException
Returns a list of all aggregate function display names registered via extension point implementations (or simulated)

Returns:
A list of all aggregate function display names registered via extension point implementations (or simulated)
Throws:
ChartException

registerAggregateFunction

public final void registerAggregateFunction(java.lang.String sName,
                                            java.lang.String sAggregateFunctionClass)
Registers an aggregate function implementation, the class should implement the IAggregateFunction interface. The displayName will be the same as the name.

Parameters:
sName -
sAggregateFunctionClass - the full qualified class name of the implementor.
See Also:
IAggregateFunction

registerAggregateFunction

public final void registerAggregateFunction(java.lang.String sName,
                                            java.lang.String sDisplayName,
                                            java.lang.String sAggregateFunctionClass)
Registers an aggregate function implementation, the class should implement the IAggregateFunction interface.

Parameters:
sName -
sDisplayName -
sAggregateFunctionClass - the full qualified class name of the implementor.
See Also:
IAggregateFunction

registerDevice

public final void registerDevice(java.lang.String sName,
                                 java.lang.String sDeviceClass)
Registers a device renderer implementation, this class should implement the IDeviceRenderer interface.

Parameters:
sName -
sDeviceClass - the full qualified class name of the implementor.
See Also:
IDeviceRenderer

registerOutputFormat

public final void registerOutputFormat(java.lang.String sDeviceName,
                                       java.lang.String sFormat,
                                       java.lang.String sDescription)
Registers an output format for given device renderer name.

Parameters:
sDeviceName -
sFormat -
sDescription -

registerDisplayServer

public final void registerDisplayServer(java.lang.String sName,
                                        java.lang.String sServerClass)
Registers a display server implementation, this class should implement the IDisplayServer interface.

Parameters:
sName -
sServerClass - the full qualified class name of the implementor.
See Also:
IDisplayServer

registerSeriesRenderer

public final void registerSeriesRenderer(java.lang.String sSeriesClass,
                                         java.lang.String sDataSetProcessorClass,
                                         java.lang.String sRendererClass)
Registers a new Series renderer implementation.

Parameters:
sSeriesClass - the full qualified class name of which implements the Series interface.
sDataSetProcessorClass - the full qualified class name of which implements the IDataSetProcessor interface.
sRendererClass - the full qualified class name of which implements the ISeriesRenderer interface.
See Also:
ISeriesRenderer


Copyright © 2005-2007 Actuate Corp. All rights reserved.