oracle.ide.model
Class Workspace
java.lang.Object
oracle.ide.model.DefaultDisplayable
oracle.ide.model.DefaultElement
oracle.ide.model.DefaultDocument
oracle.ide.model.DefaultNode
oracle.ide.model.DataNode
oracle.ide.model.DataContainer
oracle.ide.model.Workspace
- All Implemented Interfaces:
- Category, Container, Copyable, Data, Dirtyable, Displayable, Document, DynamicPropertySet, Element, Folder, LazyLoadable, Locatable, Node, Subject
- public class Workspace
- extends DataContainer
- implements Copyable, DynamicPropertySet
This a new class that is under development to replace Workspace.
Field Summary |
static java.lang.String |
EXT
Constant recording the file extension for a workpace. |
static java.lang.String |
NAMESPACE_URI
Constant recording the workspace namespace URI. |
static java.lang.String |
ROOT_TAG
Constant recording the workspace root element tag. |
Method Summary |
boolean |
canAdd(Element element)
Folder interface method. |
void |
close()
Closes the Document and unloads any associated data. |
java.lang.Object |
copyTo(java.lang.Object object)
Design pattern for supporting strongly typed copying. |
protected void |
copyToImpl(Workspace copy)
|
Project |
currentActiveProject()
Returns the currently active Project associated with this Workspace . |
protected ObjectStore |
currentObjectStore()
|
boolean |
equals(java.lang.Object o)
|
protected boolean |
equalsImpl(Workspace workspace)
This is a helper method for equals(Object) that can also be used by subclasses that implement equals(Object) . |
java.net.URL |
getActiveProjectURL()
Returns the currently active project URL associated with this Workspace . |
javax.swing.Icon |
getIcon()
Returns an Icon that can be shown in association with this Displayable . |
java.util.Map |
getProperties()
Retrieves a map holding the property-value pairs. |
java.lang.Object |
getProperty(java.lang.String name)
Retrieves the value associated with a property. |
java.lang.Object |
getProperty(java.lang.String name, java.lang.Object defaultValue)
Accessor to user data saved in the workspace file |
boolean |
remove(Element doc, boolean notifyObservers)
This is a variant of the Folder.remove(Element) method that accepts an additional flag that indiciates whether or not notifications of the change should be sent to registered observers. |
void |
setActiveProject(Project activeProject)
Set the active project. |
void |
setActiveProjectURL(java.net.URL activeProjectURL)
Set the active project url. |
void |
setProperties(java.util.Map properties)
Sets the map holding the property-value pairs. |
void |
setProperty(java.lang.String name, java.lang.Object value)
Accessor to user data saved in the workspace file |
Methods inherited from class oracle.ide.model.DataContainer |
add, add, add, canRemove, containsChild, copyToImpl, getBaseDirectory, getChildren, getListOfChildren, mayHaveChildren, remove, removeAll, removeAll, resetSubDirtyableOwners, setListOfChildren, setSubDirtyableOwner, size |
Methods inherited from class oracle.ide.model.DefaultDocument |
attach, copyToImpl, createSubject, detach, ensureOpen, equalsImpl, getInputStream, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampDirectly, getToolTipText, isDirty, isNew, isOpen, isReadOnly, markDirty, notifyObservers, refreshTimestamp, setOpen, setTimestampDirectly, setURLDirectly |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.ide.model.Data |
getData |
EXT
public static final java.lang.String EXT
- Constant recording the file extension for a workpace.
- See Also:
- Constant Field Values
NAMESPACE_URI
public static final java.lang.String NAMESPACE_URI
- Constant recording the workspace namespace URI. Used for saving a workspace.
ROOT_TAG
public static final java.lang.String ROOT_TAG
- Constant recording the workspace root element tag. Used for saving a workspace.
- See Also:
- Constant Field Values
Workspace
public Workspace()
- Default constructor. Required for JavaBean status.
Workspace
public Workspace(Workspace workspace)
- Copy constructor.
close
public void close()
- Description copied from interface:
Document
- Closes the
Document
and unloads any associated data. When this method returns, the state of the Document
object should be equivalent to when the Document
object has just been instantiated but not yet opened.
-
- Specified by:
close
in interface Document
- Overrides:
close
in class DataContainer
copyTo
public java.lang.Object copyTo(java.lang.Object object)
- Design pattern for supporting strongly typed copying.
-
- Specified by:
copyTo
in interface Copyable
-
- Parameters:
object
- The target object to which the state of this
object should be copied. If target
is null
, then the copyTo
method will return a new instance of this
class.
- Returns:
- The object to which the state of
this
object was copied. If the target
was non-null
, then the return value is the same as the target
object that was passed in; otherwise, the return value is a new instance of this
class.
copyToImpl
protected final void copyToImpl(Workspace copy)
equals
public boolean equals(java.lang.Object o)
equalsImpl
protected final boolean equalsImpl(Workspace workspace)
- This is a helper method for
equals(Object)
that can also be used by subclasses that implement equals(Object)
. It assumes that the argument is not null
.
getActiveProjectURL
public java.net.URL getActiveProjectURL()
throws TransientMarker
- Returns the currently active project
URL
associated with this Workspace
. If there is no currently active project, null is returned.
-
- Throws:
TransientMarker
setActiveProjectURL
public void setActiveProjectURL(java.net.URL activeProjectURL)
- Set the active project url. This method does not cause the opening of the workspace nor does it make the workspace dirty. The active project information is not saved in the workspace file.
getIcon
public javax.swing.Icon getIcon()
- Description copied from interface:
Displayable
- Returns an
Icon
that can be shown in association with this Displayable
. Typically the icon will be used in a tree control or list control. Therefore the icon must fit naturally within the space normally given to items within those controls. Such icons are usually 16x16 in size or, if there is a one-pixel transparent padding around the edge, 18x18 in size. It is strongly recommended that icons returned by this method be either 16x16 or 18x18 in size. If null
is returned, the control may show a default icon, or it may show no icon, whichever is appropriate.
-
- Specified by:
getIcon
in interface Displayable
- Overrides:
getIcon
in class DefaultDisplayable
-
- See Also:
Displayable.getIcon()
canAdd
public boolean canAdd(Element element)
Folder
interface method. Returns true
if the specified Element
is an instance of Project
; returns false
otherwise.
-
- Specified by:
canAdd
in interface Folder
- Overrides:
canAdd
in class DataContainer
-
- Returns:
true
if and only if the specified Element
is not null
.
- See Also:
DefaultFolder.canAdd(Element)
, Folder.canAdd(Element)
remove
public boolean remove(Element doc,
boolean notifyObservers)
- Description copied from interface:
Container
- This is a variant of the
Folder.remove(Element)
method that accepts an additional flag that indiciates whether or not notifications of the change should be sent to registered observers.
-
- Specified by:
remove
in interface Container
- Overrides:
remove
in class DataContainer
currentObjectStore
protected ObjectStore currentObjectStore()
-
- Overrides:
currentObjectStore
in class DataNode
currentActiveProject
public Project currentActiveProject()
- Returns the currently active
Project
associated with this Workspace
. If there is no currently active Project
, null is returned. This method is called currentActiveProject
instead of getActiveProject
in order to avoid having the "_activeProject" property get picked up by the Introspector
.
setActiveProject
public void setActiveProject(Project activeProject)
- Set the active project.
getProperties
public java.util.Map getProperties()
- Description copied from interface:
DynamicPropertySet
- Retrieves a map holding the property-value pairs.
-
- Specified by:
getProperties
in interface DynamicPropertySet
setProperties
public void setProperties(java.util.Map properties)
- Description copied from interface:
DynamicPropertySet
- Sets the map holding the property-value pairs.
-
- Specified by:
setProperties
in interface DynamicPropertySet
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Description copied from interface:
DynamicPropertySet
- Retrieves the value associated with a property.
-
- Specified by:
getProperty
in interface DynamicPropertySet
-
- Parameters:
name
- the property key for which a value is desired. exists.
- Returns:
- the value of the requested property, or a
null
value if the property does not exist or is not set.
getProperty
public java.lang.Object getProperty(java.lang.String name,
java.lang.Object defaultValue)
- Accessor to user data saved in the workspace file
-
- Specified by:
getProperty
in interface DynamicPropertySet
-
- Parameters:
name
- the property key for which a value is desired.
defaultValue
- the value to return if no value currently exists.
- Returns:
- the value of the requested property, or the default value if the property does not exist.
setProperty
public void setProperty(java.lang.String name,
java.lang.Object value)
- Accessor to user data saved in the workspace file
-
- Specified by:
setProperty
in interface DynamicPropertySet
-
- Parameters:
name
- the property key to set
value
- the value to set
Copyright © 1997, 2004, Oracle. All rights reserved.