#
Connection Profile

###### Identifier:

org.eclipse.datatools.connectivity.connectionProfile

###### Since:

DTP v. 0.x

###### Description:

This extension point provides a place for plug-ins to add support for different types of connection profiles. It also allows extensions to extend the capabilities of defined extension points.

Connection profiles are defined using the `connectionProfile` element. A connection profile will belong to a single category and a single configuration type. Categories are used for grouping like types of connection profiles (e.g. queue, database, etc.). Configuration types are used for specifying the type of configuration information provided by the profile (e.g. New Era Open Transport, JDBC, etc.).

The provider must define a corresponding `newWizard` element for creating the resource.

The provider must define a corresponding `org.eclipse.ui.propertyPages` for editing the connection profile's properties. The provider should ensure a `filter` element is defined to verify the selected connection profile's provider ID matches the `id` specified for the `connectionProfile` (this is accomplished using the `org.eclipse.datatools.profile.property.id` property). `org.eclipse.datatools.connectivity.ui.wizards.ProfileDetailsPropertyPage` is a base property page implementation intended to be extended by connection profile providers for this purpose.

Connection factories supporting a given profile may be registered using the `connectionFactory` element. Connection factories allow plug-ins to create a connection to a server from a connection profile. A connection profile provider should provide a connection factory extension. Ideally, a connection factory's ID should correspond with the type of object created when connected (e.g. `java.sql.Connection`). A connection profile provider should implement a `connectionFactory` with an ID of `org.eclipse.datatools.connectivity.connectionFactory.pingFactory` to enable the ping functionality provided in the base implementations and framework.

Connection profiles may be extended by other plug-ins by defining the following extension elements:

- `connectionFactory -`
This element enables a plug-in to provide connection creation support for the specified connection profile.
- `profileExtension -`
This element enables a plug-in to provide additional configuration properties for the specified connection profile. If you are extending a connection profile in this manner and these properties need to be specified when connecting to the server defined by the connection profile, you will need to provide a connection factory extension that makes use of the additional properties.

