|
Extension SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.ide.IdeSubject
oracle.jdeveloper.cm.dt.ConnectionNode
The ConnectionNode class is the base class for all representations
of Database Connections
This class extends DefaultNode to handle support for file-based
nodes.
The URL format for the Connections system is:
ide:connections//[Catalog]/[User]@[ConnectionName]:[ObjectType]:[ObjectName]
So a connection node by itself is
ide:connections//[ConnectionName]
<
oracle.jdeveloper.model.Node,
| Field Summary |
| Fields inherited from interface oracle.ide.addin.Subject |
OBJECT_MODIFIED |
| Fields inherited from interface oracle.ide.model.Category |
UNDEFINED |
| Constructor Summary | |
ConnectionNode()
Constructor. |
|
ConnectionNode(java.net.URL url)
Constructor. |
|
| Method Summary | |
boolean |
add(Element element)
Appends a child Element to the end of the
Folder. |
boolean |
canAdd(Element element)
Other classes can call this method to determine whether the given Element can be added to the Folder. |
boolean |
canRemove(Element element)
Other classes can call this method to determine whether the specified Element can be removed from this
Folder. |
void |
close()
Closes the ConnectionBrowsable interface. |
int |
compareTo(java.lang.Object o)
|
boolean |
containsChild(Element child)
Returns true if the folder contains the
specified child Element; returns false
otherwise. |
void |
ensureOpen()
|
Attributes |
getAttributes()
This method returns an Attributes object that encodes the
attributes of the Element. |
int |
getCategory()
Get the bit field identifying the different categories this data node falls under. |
java.util.Iterator |
getChildren()
Return the list of children, delegate to the active browser if one is available, creating it if necessary. |
java.lang.Object |
getClientProperty(java.lang.Object key)
Client Properties Support. |
oracle.jdeveloper.cm.dt.browser.ConnectionBrowser |
getConnectionBrowser()
Returns the currently in use ConnectionBrowser |
ConnectionDescriptor |
getConnectionDescriptor()
|
java.lang.String |
getConnectionName()
Returns the name of this connection |
java.lang.Object |
getData()
Returns the data element associated with this Data. |
javax.swing.Icon |
getIcon()
Returns the Icon for this node instance |
java.io.InputStream |
getInputStream()
Gets an InputStream that can be used to read the contents
of this object. |
java.lang.String |
getLongLabel()
Returns a long label that can be displayed to the user. |
java.lang.String |
getShortLabel()
Gets a short label for display purpose. |
long |
getTimestamp()
Returns the timestamp associated with the Document,
which indicates the time at which the document was last modified. |
java.lang.String |
getToolTipText()
Returns the text of the tooltip for this node instance |
java.net.URL |
getURL()
Returns the URL that identifies this
Locatable. |
boolean |
isConnected()
Is this ConnectionBrowsable connected by a ConnectionBrowser |
boolean |
isDirty()
Finds out if the node has pending changes that have not been saved to persistent store. |
boolean |
isNew()
Returns true if the document's data has never been
saved. |
boolean |
isOpen()
Returns true if the object's data has already been
loaded. |
protected boolean |
isOpenThreaded()
Indicates whether open() should be performed on another thread (with a dialog shown allowing the user to cancel). |
boolean |
isReadOnly()
Returns true if the document is read-only. |
void |
markDirty(boolean dirty)
Marks the data with the specified dirty state. |
boolean |
mayHaveChildren()
This method is part of the Element interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof operator or having to downcast to a
more specific type. |
void |
open()
Open the connection (connect via the ConnectionBrowser) |
void |
putClientProperty(java.lang.Object key,
java.lang.Object value)
Client Properties Support. |
void |
refresh()
|
boolean |
remove(Element element)
Removes the specified child Element. |
void |
removeAll()
Removes all children from the folder. |
void |
reopen()
|
void |
save(boolean shallow)
Saves the contents of the document. |
void |
setConnected(boolean state)
Sets the flag stating this ConnectionBrowsable is currently connected via a ConnectionBrowser |
void |
setConnectionBrowser(oracle.jdeveloper.cm.dt.browser.ConnectionBrowser newConnectionBrowser)
Sets the currently used ConnectionBrowser instance for this
ConnectionBrowsable interface. |
void |
setConnectionDescriptor(ConnectionDescriptor desc)
|
void |
setConnectionName(java.lang.String connectionName)
Sets the name of the ConnectionManager connection name |
void |
setURL(java.net.URL url)
Sets the URL associated with this Locatable. |
int |
size()
Returns the current number of children in the folder. |
| Methods inherited from class oracle.ide.IdeSubject |
attach, copy, detach, getObservers, notifyObservers, setObservers |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface oracle.ide.model.Displayable |
toString |
| Methods inherited from interface oracle.ide.addin.Subject |
attach, detach, notifyObservers |
| Constructor Detail |
public ConnectionNode(java.net.URL url)
url - unique url identifying this document.public ConnectionNode()
| Method Detail |
public javax.swing.Icon getIcon()
getIcon in interface DisplayableIcon to be displayed for the
Displayable.public java.lang.String getShortLabel()
getShortLabel in interface Displayablepublic java.lang.String getToolTipText()
getToolTipText in interface DisplayableDisplayable.public java.lang.String getConnectionName()
ConnectionBrowsable
getConnectionName in interface ConnectionBrowsablepublic void setConnectionName(java.lang.String connectionName)
ConnectionBrowsable
setConnectionName in interface ConnectionBrowsablepublic void setConnectionDescriptor(ConnectionDescriptor desc)
public ConnectionDescriptor getConnectionDescriptor()
public boolean isDirty()
isDirty in interface Dirtyabletrue if the node has been recently modified.public oracle.jdeveloper.cm.dt.browser.ConnectionBrowser getConnectionBrowser()
ConnectionBrowsableConnectionBrowser
getConnectionBrowser in interface ConnectionBrowsablepublic void setConnectionBrowser(oracle.jdeveloper.cm.dt.browser.ConnectionBrowser newConnectionBrowser)
ConnectionBrowsableConnectionBrowser instance for this
ConnectionBrowsable interface.
setConnectionBrowser in interface ConnectionBrowsableConnectionBrowser,
ConnectionBrowsablepublic boolean isConnected()
ConnectionBrowsable
isConnected in interface ConnectionBrowsablepublic void setConnected(boolean state)
ConnectionBrowsable
setConnected in interface ConnectionBrowsablepublic void open()
open in interface Documentpublic void close()
ConnectionBrowsableConnectionBrowsable interface.
close in interface ConnectionBrowsablepublic void refresh()
refresh in interface oracle.jdeveloper.cm.dt.browser.Refreshablepublic void reopen()
public boolean add(Element element)
FolderElement to the end of the
Folder.
add in interface Folderpublic boolean remove(Element element)
FolderElement. If the child object
appears more than once, only the first instance is removed.
remove in interface Folderelement - The child object to remove.public boolean canRemove(Element element)
FolderElement can be removed from this
Folder.
canRemove in interface Folderelement - the Element that is about to be removed
from this Folder.
true if the specified Element can be
removed from this Folder; false if the
Element cannot be removed.public boolean canAdd(Element element)
FolderElement can be added to the Folder.
canAdd in interface Folderelement - the Element that is about to be added
to this Folder.
true if the specified Element can be
added to this Folder; false if the
Element cannot be added.public boolean containsChild(Element child)
Foldertrue if the folder contains the
specified child Element; returns false
otherwise.
containsChild in interface Folderpublic int size()
Folder
size in interface Folderpublic void removeAll()
Folder
removeAll in interface Folderpublic java.lang.String getLongLabel()
DisplayableString 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.
getLongLabel in interface DisplayableDisplayable that
can be shown to the user.public java.net.URL getURL()
LocatableURL that identifies this
Locatable. Parts of the IDE will use the value of
this URL as a hash key for caching UI components for this
Locatable. Therefore, URL uniqueness is
important.
getURL in interface LocatableURL identifying this Locatable.public void setURL(java.net.URL url)
LocatableURL associated with this Locatable.
It is important that the URL only be changed when the
Locatable has just been created or when all caches
keyed on the previous URL can also be updated.
setURL in interface Locatableurl - The URL to set.public java.lang.Object getData()
DataData.
The getData() method provides a
standard means for getting the data element whether or not it is
same object as its Element object.
getData in interface DataData
instance.public boolean mayHaveChildren()
ElementElement interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof operator or having to downcast to a
more specific type.
An implementation of Element that represents a leaf
in a tree structure should return false from this
method. An implementation of Element that could
represent a non-leaf in a tree structure should return
true from this method, even if it does not currently
contain any children.
mayHaveChildren in interface Elementtrue if this Element may contain
child Elements.public java.util.Iterator getChildren()
getChildren in interface Elementpublic Attributes getAttributes()
ElementAttributes object that encodes the
attributes of the Element. Changing the attribute
settings on the return object changes the element attributes.
Subclasses should use their super class attributes object to
define their own attributes. This allows subclasses to
inherit their super class attributes. If a subclass does not
wish to inherit attributes, they should first call
getAttributes().clear() and define new attributes.
getAttributes in interface Elementpublic void save(boolean shallow)
Document
save in interface Documentshallow - The value of this parameter only matters if the
Document is also a Container. If
shallow is true, children should not
be saved; if shallow is false, children
should also be saved.public boolean isNew()
Documenttrue if the document's data has never been
saved.
isNew in interface Documenttrue if the document's data has never been
saved.public boolean isOpen()
LazyLoadabletrue if the object's data has already been
loaded.
isOpen in interface LazyLoadablepublic boolean isReadOnly()
Documenttrue if the document is read-only.
isReadOnly in interface Documentpublic long getTimestamp()
DocumentDocument,
which indicates the time at which the document was last modified.
The returned long is expressed in milliseconds since
00:00:00 GMT Jan 1, 1970.
getTimestamp in interface DocumentDocument's time stamp.
public java.io.InputStream getInputStream()
throws java.io.IOException
DocumentInputStream that can be used to read the contents
of this object.
getInputStream in interface DocumentInputStream, or null if the
document has no contents.
java.io.IOException - if a security manager exists and its
checkRead method denies read access.public void markDirty(boolean dirty)
DirtyablemarkDirty(...) instead of
setDirty(...) so that the JavaBeans
Introspector will not
mistakenly identify "dirty" as a JavaBean property.
markDirty in interface Dirtyabledirty - If true, sets the object as being
dirty; if false, sets the object as being up-to-date.public int getCategory()
Category
getCategory in interface Categorypublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic void ensureOpen()
public java.lang.Object getClientProperty(java.lang.Object key)
public void putClientProperty(java.lang.Object key,
java.lang.Object value)
key - The key or name of the propertyvalue - The value of the propertyprotected boolean isOpenThreaded()
|
Extension SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©1997, 2003, Oracle. All rights reserved.