org.grinvin.workspace
Class Workspace
java.lang.Object
org.grinvin.workspace.Workspace
public class Workspace
extends java.lang.Object
Handles session persistence. The singleton object of this type
allows sessions to be persisted to a workspace directory on disk.
subsystems
public List subsystems
dispose
public void dispose()
fireLocationChanged
public void fireLocationChanged()
getInstance
public static Workspace getInstance()
Get the singleton instance of this class
- the single instance of this class
getLocation
public File getLocation()
newWorkspace
public void newWorkspace(File location)
throws WorkspaceException
Initialize all subsystems and perform an initial save into the
given workspace directory. If there is an active workspace already,
it is disposed of first. If the new directory already exists,
all its contents are removed.
registerSubsystem
public void registerSubsystem(Subsystem subsystem)
Register (the wrapper) of a subsystem. The subsystem that is registered
first is also loaded and initialized first, but disposed and saved last.
If a subsystem A depends on a subsystem B, then B should be registered
before A.
removeWorkspaceListener
public void removeWorkspaceListener(WorkspaceListener listener)
setLocation
public void setLocation(File location)