|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.ArchitectSessionImpl
public class ArchitectSessionImpl
The ArchitectSession class represents a single user's session with the architect. If using the Swing UI (currently this is the only option, but that is subject to change), the ArchitectFrame has a 1:1 relationship with an ArchitectSession.
| Field Summary |
|---|
| Fields inherited from interface ca.sqlpower.architect.ArchitectSession |
|---|
PREFS_PL_INI_PATH |
| Constructor Summary | |
|---|---|
ArchitectSessionImpl(ArchitectSessionContext context,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
UserPrompter |
createUserPrompter(java.lang.String question,
java.lang.String okText,
java.lang.String notOkText,
java.lang.String cancelText)
Creates a new user prompter instance with the given settings. |
ArchitectSessionContext |
getContext()
Returns the context that created this session. |
DDLGenerator |
getDDLGenerator()
The DDL Generator currently in use for this session. |
java.lang.String |
getName()
Gets the value of name |
OLAPRootObject |
getOLAPRootObject()
Returns the OLAP root object, which contains all the OLAP sessions that are part of this Architect session. |
ProfileManagerImpl |
getProfileManager()
|
CoreProject |
getProject()
Returns the project associated with this session. |
SQLObjectRoot |
getRootObject()
Returns the top level object in the SQLObject hierarchy. |
SQLDatabase |
getTargetDatabase()
Returns the database in use for this session. |
void |
setDDLGenerator(DDLGenerator generator)
Sets the new DDL Generator currently in use for this session. |
void |
setName(java.lang.String argName)
Sets the value of name |
void |
setProfileManager(ProfileManagerImpl manager)
|
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 |
setSourceDatabaseList(java.util.List<SQLDatabase> databases)
Replaces the entire list of source databases for this session. |
void |
setUserPrompterFactory(UserPrompterFactory upFactory)
Changes the user prompter factory in use on this session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArchitectSessionImpl(ArchitectSessionContext context,
java.lang.String name)
throws ArchitectException
ArchitectException| Method Detail |
|---|
public java.lang.String getName()
getName in interface ArchitectSessionpublic void setName(java.lang.String argName)
setName in interface ArchitectSessionargName - Value to assign to this.namepublic ProfileManagerImpl getProfileManager()
getProfileManager in interface ArchitectSessionpublic SQLDatabase getTargetDatabase()
ArchitectSession
getTargetDatabase in interface ArchitectSessionpublic CoreProject getProject()
ArchitectSession
getProject in interface ArchitectSessionpublic void setProject(CoreProject project)
ArchitectSession
setProject in interface ArchitectSessionpublic SQLObjectRoot getRootObject()
ArchitectSession
getRootObject in interface ArchitectSessionpublic ArchitectSessionContext getContext()
ArchitectSession
getContext in interface ArchitectSession
public void setSourceDatabaseList(java.util.List<SQLDatabase> databases)
throws ArchitectException
ArchitectSession
setSourceDatabaseList in interface ArchitectSessionArchitectExceptionpublic DDLGenerator getDDLGenerator()
ArchitectSession
getDDLGenerator in interface ArchitectSessionpublic void setDDLGenerator(DDLGenerator generator)
ArchitectSession
setDDLGenerator in interface ArchitectSessionpublic void setProfileManager(ProfileManagerImpl manager)
public UserPrompter createUserPrompter(java.lang.String question,
java.lang.String okText,
java.lang.String notOkText,
java.lang.String cancelText)
UserPrompterFactory
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.public void setUserPrompterFactory(UserPrompterFactory upFactory)
upFactory - The new user prompter factory to use. Must not be null.public 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||