|
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 Displayable
Icon
to be displayed for the
Displayable
.public java.lang.String getShortLabel()
getShortLabel
in interface Displayable
public java.lang.String getToolTipText()
getToolTipText
in interface Displayable
Displayable
.public java.lang.String getConnectionName()
ConnectionBrowsable
getConnectionName
in interface ConnectionBrowsable
public void setConnectionName(java.lang.String connectionName)
ConnectionBrowsable
setConnectionName
in interface ConnectionBrowsable
public void setConnectionDescriptor(ConnectionDescriptor desc)
public ConnectionDescriptor getConnectionDescriptor()
public boolean isDirty()
isDirty
in interface Dirtyable
true
if the node has been recently modified.public oracle.jdeveloper.cm.dt.browser.ConnectionBrowser getConnectionBrowser()
ConnectionBrowsable
ConnectionBrowser
getConnectionBrowser
in interface ConnectionBrowsable
public void setConnectionBrowser(oracle.jdeveloper.cm.dt.browser.ConnectionBrowser newConnectionBrowser)
ConnectionBrowsable
ConnectionBrowser
instance for this
ConnectionBrowsable
interface.
setConnectionBrowser
in interface ConnectionBrowsable
ConnectionBrowser
,
ConnectionBrowsable
public boolean isConnected()
ConnectionBrowsable
isConnected
in interface ConnectionBrowsable
public void setConnected(boolean state)
ConnectionBrowsable
setConnected
in interface ConnectionBrowsable
public void open()
open
in interface Document
public void close()
ConnectionBrowsable
ConnectionBrowsable
interface.
close
in interface ConnectionBrowsable
public void refresh()
refresh
in interface oracle.jdeveloper.cm.dt.browser.Refreshable
public void reopen()
public boolean add(Element element)
Folder
Element
to the end of the
Folder
.
add
in interface Folder
public boolean remove(Element element)
Folder
Element
. If the child object
appears more than once, only the first instance is removed.
remove
in interface Folder
element
- The child object to remove.public boolean canRemove(Element element)
Folder
Element
can be removed from this
Folder
.
canRemove
in interface Folder
element
- 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)
Folder
Element
can be added to the Folder
.
canAdd
in interface Folder
element
- 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)
Folder
true
if the folder contains the
specified child Element
; returns false
otherwise.
containsChild
in interface Folder
public int size()
Folder
size
in interface Folder
public void removeAll()
Folder
removeAll
in interface Folder
public java.lang.String getLongLabel()
Displayable
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.
getLongLabel
in interface Displayable
Displayable
that
can be shown to the user.public java.net.URL getURL()
Locatable
URL
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 Locatable
URL
identifying this Locatable
.public void setURL(java.net.URL url)
Locatable
URL
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 Locatable
url
- The URL
to set.public java.lang.Object getData()
Data
Data
.
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 Data
Data
instance.public boolean mayHaveChildren()
Element
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.
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 Element
true
if this Element
may contain
child Element
s.public java.util.Iterator getChildren()
getChildren
in interface Element
public Attributes getAttributes()
Element
Attributes
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 Element
public void save(boolean shallow)
Document
save
in interface Document
shallow
- 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()
Document
true
if the document's data has never been
saved.
isNew
in interface Document
true
if the document's data has never been
saved.public boolean isOpen()
LazyLoadable
true
if the object's data has already been
loaded.
isOpen
in interface LazyLoadable
public boolean isReadOnly()
Document
true
if the document is read-only.
isReadOnly
in interface Document
public long getTimestamp()
Document
Document
,
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 Document
Document
's time stamp.public java.io.InputStream getInputStream() throws java.io.IOException
Document
InputStream
that can be used to read the contents
of this object.
getInputStream
in interface Document
InputStream
, 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)
Dirtyable
markDirty(...)
instead of
setDirty(...)
so that the JavaBeans
Introspector
will not
mistakenly identify "dirty" as a JavaBean property.
markDirty
in interface Dirtyable
dirty
- 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 Category
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public 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.