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

    java.lang.Object
      PlatformObject
          org.eclipse.datatools.connectivity.ui.ManagedContentExtensionBase

All Implemented Interfaces:
  IContentExtension

public abstract class ManagedContentExtensionBase
extends PlatformObject
implements IContentExtension

Base implementation for IContentExtension. Connection life cycle management is delegated to the IConnectionProfile.getManagedConnection().

Author:
  rcernich Created on Jun 20, 2005
See Also:
  Serialized Form

Constructor Summary
`ManagedContentExtensionBase(IConnectionProfile profile, java.lang.String factoryID)`

Method Summary
`void` `closeConnection()` This method should close any active connection referenced by this object.
`void` `dispose()` This method should dispose of any resources allocated by this object, including closing open connections to the referenced connection profile.
`IConnection` `getConnection()`
`IConnectionProfile` `getConnectionProfile()`
`java.lang.String` `getFactoryID()`
`void` `openConnection()` When invoked, this object should open a connection to the referenced connection profile and return the root elements to be displayed under this elements node in the tree.

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, isVisible`

Constructor Detail

### ManagedContentExtensionBase

    public ManagedContentExtensionBase(IConnectionProfile profile,
                                       java.lang.String factoryID)

Parameters:
  `profile` -

Method Detail

### getFactoryID

    public java.lang.String getFactoryID()

### getConnectionProfile

    public IConnectionProfile getConnectionProfile()

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

### 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`

### openConnection

    public void openConnection()

  Description copied from interface: `IContentExtension`
  When invoked, this object should open a connection to the referenced connection profile and return the root elements to be displayed under this elements node in the tree. If the connection is already open, the existing nodes should be returned.

  Specified by:
    `openConnection` in interface `IContentExtension`
  Returns:
    the root nodes to display under the connection profile

### closeConnection

    public void closeConnection()

  Description copied from interface: `IContentExtension`
  This method should close any active connection referenced by this object.

  Specified by:
    `closeConnection` in interface `IContentExtension`

### getConnection

    public IConnection getConnection()

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

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