## org.eclipse.datatools.connectivity.ui
Class ContentExtensionBase

    java.lang.Object
      org.eclipse.core.runtime.PlatformObject
          org.eclipse.datatools.connectivity.ui.ContentExtensionBase

All Implemented Interfaces:
  org.eclipse.core.runtime.IAdaptable, IContentExtension

Direct Known Subclasses:
  ContentExtensionFactoryBase

    public abstract class ContentExtensionBase

extends org.eclipse.core.runtime.PlatformObject
implements IContentExtension

Base implementation for IContentExtension. Registers a connect listener with the profile to manage the life cycle of the connection wrapped by this object.

Author:
  shongxum

Constructor Summary
`ContentExtensionBase(IConnectionProfile profile)`

Method Summary
`abstract void` `closeConnection()` Extenders should make sure the IConnection is closed.
`void` `dispose()` This method should dispose of any resources allocated by this object, including closing open connections to the referenced connection profile.
`java.lang.Object` `getAdapter(java.lang.Class adapter)`
`abstract IConnection` `getConnection()`
`IConnectionProfile` `getConnectionProfile()`
`boolean` `isVisible()`
`abstract void` `openConnection()` Extenders should open a connection

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.datatools.connectivity.ui.IContentExtension
`getImage, getLabel`

Constructor Detail

### ContentExtensionBase

    public ContentExtensionBase(IConnectionProfile profile)

Parameters:
  `contentProvider` -
  `labelProvider` -

Method Detail

### getConnectionProfile

    public IConnectionProfile getConnectionProfile()

  Specified by:
    `getConnectionProfile` in interface `IContentExtension`
  Returns:
    the connection profile extended by this object.

### openConnection

    public abstract void openConnection()

  Extenders should open a connection

  Specified by:
    `openConnection` in interface `IContentExtension`
  See Also:
    `org.eclipse.datatools.connectivity.IContentExtension#openConnection()`

### closeConnection

    public abstract void closeConnection()

  Extenders should make sure the IConnection is closed.

  Specified by:
    `closeConnection` in interface `IContentExtension`
  See Also:
    `IContentExtension.closeConnection()`

### getConnection

    public abstract IConnection getConnection()

  Specified by:
    `getConnection` in interface `IContentExtension`
  Returns:
    the connection used by this extension.

### dispose

    public void dispose()

  Description copied from interface: `IContentExtension`
  This method should dispose of any resources allocated by this object, including closing open connections to the referenced connection profile.

  Specified by:
    `dispose` in interface `IContentExtension`

### getAdapter

    public java.lang.Object getAdapter(java.lang.Class adapter)

  Specified by:
    `getAdapter` in interface `org.eclipse.core.runtime.IAdaptable`
  Overrides:
    `getAdapter` in class `org.eclipse.core.runtime.PlatformObject`

### isVisible

    public boolean isVisible()

  Specified by:
    `isVisible` in interface `IContentExtension`
  Returns:
    true if this content extension node should be visible