Extension SDK

oracle.jdeveloper.cm.dt
Class Connections

java.lang.Object
  extended byoracle.ide.model.DefaultDisplayable
      extended byoracle.ide.model.DefaultElement
          extended byoracle.ide.model.DefaultFolder
              extended byoracle.jdeveloper.cm.dt.Connections
All Implemented Interfaces:
Data, Displayable, Element, Folder, Subject

public final class Connections
extends DefaultFolder
implements Subject

The Connections class is the folder responsible maintaining the database connections. This is a singleton class.


Field Summary
 
Fields inherited from class oracle.ide.model.DefaultFolder
_children
 
Fields inherited from interface oracle.ide.addin.Subject
OBJECT_MODIFIED
 
Constructor Summary
Connections()
          Constructor.
 
Method Summary
 void addConnection(ConnectionDescriptor connDesc)
          Added a named connection to the Navigator
 void addConnection(java.lang.String connName)
          Added a named connection to the Navigator
 void addConnection(java.lang.String connName, boolean notifyObs)
          Added a named connection to the Navigator
 void attach(Observer observer)
          Registers an observer interested in being notified when the internal state of the class implementing the Subject interface changes.
 void detach(Observer observer)
          Unregisters an observer that is not interested anymore in being notified when the internal state of the class implementing the Subject interface changes.
 java.util.Iterator getChildren()
          Part of the Element interface.
 ConnectionNode getConnectionNode(java.lang.String connName)
          Gets the ConnectionNode for a given connection name
 javax.swing.Icon getIcon()
          Part of Element interface.
static Connections getInstance()
          The Connections folder is a singleton class.
 java.lang.String getLongLabel()
          Returns a long label that can be displayed to the user.
 java.lang.String getShortLabel()
          Returns a short label that can be displayed to the user.
 java.lang.String getToolTipText()
          Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable.
 void loadConnections()
          Addin authors should not call this method.
 void notifyObservers(java.lang.Object observed, UpdateMessage change)
          Notifies all observers that the state of the subject has changed.
 void registerConnectionClass(java.lang.String cClass, BaseConnections node)
           
 void removeConnection(ConnectionDescriptor connDesc)
          Removes a named connection to the Navigator
 void removeConnection(java.lang.String connName)
          Removes a named connection to the Navigator
 
Methods inherited from class oracle.ide.model.DefaultFolder
add, canAdd, canRemove, containsChild, copyToImpl, equalsImpl, mayHaveChildren, remove, removeAll, size
 
Methods inherited from class oracle.ide.model.DefaultElement
getAttributes, getData
 
Methods inherited from class oracle.ide.model.DefaultDisplayable
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.ide.model.Element
getAttributes
 
Methods inherited from interface oracle.ide.model.Data
getData
 
Methods inherited from interface oracle.ide.model.Displayable
toString
 

Constructor Detail

Connections

public Connections()
            throws SingletonClassException
Constructor.

Throws:
SingletonClassException - thrown when this class is instantiated more than once.
Method Detail

getInstance

public static Connections getInstance()
The Connections folder is a singleton class. This method gets this folder's single instance.

Returns:
the Connections folder single instance.

addConnection

public void addConnection(java.lang.String connName)
Added a named connection to the Navigator


addConnection

public void addConnection(java.lang.String connName,
                          boolean notifyObs)
Added a named connection to the Navigator


addConnection

public void addConnection(ConnectionDescriptor connDesc)
Added a named connection to the Navigator


removeConnection

public void removeConnection(java.lang.String connName)
Removes a named connection to the Navigator


removeConnection

public void removeConnection(ConnectionDescriptor connDesc)
Removes a named connection to the Navigator


getShortLabel

public java.lang.String getShortLabel()
Description copied from interface: Displayable
Returns a short label that can be displayed to the user. Generally, the value of the returned String is considered translatable and should therefore be placed in an appropriate resource file. When possible, the returned label should be reasonably short enough to show in the navigator or explorer windows but long enough to clearly identify and distinguish the Displayable.

Specified by:
getShortLabel in interface Displayable
Overrides:
getShortLabel in class DefaultDisplayable
See Also:
Displayable.getShortLabel()

getLongLabel

public java.lang.String getLongLabel()
Description copied from interface: Displayable
Returns a long label that can be displayed to the user. Generally, the value of the returned String is considered translatable and should therefore be placed in an appropriate resource file. The long label differs from the short label essentially on length. Usually the long label will only be shown on-demand and in places where horizontal space is more available. Examples are the status bar and tooltips.

Specified by:
getLongLabel in interface Displayable
Overrides:
getLongLabel in class DefaultDisplayable
See Also:
Displayable.getLongLabel()

getIcon

public javax.swing.Icon getIcon()
Description copied from class: DefaultFolder
Part of Element interface. The default implementation returns null, which causes a default folder icon to be used.

Specified by:
getIcon in interface Displayable
Overrides:
getIcon in class DefaultFolder
See Also:
Displayable.getIcon()

getToolTipText

public java.lang.String getToolTipText()
Description copied from interface: Displayable
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable. In many cases it may be appropriate for this method to return the same value as Displayable.getLongLabel().

Specified by:
getToolTipText in interface Displayable
Overrides:
getToolTipText in class DefaultDisplayable
See Also:
Displayable.getToolTipText()

getChildren

public java.util.Iterator getChildren()
Description copied from class: DefaultFolder
Part of the Element interface. This implementation returns an Iterator over the current list of children.

Specified by:
getChildren in interface Element
Overrides:
getChildren in class DefaultFolder
See Also:
Element.getChildren()

loadConnections

public void loadConnections()
Addin authors should not call this method. It is for internal use only.


getConnectionNode

public ConnectionNode getConnectionNode(java.lang.String connName)
Gets the ConnectionNode for a given connection name

Note: this will open the connection node if it is not already opened.


registerConnectionClass

public void registerConnectionClass(java.lang.String cClass,
                                    BaseConnections node)

attach

public void attach(Observer observer)
Description copied from interface: Subject
Registers an observer interested in being notified when the internal state of the class implementing the Subject interface changes. Implementors should do nothing when the same observer is added more than once.

Specified by:
attach in interface Subject
Parameters:
observer - the Observer interested in change notification messages.

detach

public void detach(Observer observer)
Description copied from interface: Subject
Unregisters an observer that is not interested anymore in being notified when the internal state of the class implementing the Subject interface changes. Implementors should do nothing when the same observer is removed more than once.

Specified by:
detach in interface Subject
Parameters:
observer - the Observer disinterested in change notification messages.

notifyObservers

public void notifyObservers(java.lang.Object observed,
                            UpdateMessage change)
Description copied from interface: Subject
Notifies all observers that the state of the subject has changed.

Specified by:
notifyObservers in interface Subject
Parameters:
observed - the subject whose state has changed.
change - what changed.

Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.