Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.ide.model
Class Workspace

java.lang.Object
  extended by oracle.ide.model.Node
      extended by oracle.ide.model.DataContainer
          extended by oracle.ide.model.HashStructureNode
              extended by oracle.ide.model.Workspace
All Implemented Interfaces:
Displayable, Element, Folder, LazyLoadable, Locatable, Observer, Subject, Dirtyable, PropertyStorage

public final class Workspace
extends HashStructureNode

Workspace represents an Application.


Field Summary
static java.lang.String CREATED_BY_TEMPLATE_ID_PROPERTY
           
static java.lang.String DATA_KEY
          The data key by which a Workspace instance can be located within a TraversableContext.
static java.lang.String EXT
          Constant recording the file extension for a workpace.
 
Fields inherited from class oracle.ide.model.Node
LOG_READONLY
 
Constructor Summary
Workspace()
           
 
Method Summary
 boolean canAdd(Element element)
          Folder interface method.
protected  void closeImpl()
          Subclasses should override this method to customize the close() behavior.
 java.lang.Object copyTo(java.lang.Object object)
           
 Project currentActiveProject()
          Returns the currently active Project associated with this Workspace.
 Project getActiveProject()
           
 java.net.URL getActiveProjectURL()
          Returns the currently active project URL associated with this Workspace.
 javax.swing.Icon getIcon()
          Displayable interface method.
protected  java.lang.String getNamespaceURI()
           
protected  java.lang.String getRootQName()
           
 boolean isDefault()
          For HashStructureNode subtypes that keep default state in a separate Node instance, this method should return true if this Node is the default instance.
protected  HashStructureIO newHashStructureIO()
           
 java.util.Collection<Project> projects()
          Returns a collection of Project instances which are children of this Workspace.
 boolean remove(Element doc, boolean notifyObservers)
           
protected  void saveImpl()
          Subclasses should override this method to customize the save() behavior.
 void setActiveProject(Project activeProject)
          Set the active project.
 void setActiveProjectURL(java.net.URL activeProjectURL)
          Set the active project url.
 
Methods inherited from class oracle.ide.model.HashStructureNode
applyBatchChanges, copyToImpl, equals, equalsImpl, getObjectStoreTarget, getProperties, getPropertiesForOverriding, getUserPropertiesOnly, isUserPropertiesEnabled, newObjectStore, openImpl, saveUserProperties, setURL
 
Methods inherited from class oracle.ide.model.DataContainer
add, add, add, canRemove, containsChild, equalsImpl, getBaseDirectory, getChildren, getListOfChildren, getProperty, getProperty, getSharedPropertiesOnly, getURL, mayHaveChildren, remove, removeAll, removeAll, resetSubDirtyableOwners, setListOfChildren, setProperty, setSubDirtyableOwner, size, update
 
Methods inherited from class oracle.ide.model.Node
addNodeListener, addNodeListenerForType, addNodeListenerForTypeHierarchy, attach, beginThreadNodeUsageCycle, callUnderReadLock, callUnderWriteLock, close, createSubject, delete, deleteImpl, detach, endThreadNodeUsage, endThreadNodeUsageCycle, ensureOpen, equalsImpl, getAttributes, getData, getInputStream, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampLoadedUnsafe, getToolTipText, getTransientProperties, getUnmodifiedTimestamp, isDirty, isLoaded, isMigrating, isNew, isOpen, isReadLocked, isReadOnly, isReadOrWriteLocked, isTrackedInNodeCache, isWriteLocked, lockCount, markDirty, markDirtyImpl, nodeLock, notifyObservers, open, readLock, readLockCount, readUnlock, refreshTimestamp, removeNodeListener, removeNodeListenerForType, removeNodeListenerForTypeHierarchy, rename, renameImpl, reportOpenException, revert, revertImpl, runUnderReadLock, runUnderWriteLock, save, setEventLog, setMigrating, setOpen, setReadOnly, setTimestampDirectly, toString, tryRunUnderReadLock, unsetMigrating, upgradeLock, upgradeUnlock, urlReadOnlyChanged, writeLock, writeLockCount, writeUnlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.ide.model.Element
getAttributes, getData
 
Methods inherited from interface oracle.ide.model.Displayable
getLongLabel, getShortLabel, getToolTipText, toString
 

Field Detail

DATA_KEY

public static final java.lang.String DATA_KEY
The data key by which a Workspace instance can be located within a TraversableContext. It is also the key for the PropertiesDialog.

See Also:
Constant Field Values

EXT

public static final java.lang.String EXT
Constant recording the file extension for a workpace.

See Also:
Constant Field Values

CREATED_BY_TEMPLATE_ID_PROPERTY

public static final java.lang.String CREATED_BY_TEMPLATE_ID_PROPERTY
See Also:
Constant Field Values
Constructor Detail

Workspace

public Workspace()
Method Detail

getIcon

public javax.swing.Icon getIcon()
Description copied from class: Node
Displayable interface method. The Node class returns a generic icon.

Specified by:
getIcon in interface Displayable
Overrides:
getIcon in class Node
Returns:
the Icon to be displayed for the Displayable.

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
Parameters:
element - the Element that is about to be added to this Folder.
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)
Overrides:
remove in class DataContainer

newHashStructureIO

protected final HashStructureIO newHashStructureIO()
Overrides:
newHashStructureIO in class HashStructureNode

getNamespaceURI

protected final java.lang.String getNamespaceURI()
Overrides:
getNamespaceURI in class HashStructureNode

getRootQName

protected final java.lang.String getRootQName()
Overrides:
getRootQName in class HashStructureNode

closeImpl

protected void closeImpl()
                  throws java.io.IOException
Description copied from class: Node
Subclasses should override this method to customize the close() behavior. Node.close() invokes this only if the node is open, under write lock. The Node implementation does nothing.

Overrides:
closeImpl in class HashStructureNode
Throws:
java.io.IOException - if an I/O error occurred while closing

saveImpl

protected void saveImpl()
                 throws java.io.IOException
Description copied from class: Node
Subclasses should override this method to customize the save() behavior. Node.save() invokes this only if the node is dirty, under write lock. The Node implementation does nothing.

Overrides:
saveImpl in class HashStructureNode
Throws:
java.io.IOException - if an I/O error occurred while saving

copyTo

public final java.lang.Object copyTo(java.lang.Object object)
Specified by:
copyTo in class HashStructureNode

isDefault

public boolean isDefault()
Description copied from class: HashStructureNode
For HashStructureNode subtypes that keep default state in a separate Node instance, this method should return true if this Node is the default instance.

Overrides:
isDefault in class HashStructureNode

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.


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.


getActiveProject

public Project getActiveProject()

projects

@NotNull
public java.util.Collection<Project> projects()
Returns a collection of Project instances which are children of this Workspace.

This method is equivalent to calling DataContainer.getChildren() and building a collection of the children which are an instance of Project.

Returns:
an unmodifiable collection of Projects. Never returns null.
Since:
11.1.1.0.1

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

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