org.eclipse.datatools.sqltools.editor.ui.core
Class SQLToolsUIFacade

java.lang.Object
  extended by org.eclipse.datatools.sqltools.editor.ui.core.SQLToolsUIFacade

public class SQLToolsUIFacade
extends java.lang.Object

This should be the central place to query about contributed SQLDevToolsUIConfigurations. Unlike SQLDevToolsConfigRegistry, the default SQLDevToolsUIConfiguration will be used if no registered SQLDevToolsUIConfiguration.

Author:
linsong

Method Summary
static java.util.Collection getAllAvailableDBDefinitionIds()
          Returns all the database definition names which can be used in SQL Dev Tools.
static java.util.Collection getAllAvailableDBDefinitionNames()
           
static SQLDevToolsUIConfiguration getConfiguration(org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier, org.eclipse.datatools.sqltools.core.DatabaseVendorDefinitionId vendorId)
          Gets the SQLDevToolsUIConfiguration object.
static SQLDevToolsUIConfiguration getConfiguration(java.lang.String dbType, org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier)
           
static SQLDevToolsUIConfiguration getConfigurationByDBDefName(java.lang.String dbDefName)
          Gets the SQLDevToolsUIConfiguration object by the database definition name.
static SQLDevToolsUIConfiguration getConfigurationByProfileName(java.lang.String profileName)
          Gets the SQLDevToolsUIConfiguration object by the connection profile name.
static SQLDevToolsUIConfiguration getConfigurationByVendorIdentifier(org.eclipse.datatools.sqltools.core.DatabaseVendorDefinitionId vendorId)
          Gets the SQLDevToolsUIConfiguration object by the DatabaseVendorDefinitionId object
static java.util.Collection getConfigurations()
          Gets all the contributed database factories
static java.util.Collection getConnectibleDBDefinitionNames()
          Returns the registered database definition names which are declared as connectible.
static SQLDevToolsUIConfiguration getDefaultConfiguration()
          Gets the default SQLDevToolsUIConfiguration object, which is contributed via the "isDefault" attribute of the "dbConfiguration" extension point, or if there's no such contribution, will use SQLDevToolsUIConfiguration.getDefaultInstance().
static org.eclipse.datatools.sqltools.core.DatabaseVendorDefinitionId getDefaultDatabaseVendorDefinitionId()
          Returns the DatabaseVendorDefinitionId which contributes to the sql dev tools framework as a default configuration.
static SQLToolsUIFacade getInstance()
          Singleton
static java.util.Collection getPlanOptions()
          Return all the available plan options
static IPlanService getPlanService(org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier)
          Returns a database-specific query plan service class.
static GenericSQLContextType getSQLContextType(java.lang.String dbType)
          Return a specific GenericSQLContextType object which identifies the context type of templates used in SQL editor.
static java.util.Collection getSQLContextTypes()
          Return all the GenericSQLContextType objects which identify the context type of templates used in SQL editor.
static org.eclipse.datatools.sqltools.core.services.SQLEditorUIService getSQLEditorService(org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier, java.lang.String dbType)
          Returns a database-specific SQL statement service class.
static org.eclipse.datatools.sqltools.core.services.SQLUIService getSQLUIService(org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier, java.lang.String dbType)
          Returns a database-specific SQL statement UI service class.
static java.util.Collection getSupportedDBDefinitionNames()
          Returns the database definition names which has associated SQLDevToolsUIConfigurations.
static boolean showAction(java.lang.String dbType, java.lang.String actionId)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SQLToolsUIFacade getInstance()
Singleton

Returns:

getConfigurations

public static java.util.Collection getConfigurations()
Gets all the contributed database factories

Returns:

getSupportedDBDefinitionNames

public static java.util.Collection getSupportedDBDefinitionNames()
Returns the database definition names which has associated SQLDevToolsUIConfigurations.

Returns:
Full database definition names including product name and version

getConnectibleDBDefinitionNames

public static java.util.Collection getConnectibleDBDefinitionNames()
Returns the registered database definition names which are declared as connectible.

Returns:
Full database definition names including product name and version

getAllAvailableDBDefinitionIds

