|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.swingui.ArchitectSwingSessionImpl
public class ArchitectSwingSessionImpl
| Field Summary |
|---|
| Fields inherited from interface ca.sqlpower.architect.ArchitectSession |
|---|
PREFS_PL_INI_PATH |
| Method Summary | |
|---|---|
void |
addSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<ArchitectSwingSession> listener)
Adds the given listener to the list of interested parties who want to be notified when this session is about to close. |
void |
close()
This is a common handler for all actions that must occur when switching projects, e.g., prompting to save any unsaved changes, disposing dialogs, shutting down running threads, and so on. |
UserPrompter |
createUserPrompter(java.lang.String question,
java.lang.String okText,
java.lang.String notOkText,
java.lang.String cancelText)
Creates a new user prompter that uses a modal dialog to pose the given question. |
void |
fireSessionClosing()
|
ArchitectFrame |
getArchitectFrame()
Returns the ArchitectFrame created in this session. |
CompareDMSettings |
getCompareDMSettings()
|
ArchitectSwingSessionContext |
getContext()
Returns the context that created this session. |
DDLGenerator |
getDDLGenerator()
The DDL Generator currently in use for this session. |
KettleJob |
getKettleJob()
|
java.lang.String |
getName()
Gets the value of name |
OLAPEditSession |
getOLAPEditSession(OLAPSession olapSession)
Returns the OLAPEditSession that is associated with editing the given OLAPSession. |
java.util.List<OLAPEditSession> |
getOLAPEditSessions()
Returns a list of the OLAPEditSessions associated with this session's OLAP Schemas. |
OLAPRootObject |
getOLAPRootObject()
Returns the OLAP root object, which contains all the OLAP sessions that are part of this Architect session. |
PlayPen |
getPlayPen()
Gets the value of playPen |
javax.swing.JDialog |
getProfileDialog()
Returns the JDialog containing the ProfileManagerView |
ProfileManager |
getProfileManager()
|
SwingUIProject |
getProject()
Returns the project associated with this session. |
RecentMenu |
getRecentMenu()
Gets the recent menu list |
boolean |
getRelationshipLinesDirect()
Relationship line style: True means direct lines; false means only horizontal and vertical lines. |
SQLObjectRoot |
getRootObject()
Returns the top level object in the SQLObject hierarchy. |
DBTree |
getSourceDatabases()
Gets the value of sourceDatabases |
SQLDatabase |
getTargetDatabase()
Gets the target database in the playPen. |
UndoManager |
getUndoManager()
Gets the UndoManager keeping track of changes in this session |
CoreUserSettings |
getUserSettings()
See #userSettings. |
void |
initGUI()
Initializes the GUI components for this session. |
void |
initGUI(ArchitectSwingSession openingSession)
Like initGUI(), this method initializes the GUI components for this session, with the exception that the GUI components will get positioned relative to the GUI component of the given ArchitectSwingSession. |
boolean |
isNew()
Returns true if the session contains a completely new and unmodified project. |
boolean |
isRelationshipLinesDirect()
|
boolean |
isSavingEntireSource()
See savingEntireSource. |
boolean |
isShowAkTag()
Returns whether the AK Tags will be shown |
boolean |
isShowFkTag()
Returns whether the FK Tags will be shown |
boolean |
isShowForeign()
Indicates whether FK Columns will be shown. |
boolean |
isShowIndexed()
Indicates whether Indexed Columns will be shown. |
boolean |
isShowPkTag()
Returns whether the PK Tags will be shown |
boolean |
isShowPrimary()
Indicates whether PK Columns will be shown. |
boolean |
isShowTheRest()
Indicates whether Columns that are not PK, FK, Unique or Indexed will be shown. |
boolean |
isShowUnique()
Indicates whether Unique Columns will be shown. |
protected boolean |
promptForUnsavedModifications()
Checks if the project is modified, and if so presents the user with the option to save the existing project. |
void |
registerSwingWorker(ca.sqlpower.swingui.SPSwingWorker worker)
|
void |
removeSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<ArchitectSwingSession> listener)
Removes the given listener from the lifecycle event list. |
void |
removeSwingWorker(ca.sqlpower.swingui.SPSwingWorker worker)
|
boolean |
saveOrSaveAs(boolean showChooser,
boolean separateThread)
Condition the Model to save the project, showing a file chooser when appropriate. |
void |
setCompareDMSettings(CompareDMSettings compareDMSettings)
|
void |
setDDLGenerator(DDLGenerator generator)
Sets the new DDL Generator currently in use for this session. |
void |
setKettleJob(KettleJob kettleJob)
|
void |
setName(java.lang.String argName)
Sets the value of name |
void |
setProject(CoreProject project)
This method is only used to create the correct type of project for an ArchitectSwingSessionImpl and should not be called anywhere else. |
void |
setRelationshipLinesDirect(boolean relationshipLinesDirect)
Relationship line style: True means direct lines; false means only horizontal and vertical lines. |
void |
setSavingEntireSource(boolean argSavingEntireSource)
See savingEntireSource. |
void |
setShowAkTag(boolean showAkTag)
Sets whether the AK Tags will be shown |
void |
setShowFkTag(boolean showFkTag)
Sets whether the FK Tags will be shown |
void |
setShowForeign(boolean showForeign)
Sets whether FK Columns should be shown. |
void |
setShowIndexed(boolean showIndexed)
Sets whether Indexed Columns should be shown. |
void |
setShowPkTag(boolean showPkTag)
Sets whether the PK Tags will be shown |
void |
setShowPrimary(boolean showPrimary)
Sets whether PK Columns should be shown. |
void |
setShowTheRest(boolean showTheRest)
Sets whether Columns that are not PK, FK, Unique or Indexed should be shown. |
void |
setShowUnique(boolean showUnique)
Sets whether Unique Columns should be shown. |
void |
setSourceDatabaseList(java.util.List<SQLDatabase> databases)
Replaces the entire list of source databases for this session. |
void |
setSourceDatabases(DBTree argSourceDatabases)
Sets the value of sourceDatabases |
void |
showOLAPSchemaManager(java.awt.Window owner)
Shows the schema manager dialog for this session's OLAP Schemas. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void initGUI()
throws ArchitectException
ArchitectSwingSession
initGUI in interface ArchitectSwingSessionArchitectException
public void initGUI(ArchitectSwingSession openingSession)
throws ArchitectException
ArchitectSwingSession
initGUI in interface ArchitectSwingSessionopeningSession - The ArchitectSwingSession to which this session's GUI
components will be positioned relative to
ArchitectExceptionpublic SwingUIProject getProject()
ArchitectSession
getProject in interface ArchitectSessiongetProject in interface ArchitectSwingSessionpublic void setProject(CoreProject project)
ArchitectSession
setProject in interface ArchitectSessionpublic CoreUserSettings getUserSettings()
ArchitectSwingSession#userSettings.
getUserSettings in interface ArchitectSwingSessionpublic ArchitectSwingSessionContext getContext()
ArchitectSession
getContext in interface ArchitectSessiongetContext in interface ArchitectSwingSessionpublic ArchitectFrame getArchitectFrame()
ArchitectSwingSession
getArchitectFrame in interface ArchitectSwingSessionprotected boolean promptForUnsavedModifications()
public boolean saveOrSaveAs(boolean showChooser,
boolean separateThread)
saveOrSaveAs in interface ArchitectSwingSessionshowChooser - If true, a chooser will always be shown; otherwise a
chooser will only be shown if the project has no file associated with it
(this is usually because it has never been saved before).separateThread - If true, the (possibly lengthy) save operation
will be executed in a separate thread and this method will return immediately.
Otherwise, the save operation will proceed on the current thread.
true is just an optimistic guess,
and there is no way to discover if the save operation has eventually succeeded or
failed.public void close()
close in interface ArchitectSwingSessionpublic DBTree getSourceDatabases()
getSourceDatabases in interface ArchitectSwingSessionpublic void setSourceDatabases(DBTree argSourceDatabases)
argSourceDatabases - Value to assign to this.sourceDatabases
public void setSourceDatabaseList(java.util.List<SQLDatabase> databases)
throws ArchitectException
ArchitectSession
setSourceDatabaseList in interface ArchitectSessionArchitectExceptionpublic SQLDatabase getTargetDatabase()
getTargetDatabase in interface ArchitectSessionpublic java.lang.String getName()
getName in interface ArchitectSessionpublic void setName(java.lang.String argName)
setName in interface ArchitectSessionargName - Value to assign to this.namepublic PlayPen getPlayPen()
getPlayPen in interface ArchitectSwingSessionpublic RecentMenu getRecentMenu()
getRecentMenu in interface ArchitectSwingSessionpublic CompareDMSettings getCompareDMSettings()
getCompareDMSettings in interface ArchitectSwingSessionpublic void setCompareDMSettings(CompareDMSettings compareDMSettings)
public UndoManager getUndoManager()
ArchitectSwingSession
getUndoManager in interface ArchitectSwingSessionpublic ProfileManager getProfileManager()
getProfileManager in interface ArchitectSessionpublic javax.swing.JDialog getProfileDialog()
ArchitectSwingSession
getProfileDialog in interface ArchitectSwingSessionpublic boolean isSavingEntireSource()
savingEntireSource.
isSavingEntireSource in interface ArchitectSwingSessionpublic void setSavingEntireSource(boolean argSavingEntireSource)
savingEntireSource.
setSavingEntireSource in interface ArchitectSwingSessionargSavingEntireSource - Value to assign to this.savingEntireSourcepublic KettleJob getKettleJob()
getKettleJob in interface ArchitectSwingSessionpublic void setKettleJob(KettleJob kettleJob)
setKettleJob in interface ArchitectSwingSessionpublic void addSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<ArchitectSwingSession> listener)
ArchitectSwingSession
addSessionLifecycleListener in interface ArchitectSwingSessionpublic void removeSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<ArchitectSwingSession> listener)
ArchitectSwingSession
removeSessionLifecycleListener in interface ArchitectSwingSessionpublic void fireSessionClosing()
public void registerSwingWorker(ca.sqlpower.swingui.SPSwingWorker worker)
registerSwingWorker in interface ca.sqlpower.swingui.SwingWorkerRegistrypublic void removeSwingWorker(ca.sqlpower.swingui.SPSwingWorker worker)
removeSwingWorker in interface ca.sqlpower.swingui.SwingWorkerRegistrypublic boolean isNew()
ArchitectSwingSession
Note: that this property is different from the SwingUIProject.isModified()
property in that the isNew property is persisted when the project is saved, and
refers to whether the project was ever modified since it was first created,
whereas, the isModified property refers to whether the project was modified ever
since the project was last loaded.
isNew in interface ArchitectSwingSessionpublic boolean isRelationshipLinesDirect()
public void setRelationshipLinesDirect(boolean relationshipLinesDirect)
ArchitectSwingSession
setRelationshipLinesDirect in interface ArchitectSwingSessionpublic boolean getRelationshipLinesDirect()
ArchitectSwingSession
getRelationshipLinesDirect in interface ArchitectSwingSessionpublic SQLObjectRoot getRootObject()
ArchitectSession
getRootObject in interface ArchitectSessionpublic DDLGenerator getDDLGenerator()
ArchitectSession
getDDLGenerator in interface ArchitectSessionpublic void setDDLGenerator(DDLGenerator generator)
ArchitectSession
setDDLGenerator in interface ArchitectSessionpublic OLAPRootObject getOLAPRootObject()
ArchitectSessionNote: We would prefer not to let ArchitectSession reference anything in the OLAP editor, since we do not want the core Architect API to include OLAP support. We are currently trying to come up with a way to put this somewhere else.
getOLAPRootObject in interface ArchitectSession
public UserPrompter createUserPrompter(java.lang.String question,
java.lang.String okText,
java.lang.String notOkText,
java.lang.String cancelText)
createUserPrompter in interface ArchitectSessioncreateUserPrompter in interface UserPrompterFactoryquestion - The question the new prompter will pose when solociting a response
from the user. This question string is not exactly plain text: it is
formatted according to to rules laid out in the MessageFormat
class. The most important implications are that the single quote (')
character and the open curly brace ({) characters are special and have
to be escaped in order to appear in the message. The other important
thing (the benefit, that is) is that constructions of the form {0} are
placeholders that will be substituted every time the question is asked
via the UserPrompter.promptUser(Object[]) method is called.
See MessageFormat for details.
Also, UserPrompter implementations will ensure that newline characters (\n) show up as new lines when the question is presented to the user.
okText - The text to associate with the OK response. Try to use a word
or phrase from the question instead of a generic word like
"OK" or "Yes".notOkText - The text to associate with the "not OK" response. Try to use a
word or phrase from the question instead of a generic word
like "No".cancelText - The text to associate with response that cancels the whole operation.ModalDialogUserPrompterpublic boolean isShowPkTag()
ArchitectSwingSession
isShowPkTag in interface ArchitectSwingSessionpublic void setShowPkTag(boolean showPkTag)
ArchitectSwingSession
setShowPkTag in interface ArchitectSwingSessionpublic boolean isShowFkTag()
ArchitectSwingSession
isShowFkTag in interface ArchitectSwingSessionpublic void setShowFkTag(boolean showFkTag)
ArchitectSwingSession
setShowFkTag in interface ArchitectSwingSessionpublic boolean isShowAkTag()
ArchitectSwingSession
isShowAkTag in interface ArchitectSwingSessionpublic void setShowAkTag(boolean showAkTag)
ArchitectSwingSession
setShowAkTag in interface ArchitectSwingSessionpublic boolean isShowPrimary()
ArchitectSwingSession
isShowPrimary in interface ArchitectSwingSessionpublic void setShowPrimary(boolean showPrimary)
ArchitectSwingSession
setShowPrimary in interface ArchitectSwingSessionpublic boolean isShowForeign()
ArchitectSwingSession
isShowForeign in interface ArchitectSwingSessionpublic void setShowForeign(boolean showForeign)
ArchitectSwingSession
setShowForeign in interface ArchitectSwingSessionpublic boolean isShowIndexed()
ArchitectSwingSession
isShowIndexed in interface ArchitectSwingSessionpublic void setShowIndexed(boolean showIndexed)
ArchitectSwingSession
setShowIndexed in interface ArchitectSwingSessionpublic boolean isShowUnique()
ArchitectSwingSession
isShowUnique in interface ArchitectSwingSessionpublic void setShowUnique(boolean showUnique)
ArchitectSwingSession
setShowUnique in interface ArchitectSwingSessionpublic boolean isShowTheRest()
ArchitectSwingSession
isShowTheRest in interface ArchitectSwingSessionpublic void setShowTheRest(boolean showTheRest)
ArchitectSwingSession
setShowTheRest in interface ArchitectSwingSessionpublic void showOLAPSchemaManager(java.awt.Window owner)
ArchitectSwingSession
showOLAPSchemaManager in interface ArchitectSwingSessionowner - The owner of the dialog.public java.util.List<OLAPEditSession> getOLAPEditSessions()
ArchitectSwingSession
getOLAPEditSessions in interface ArchitectSwingSessionpublic OLAPEditSession getOLAPEditSession(OLAPSession olapSession)
ArchitectSwingSession
getOLAPEditSession in interface ArchitectSwingSessionolapSession - the OLAPSession in question, must not be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||