org.eclipse.datatools.connectivity.ui
Class ContentExtensionBase

java.lang.Object
  extended byPlatformObject
      extended byorg.eclipse.datatools.connectivity.ui.ContentExtensionBase
All Implemented Interfaces:
IContentExtension
Direct Known Subclasses:
ContentExtensionFactoryBase

public abstract class ContentExtensionBase
extends 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
See Also:
Serialized Form

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)
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
Returns:
the root nodes to display under the connection profile
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)

isVisible

public boolean isVisible()
Specified by:
isVisible in interface IContentExtension
Returns:
true if this content extension node should be visible


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