Tooling providers can choose to integrate with connection profiles using a variety of mechanisms. Tooling can be keyed to a specific profile type (by checking the profile's ID attribute; e.g. the mechanism used for contributing property pages as noted above). Tooling can also be keyed to work with profiles with a specified connection factory (e.g. DB specific tooling might be keyed to use any profile with a `java.sql.Connection` factory). This approach allows tooling to work with any type of connection profile that can be represented through a particular connection API.

The following filter properties are provided for filtering connection profile instances: (These are defined in `org.eclipse.datatools.connectivity.ui.IConnectionProfileActionFilter`.)

- `org.eclipse.datatools.profile.property.id` -
Use for filtering profile instances of a specific type.
- `org.eclipse.datatools.connectivity.profile.property.categoryID` -
Use for filtering profile instances belonging to a specific category.
- `org.eclipse.datatools.connectivity.profile.property.factoryID` -
Use for filtering profile instances implementing a specific type of connection factory.
- `org.eclipse.datatools.connectivity.profile.property.hasExtendedProperties` -
Use for filtering profile instances with one or more `profileExtension`s defined.
- `org.eclipse.datatools.connectivity.profile.property.extensionID` -
Use for filtering profile instances implementing a specific type of `profileExtension`.
- `org.eclipse.datatools.connectivity.profile.property.containingViewID` -
Use for filtering profile instances contained within a specific view.
- `org.eclipse.datatools.connectivity.profile.property.isConnected` -
Use for filtering profile instances based on their connection state.
- `org.eclipse.datatools.connectivity.profile.property.supportsPing` -
Use for filtering profile instances implementing a ping connection factory (shortcut for name=org.eclipse.datatools.connectivity.profile.property.factoryID, value=org.eclipse.datatools.connectivity.connectionFactory.pingFactory).

###### Configuration Markup:

<!ELEMENT extension (category* , configurationType* , connectionProfile* , connectionFactory* , profileExtension* , newWizard* , wizardCategory*)*>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

- point - a fully qualified identifier of the target extension point, `org.eclipse.datatools.connectivity.connectionProfile`
- id - an optional identifier of the extension instance
- name - an optional name of the extension instance

<!ELEMENT category EMPTY>

<!ATTLIST category

id CDATA #REQUIRED

parentCategory CDATA #IMPLIED

name CDATA #IMPLIED>

This element is used to identify a category. Categories are used to group related connection profile types (e.g. databases).

- id - The id of this category. This value is referenced by `connectionProfile` elements.
- parentCategory - The id of a parent category, if this category has a parent.
- name - The display name for this category.

<!ELEMENT connectionProfile EMPTY>

<!ATTLIST connectionProfile

id CDATA #REQUIRED

name CDATA #IMPLIED

category CDATA #REQUIRED

configurationType CDATA #REQUIRED

icon CDATA #IMPLIED

maintainConnection CDATA #IMPLIED>

This element is used to define a connection profile type.

- id - The id of this connection profile. This must uniquely identify this connection profile.
- name - The display name for this connection profile type.
- category - The category that this connection profile belongs to. This must map back to a `category/id`.
- configurationType - The configuration type for this connection profile. This must map back to a `configurationType/id`.
- icon - The plug-in relative path to an image file. This image will be used to identify resources of this type in the servers view.
- maintainConnection -

<!ELEMENT configurationType EMPTY>

<!ATTLIST configurationType

id CDATA #REQUIRED

name CDATA #IMPLIED>

This element is used to identify a configuration type. A configuration type is used for determining the format of the configuration data used by a connection profile. For example, "New Era Open Transport" or "JDBC Connection URL"

- id - The unique identifier for this configuration type.
- name - The name of this configuration type.

<!ELEMENT connectionFactory EMPTY>

<!ATTLIST connectionFactory

profile CDATA #REQUIRED

name CDATA #IMPLIED

id CDATA #REQUIRED

class CDATA #REQUIRED>

This element defines a connection factory that can be used to create connections to a server using the properties stored in a connection profile resource.

- profile - The connection profile supported by this factory. This should reference a `connectionProfile/id`.
- name - The name of this connection factory.
- id - The unique identifier for this connection factory. This id may be used by plug-ins to retrieve an instance of this connection factory.
- class - The class that implements this connection factory. The specified class must be an instance of IConnectionFactory.

<!ELEMENT profileExtension EMPTY>

<!ATTLIST profileExtension

profile CDATA #REQUIRED

name CDATA #IMPLIED

id CDATA #REQUIRED>

This element is used to define an extension that provides support for setting additional properties on a connection profile. When implementing this extension point, you should also implement a connection factory if required.

- profile - The connection profile that this extension supports. This should map to a `connectionProfile/id`.
- name - The name of this extension.
- id - A unique identifier for this extension.

<!ELEMENT newWizard EMPTY>

<!ATTLIST newWizard

id CDATA #REQUIRED

name CDATA #REQUIRED

class CDATA #REQUIRED

icon CDATA #IMPLIED

description CDATA #IMPLIED

profile CDATA #REQUIRED

category CDATA #IMPLIED>

This element is used to identify a connection profile wizard. A wizard is used to create a connection profile

- id - The unique identifier for the new wizard.
- name -
- class - The class that implements this new wizard. The specified class must be an instance of IWizard. `org.eclipse.datatools.connectivity.ui.wizards.NewConnectionProfileWizard` is a base implementation intended to be extended by connection profile providers. `org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage` is a base wizard page implementation intended for use with the above wizard implementation.
- icon - The plug-in relative path to an image file. This image will be used to identify the new wizard.
- description - Description of the new wizard.
- profile - The connection profile supported by this new wizard. This should reference a `connectionProfile/id`.
- category -

<!ELEMENT wizardCategory EMPTY>

<!ATTLIST wizardCategory

id CDATA #REQUIRED

parentCategory CDATA #IMPLIED

name CDATA #IMPLIED

icon CDATA #IMPLIED

description CDATA #IMPLIED

wizardTitle CDATA #IMPLIED

wizardDescription CDATA #IMPLIED>

- id - This element is used to identify a wizard category. Categories are used to group related connection profile wizards (e.g. databases).
- parentCategory - The id of a parent category, if this category has a parent.
- name - The display name for this category.
- icon - The plug-in relative path to an image file. This image will be used to identify wizard category in the new connection profile wizard.
- description - Description of the new wizard category.
- wizardTitle - wizard title
- wizardDescription - wizard description

###### Examples:

     <extension
       id="sample"
       name="Sample Server Extension"
       point="org.eclipse.datatools.connectivity.connectionProfile">
      <category
        name="Sample Server Category"
        id="org.eclipse.datatools.connectivity.example.sampleCategory">
      </category>
      <configurationType
        name="Sample Configuration Type"
        id="org.eclipse.datatools.connectivity.example.sampleConfigurationType">
      </configurationType>
      <connectionFactory
        profile="org.eclipse.datatools.connectivity.example.sampleConnectionProfile"
        name="Shared Connection Factory"
        id="org.eclipse.datatools.connectivity.example.sharedConnectionFactory"
        class="org.eclipse.datatools.connectivity.example.SharedConnectionFactory">
      </connectionFactory>
      <connectionFactory
        profile="org.eclipse.datatools.connectivity.example.sampleConnectionProfile"
        name="Ping Connection Factory"
        id="org.eclipse.datatools.connectivity.connectionFactory.pingFactory"
        class="org.eclipse.datatools.connectivity.example.SharedConnectionFactory">
      </connectionFactory>
      <profileExtension
        profile="org.eclipse.datatools.connectivity.example.sampleConnectionProfile"
        name="Sample Extraneous Properties"
        id="org.eclipse.datatools.connectivity.example.sampleConnectionProfileExtension">
      </profileExtension>
      <connectionProfile
        configurationType="org.eclipse.datatools.connectivity.example.sampleConfigurationType"
        name="Sample Connection Profile"
        icon="icons/sample.gif"
        category="org.eclipse.datatools.connectivity.example.sampleCategory"
        id="org.eclipse.datatools.connectivity.example.sampleConnectionProfile">
      </connectionProfile>
     </extension>

###### API Information:

[Enter API information here.]

Copyright (c) 2004-2005 Sybase, Inc.

All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

Contributors: rcernich - initial API and implementation