ca.sqlpower.wabit
Interface WabitSession

All Superinterfaces:
ca.sqlpower.util.SPSession
All Known Subinterfaces:
WabitSwingSession
All Known Implementing Classes:
WabitClientSession, WabitSessionImpl, WabitSwingSessionImpl

public interface WabitSession
extends ca.sqlpower.util.SPSession

The basic interface for a Wabit session. This interface provides all the UI-independent state and behaviour of a Wabit session.


Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void addSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<WabitSession> l)
           
 boolean close()
          Ends this session, disposing its frame and releasing any system resources that were obtained explicitly by this session.
 WabitSessionContext getContext()
          Returns the context this session belongs to.
 ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource> getDataSources()
          Returns a collection of all the data sources that are available to this session.
 WabitWorkspace getSystemWorkspace()
          This method might return a WabitWorkspace, the system one, located on the Wabit server, if the current session is backed by a remote server session.
 WabitWorkspace getWorkspace()
          Returns the workspace associated with this session.
 boolean isEnterpriseServerSession()
          Returns true if the current session is in fact a remote session with the wabit enterprise server.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void removeSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<WabitSession> l)
           
 
Methods inherited from interface ca.sqlpower.util.SPSession
isForegroundThread, runInBackground, runInForeground
 

Method Detail

addSessionLifecycleListener

void addSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<WabitSession> l)

removeSessionLifecycleListener

void removeSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<WabitSession> l)

getContext

WabitSessionContext getContext()
Returns the context this session belongs to.


close

boolean close()
Ends this session, disposing its frame and releasing any system resources that were obtained explicitly by this session. Also fires a sessionClosing lifecycle event, so any resources used up by subsystems dependent on this session can be freed by the appropriate parties.

Returns:
True if the session was successfully closed. False if the session did not close due to an error or user intervention.

getWorkspace

WabitWorkspace getWorkspace()
Returns the workspace associated with this session.

Specified by:
getWorkspace in interface ca.sqlpower.util.SPSession

addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener l)

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener l)

getDataSources

ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource> getDataSources()
Returns a collection of all the data sources that are available to this session. The data sources do not have to be in the session's workspace. All of the data sources in the session's workspace will be in this collection.


isEnterpriseServerSession

boolean isEnterpriseServerSession()
Returns true if the current session is in fact a remote session with the wabit enterprise server.

Returns:

getSystemWorkspace

WabitWorkspace getSystemWorkspace()
This method might return a WabitWorkspace, the system one, located on the Wabit server, if the current session is backed by a remote server session. It will return null if it is not a server session or the user doesn't have access to the system workspace. One can also use isEnterpriseSession() to verify if this call will return null beforehand.

Returns:


Copyright © 2009. All Rights Reserved.