org.eclipse.datatools.connectivity.oda.design.ui.designsession
Class DesignSessionUtil

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.oda.design.ui.designsession.DesignSessionUtil

public class DesignSessionUtil
extends java.lang.Object

An utility class to help an ODA host designer or an ODA driver's customized designer to manipulate ODA Design API objects during an ODA design session.


Method Summary
static Properties createDataSourceNonPublicProperties(java.lang.String odaDataSourceId, java.util.Properties utilProps)
          Creates an ODA design property collection for those given properties that are not defined in an ODA runtime extension manifest.
static Properties createDataSourcePublicProperties(java.lang.String odaDataSourceId, java.util.Properties utilProps)
          Creates an ODA design property collection for the public properties defined in an ODA runtime extension manifest.
static IConnectionProfile getLinkedProfile(DataSourceDesign dataSourceDesign)
          Returns the connection profile instance externally referenced, i.e.
static java.util.Map getProfileIdentifiers(java.lang.String odaDataSourceId, java.io.File storageFile)
          Returns a collection of identifiers of all connection profile instances for the given ODA data source extension type.
static boolean hasValidOdaDesignUIExtension(java.lang.String odaDataSourceId)
          Indicates whether the given ODA data source type has implemented a valid org.eclipse.datatools.connectivity.oda.design.ui.dataSource extension point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createDataSourcePublicProperties

public static Properties createDataSourcePublicProperties(java.lang.String odaDataSourceId,
                                                          java.util.Properties utilProps)
                                                   throws OdaException
Creates an ODA design property collection for the public properties defined in an ODA runtime extension manifest. Their corresponding values are collected from the given profile property collection.

Parameters:
odaDataSourceId - the ODA extension data source element ID
utilProps - java.util.properties, such as those collected from a connection profile
Returns:
ODA design public property collection for inclusion in an OdaDesignSession's Data Source Design
Throws:
OdaException

createDataSourceNonPublicProperties

public static Properties createDataSourceNonPublicProperties(java.lang.String odaDataSourceId,
                                                             java.util.Properties utilProps)
                                                      throws OdaException
Creates an ODA design property collection for those given properties that are not defined in an ODA runtime extension manifest. These are properties that are not publicly defined. Their corresponding values are collected from the given profile property collection.

Parameters:
odaDataSourceId - the ODA extension data source element ID
utilProps - a java.util.Properties collection, such as those collected from a connection profile
Returns:
ODA design non-public property collection for inclusion in an OdaDesignSession's Data Source Design
Throws:
OdaException

getLinkedProfile

public static IConnectionProfile getLinkedProfile(DataSourceDesign dataSourceDesign)
                                           throws OdaException
Returns the connection profile instance externally referenced, i.e. linked, by the given data source design.

Parameters:
dataSourceDesign -
Returns:
linked connection profile instance, or null if no external profile is referenced
Throws:
OdaException - if referenced connection profile is not found

hasValidOdaDesignUIExtension

public static boolean hasValidOdaDesignUIExtension(java.lang.String odaDataSourceId)
Indicates whether the given ODA data source type has implemented a valid org.eclipse.datatools.connectivity.oda.design.ui.dataSource extension point.

Parameters:
odaDataSourceId - an ODA data source extension type's element id
Returns:

getProfileIdentifiers

public static java.util.Map getProfileIdentifiers(java.lang.String odaDataSourceId,
                                                  java.io.File storageFile)
                                           throws OdaException
Returns a collection of identifiers of all connection profile instances for the given ODA data source extension type. The profile instances are searched in the given profile storage file. It also caches the matching profiles for subsequent use.

Parameters:
odaDataSourceId - an ODA data source extension type's element id
storageFile - a file that stores profile instances; may be null, which means to use the default DTP profiles storage file
Returns:
a Map containing the instance Id and display name of all existing profiles of the given odaDataSourceId. The connection profiles' instance Id and display name are stored as the key and value strings in the returned Map instance. Returns an empty collection if there are no matching connection profiles found in given storageFile.
Throws:
OdaException - if error in reading from given storageFile, or in processing the found profiles


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