Connection Profile Extension

org.eclipse.datatools.connectivity.connectionProfile

DTP v. 0.x

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:

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.)

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

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>



<!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).





<!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.





<!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"





<!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.





<!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.





<!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





<!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>



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>

 

[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