org.eclipse.datatools.connectivity.oda.util.manifest
Class ManifestExplorer

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.oda.util.manifest.ManifestExplorer

public class ManifestExplorer
extends java.lang.Object

The Manifest Explorer is the entry point to explore and access the manifest of all the ODA plug-ins extensions that implement the org.eclipse.datatools.connectivity.oda.dataSource extension point. The ManifestExplorer singleton instance can be retrieved using the getInstance() method.


Method Summary
 java.util.Properties getDataSourceIdentifiers()
          Returns a collection of identifiers of all ODA data source extensions.
 ExtensionManifest getExtensionManifest(java.lang.String dataSourceId)
          Returns the extension configuration information found in the plugin manifest file of the data source extension that contains the specified data source element and implements the DTP ODA run-time extension point - org.eclipse.datatools.connectivity.oda.dataSource.
 ExtensionManifest getExtensionManifest(java.lang.String dataSourceId, java.lang.String extensionPoint)
          Returns the extension configuration information found in the plugin manifest file of the data source extension that contains the specified data source element and implements the specified ODA extension point.
 ExtensionManifest[] getExtensionManifests()
          Returns an array of ODA extension configuration information found in the plugin manifest file.
 ExtensionManifest[] getExtensionManifests(java.lang.String extensionPoint)
           
static IExtension[] getExtensions(java.lang.String extPoint)
           
static ManifestExplorer getInstance()
          Gets the ManifestExplorer instance to explore the manifest of the data source extensions.
static java.lang.String getLocalizedMessage(int errorNumber)
           
static java.lang.String getLocalizedMessage(int errorNumber, java.lang.Object[] arguments)
           
static IConfigurationElement getNamedElement(IExtension extension, java.lang.String elementName)
          Returns the configuration element of the given extension and element name.
static IConfigurationElement[] getNamedElements(IExtension extension, java.lang.String elementName)
          Returns a collection of configuration elements with the given name in the given extension.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ManifestExplorer getInstance()
Gets the ManifestExplorer instance to explore the manifest of the data source extensions.

Returns:
the ManifestExplorer instance.

getDataSourceIdentifiers

public java.util.Properties getDataSourceIdentifiers()
Returns a collection of identifiers of all ODA data source extensions. The extension's data source element ID and display name are stored as the key and value in the returned Properties instance. Returns an empty Properties if there are no data source extensions found.

Returns:
a Properties containing the id and display name of all data source extensions.

getExtensionManifest

public ExtensionManifest getExtensionManifest(java.lang.String dataSourceId)
                                       throws OdaException
Returns the extension configuration information found in the plugin manifest file of the data source extension that contains the specified data source element and implements the DTP ODA run-time extension point - org.eclipse.datatools.connectivity.oda.dataSource.

Parameters:
dataSourceId - the unique id of the data source element in a data source extension.
Returns:
the extension manifest information
Throws:
OdaException - if the extension manifest is invalid.
java.lang.IllegalArgumentException - if no extension is found.

getExtensionManifest

public ExtensionManifest getExtensionManifest(java.lang.String dataSourceId,
                                              java.lang.String extensionPoint)
                                       throws OdaException
Returns the extension configuration information found in the plugin manifest file of the data source extension that contains the specified data source element and implements the specified ODA extension point.

Parameters:
dataSourceId - the unique id of the data source element in a data source extension.
extensionPoint - the id of the extension point to search
Returns:
the extension manifest information, or null if no extension configuration is found.
Throws:
OdaException - if the extension manifest is invalid.

getExtensionManifests

public ExtensionManifest[] getExtensionManifests()
Returns an array of ODA extension configuration information found in the plugin manifest file. Returns an empty array if there are no data source extensions found. Invalid data source extension definitions are ignored.

Returns:
an ExtensionManifest array containing the definition of all valid ODA data source extensions.

getExtensionManifests

public ExtensionManifest[] getExtensionManifests(java.lang.String extensionPoint)

getExtensions

public static IExtension[] getExtensions(java.lang.String extPoint)

getNamedElement

public static IConfigurationElement getNamedElement(IExtension extension,
                                                    java.lang.String elementName)
                                             throws OdaException
Returns the configuration element of the given extension and element name.
For internal use only.

Throws:
OdaException

getNamedElements

public static IConfigurationElement[] getNamedElements(IExtension extension,
                                                       java.lang.String elementName)
                                                throws OdaException
Returns a collection of configuration elements with the given name in the given extension. Validates that each element has an id attribute defined.

Returns:
a collection of matching configuration elements
For internal use only.
Throws:
OdaException

getLocalizedMessage

public static java.lang.String getLocalizedMessage(int errorNumber)

getLocalizedMessage

public static java.lang.String getLocalizedMessage(int errorNumber,
                                                   java.lang.Object[] arguments)


Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.