public static java.util.Collection getAllAvailableDBDefinitionIds()
Returns all the database definition names which can be used in SQL Dev Tools. This includes the combination of getSupportedDBDefinitionNames() and getConnectibleDBDefinitionNames().

Returns:
Full database definition names including product name and version

getAllAvailableDBDefinitionNames

public static java.util.Collection getAllAvailableDBDefinitionNames()

getConfigurationByDBDefName

public static SQLDevToolsUIConfiguration getConfigurationByDBDefName(java.lang.String dbDefName)
Gets the SQLDevToolsUIConfiguration object by the database definition name.

Parameters:
dbDefName - database definition name, which is product name appended by "_" and version.
Returns:
SQLDevToolsUIConfiguration object

getConfigurationByVendorIdentifier

public static SQLDevToolsUIConfiguration getConfigurationByVendorIdentifier(org.eclipse.datatools.sqltools.core.DatabaseVendorDefinitionId vendorId)
Gets the SQLDevToolsUIConfiguration object by the DatabaseVendorDefinitionId object

Parameters:
id - DatabaseVendorDefinitionId object represented by product name and version
Returns:
SQLDevToolsUIConfiguration object

getConfigurationByProfileName

public static SQLDevToolsUIConfiguration getConfigurationByProfileName(java.lang.String profileName)
Gets the SQLDevToolsUIConfiguration object by the connection profile name. Since different versions of a database may use the same connection profile provider id, we'll compare the real version of the server with the version string declared for the SQLDevToolsUIConfiguration and finds the most suitable one.

Parameters:
profileName - connection profile name
Returns:
SQLDevToolsUIConfiguration object

getConfiguration

public static SQLDevToolsUIConfiguration getConfiguration(org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier,
                                                          org.eclipse.datatools.sqltools.core.DatabaseVendorDefinitionId vendorId)
Gets the SQLDevToolsUIConfiguration object. This is a utility method for getConfigurationByProfileName(String profileName) and getDBFactoryByDBName(String dbName). It will try to use the first parameter then the second.

Parameters:
databaseIdentifier - DatabaseIdentifier which contains connection profile name, can be null
id - DatabaseVendorDefinitionId object represented by product name and version, can be null
Returns:
SQLDevToolsUIConfiguration object

getDefaultConfiguration

public static SQLDevToolsUIConfiguration getDefaultConfiguration()
Gets the default SQLDevToolsUIConfiguration object, which is contributed via the "isDefault" attribute of the "dbConfiguration" extension point, or if there's no such contribution, will use SQLDevToolsUIConfiguration.getDefaultInstance().

Returns:
default SQLDevToolsUIConfiguration object. Will never be null.

getDefaultDatabaseVendorDefinitionId

public static org.eclipse.datatools.sqltools.core.DatabaseVendorDefinitionId getDefaultDatabaseVendorDefinitionId()
Returns the DatabaseVendorDefinitionId which contributes to the sql dev tools framework as a default configuration.

Returns:

getSQLEditorService

public static org.eclipse.datatools.sqltools.core.services.SQLEditorUIService getSQLEditorService(org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier,
                                                                                                  java.lang.String dbType)
Returns a database-specific SQL statement service class.


getConfiguration

public static SQLDevToolsUIConfiguration getConfiguration(java.lang.String dbType,
                                                          org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier)

getPlanService

public static IPlanService getPlanService(org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier)
Returns a database-specific query plan service class.


getPlanOptions

public static java.util.Collection getPlanOptions()
Return all the available plan options

Returns:

getSQLContextType

public static GenericSQLContextType getSQLContextType(java.lang.String dbType)
Return a specific GenericSQLContextType object which identifies the context type of templates used in SQL editor.

Parameters:
dbType -
Returns:

getSQLUIService

public static org.eclipse.datatools.sqltools.core.services.SQLUIService getSQLUIService(org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier,
                                                                                        java.lang.String dbType)
Returns a database-specific SQL statement UI service class.

Parameters:
profileName -
dbType -
Returns:

getSQLContextTypes

public static java.util.Collection getSQLContextTypes()
Return all the GenericSQLContextType objects which identify the context type of templates used in SQL editor.

Returns:

showAction

public static boolean showAction(java.lang.String dbType,
                                 java.lang.String actionId)