Extension SDK 10.1.2

oracle.ide.model
Class Workspace

java.lang.Object
  extended byoracle.ide.model.DefaultDisplayable
      extended byoracle.ide.model.DefaultElement
          extended byoracle.ide.model.DefaultDocument
              extended byoracle.ide.model.DefaultNode
                  extended byoracle.ide.model.DataNode
                      extended byoracle.ide.model.DataContainer
                          extended byoracle.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.
 
Fields inherited from class oracle.ide.model.DataContainer
_children
 
Fields inherited from class oracle.ide.model.DataNode
_objectStore
 
Fields inherited from interface oracle.ide.addin.Subject
OBJECT_MODIFIED
 
Fields inherited from interface oracle.ide.model.Category
UNDEFINED
 
Constructor Summary
Workspace()
          Default constructor.
Workspace(Workspace workspace)
          Copy constructor.
 
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.DataNode
fireObjectOpened, getURL, open, open, reopen, save, setObjectStore
 
Methods inherited from class oracle.ide.model.DefaultNode
equalsImpl, getCategory, setURL
 
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 oracle.ide.model.DefaultElement
getAttributes, getData
 
Methods inherited from class oracle.ide.model.DefaultDisplayable
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.ide.model.Document
getInputStream, getTimestamp, isNew, isReadOnly, open, save
 
Methods inherited from interface oracle.ide.model.Locatable
getURL, setURL
 
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
getLongLabel, getShortLabel, getToolTipText, toString
 
Methods inherited from interface oracle.ide.addin.Subject
attach, detach, notifyObservers
 
Methods inherited from interface oracle.ide.model.Dirtyable
isDirty, markDirty
 
Methods inherited from interface oracle.ide.model.LazyLoadable
isOpen
 
Methods inherited from interface oracle.ide.model.Category
getCategory
 

Field Detail

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
Constructor Detail

Workspace

public Workspace()
Default constructor. Required for JavaBean status.


Workspace

public Workspace(Workspace workspace)
Copy constructor.

Method Detail

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

Extension SDK

 

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