|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.object.AbstractSPObject
ca.sqlpower.wabit.AbstractWabitObject
ca.sqlpower.wabit.WabitWorkspace
public class WabitWorkspace
The WabitWorkspace is the root WabitObject of a WabitSession. It directly corresponds with the root workspace node in the XML representation of a Wabit workspace. It belongs to exactly one WabitSession.
| Nested Class Summary | |
|---|---|
static class |
WabitWorkspace.WabitObjectOrder
FIXME This enum defines the WabitObject child classes a
WabitWorkspace takes as well as the ordinal order of these child
classes such that the class going before does not depend on the class
that goes after. |
| Field Summary | |
|---|---|
static java.lang.String |
SYSTEM_WORKSPACE_UUID
A workspace with this uuid is a system workspace. |
| Fields inherited from class ca.sqlpower.object.AbstractSPObject |
|---|
uuid |
| Fields inherited from interface ca.sqlpower.sql.DataSourceCollection |
|---|
DOS_CR_LF |
| Constructor Summary | |
|---|---|
WabitWorkspace()
Creates a new Wabit workspace. |
|
| Method Summary | ||
|---|---|---|
void |
addChart(Chart chart)
|
|
void |
addChart(Chart chart,
int index)
|
|
protected void |
addChildImpl(ca.sqlpower.object.SPObject child,
int index)
|
|
void |
addDatabaseListChangeListener(ca.sqlpower.sql.DatabaseListChangeListener l)
|
|
void |
addDataSource(ca.sqlpower.sql.SPDataSource dbcs)
|
|
void |
addDataSource(WabitDataSource ds)
|
|
void |
addDataSource(WabitDataSource ds,
int index)
|
|
void |
addDataSourceType(ca.sqlpower.sql.JDBCDataSourceType dataSourceType)
|
|
void |
addGroup(ca.sqlpower.enterprise.client.Group g)
|
|
void |
addGroup(ca.sqlpower.enterprise.client.Group g,
int index)
|
|
void |
addImage(WabitImage image)
|
|
void |
addImage(WabitImage image,
int index)
|
|
void |
addOlapQuery(OlapQuery newQuery)
|
|
void |
addOlapQuery(OlapQuery newQuery,
int index)
|
|
void |
addQuery(QueryCache query,
WabitSession session)
|
|
void |
addQuery(QueryCache query,
WabitSession session,
int index)
|
|
void |
addReport(Report report)
|
|
void |
addReport(Report report,
int index)
|
|
void |
addReportTask(ReportTask task)
|
|
void |
addReportTask(ReportTask task,
int index)
|
|
void |
addTemplate(Template template)
|
|
void |
addTemplate(Template template,
int index)
|
|
void |
addUndoableEditListener(javax.swing.event.UndoableEditListener l)
|
|
void |
addUser(ca.sqlpower.enterprise.client.User u)
|
|
void |
addUser(ca.sqlpower.enterprise.client.User u,
int index)
|
|
boolean |
allowsChildren()
|
|
int |
childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)
|
|
boolean |
dsAlreadyAdded(ca.sqlpower.sql.SPDataSource dbcs)
|
|
|
findByUuid(java.lang.String uuid,
java.lang.Class<T> expectedType)
Locates the WabitObject inside this workspace which has the given UUID, returning null if the item is not found. |
|
java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> |
getAllowedChildTypes()
|
|
java.util.List<Chart> |
getCharts()
|
|
java.util.List<ca.sqlpower.object.SPObject> |
getChildren()
|
|
|
getChildren(java.lang.Class<T> type)
|
|
java.util.List<ca.sqlpower.sql.SPDataSource> |
getConnections()
|
|
|
getConnections(java.lang.Class<C> classType)
|
|
ca.sqlpower.sql.SPDataSource |
getDataSource(java.lang.String name)
|
|
|
getDataSource(java.lang.String name,
java.lang.Class<C> classType)
|
|
java.util.List<WabitDataSource> |
getDataSources()
Returns an unmodifiable view of the data sources in this workspace. |
|
java.util.List<ca.sqlpower.sql.JDBCDataSourceType> |
getDataSourceTypes()
|
|
java.util.List<WabitObject> |
getDependencies()
|
|
ca.sqlpower.object.SPObject |
getEditorPanelModel()
|
|
java.util.List<ca.sqlpower.enterprise.client.Group> |
getGroups()
|
|
java.util.List<WabitImage> |
getImages()
|
|
java.net.URI |
getMondrianServerBaseURI()
|
|
java.util.List<OlapQuery> |
getOlapQueries()
|
|
WabitObject |
getParent()
Returns the parent of this WabitObject. |
|
java.util.List<QueryCache> |
getQueries()
|
|
Report |
getReportByName(java.lang.String name)
Returns the first Report child having the given name, or null if no reports have the requested name. |
|
java.util.List<Report> |
getReports()
|
|
java.util.List<ReportTask> |
getReportTasks()
|
|
java.net.URI |
getServerBaseURI()
|
|
WabitSession |
getSession()
Helper method to find the session of a WabitObject. |
|
java.util.List<Template> |
getTemplates()
|
|
java.util.List<ca.sqlpower.enterprise.client.User> |
getUsers()
|
|
boolean |
isMagicDisabled()
|
|
boolean |
isServerWorkspace()
|
|
boolean |
isSystemWorkspace()
|
|
void |
mergeDataSource(ca.sqlpower.sql.SPDataSource dbcs)
|
|
void |
mergeDataSourceType(ca.sqlpower.sql.JDBCDataSourceType dst)
|
|
int |
mergeIntoWorkspace(WabitWorkspace workspace)
This method will merge all of the objects in this workspace into the given workspace. |
|
void |
read(java.io.File location)
|
|
void |
read(java.io.InputStream inStream)
|
|
protected boolean |
removeChildImpl(ca.sqlpower.object.SPObject child)
|
|
void |
removeDatabaseListChangeListener(ca.sqlpower.sql.DatabaseListChangeListener l)
|
|
void |
removeDataSource(ca.sqlpower.sql.SPDataSource dbcs)
|
|
boolean |
removeDataSourceType(ca.sqlpower.sql.JDBCDataSourceType dataSourceType)
|
|
void |
removeDependency(ca.sqlpower.object.SPObject dependency)
|
|
boolean |
removeGroup(ca.sqlpower.enterprise.client.Group g)
|
|
boolean |
removeReportTask(ReportTask task)
|
|
void |
removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
|
|
boolean |
removeUser(ca.sqlpower.enterprise.client.User u)
|
|
void |
reset()
Resets the workspace by removing all of the children in the workspace and setting all of the values in the workspace to defaults. |
|
void |
setEditorPanelModel(ca.sqlpower.object.SPObject editorPanelModel)
|
|
void |
setMagicDisabled(boolean magicDisabled)
|
|
void |
setServerBaseURI(java.net.URI serverBaseURI)
|
|
void |
setSession(WabitSession session)
Sets the session which this workspace belongs to. |
|
void |
write()
DataSourceCollection interface method which is currently not supported. |
|
void |
write(java.io.File location)
DataSourceCollection interface method which is currently not supported. |
|
void |
write(java.io.OutputStream out)
DataSourceCollection interface method which is currently not supported. |
|
| Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject |
|---|
cleanup, commit, equals, generateNewUUID, isForegroundThread, removeChild, rollback, runInBackground, runInForeground, toString |
| Methods inherited from class ca.sqlpower.object.AbstractSPObject |
|---|
addChild, addSPListener, begin, fireChildAdded, fireChildRemoved, firePropertyChange, firePropertyChange, firePropertyChange, fireTransactionEnded, fireTransactionRollback, fireTransactionStarted, getName, getUUID, removeSPListener, setName, setParent, setUUID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ca.sqlpower.sql.DataSourceCollection |
|---|
toString |
| Methods inherited from interface ca.sqlpower.object.SPObject |
|---|
addChild, addSPListener, begin, getName, getUUID, removeSPListener, setName, setParent, setUUID |
| Field Detail |
|---|
public static final java.lang.String SYSTEM_WORKSPACE_UUID
| Constructor Detail |
|---|
public WabitWorkspace()
| Method Detail |
|---|
public java.util.List<ca.sqlpower.object.SPObject> getChildren()
getChildren in interface ca.sqlpower.object.SPObjectpublic <T extends ca.sqlpower.object.SPObject> java.util.List<T> getChildren(java.lang.Class<T> type)
getChildren in interface ca.sqlpower.object.SPObjectgetChildren in class ca.sqlpower.object.AbstractSPObjectpublic void setSession(WabitSession session)
This setter does not fire an event because it is not supposed to be called after the workspace has been initialized.
session - The session this workspace belongs to.public WabitSession getSession()
AbstractWabitObject
getSession in interface ca.sqlpower.object.SPObjectgetSession in class AbstractWabitObjectpublic void addDataSource(WabitDataSource ds)
public void addDataSource(WabitDataSource ds,
int index)
public java.util.List<WabitDataSource> getDataSources()
TODO change this to List<WabitDataSource> getDatabases()
public void addQuery(QueryCache query,
WabitSession session)
public void addQuery(QueryCache query,
WabitSession session,
int index)
public void addTemplate(Template template)
public void addTemplate(Template template,
int index)
public void addReport(Report report)
public void addReport(Report report,
int index)
public void addImage(WabitImage image)
public void addImage(WabitImage image,
int index)
public java.util.List<WabitImage> getImages()
public void addChart(Chart chart)
public void addChart(Chart chart,
int index)
public java.util.List<Chart> getCharts()
public int childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)
childPositionOffset in interface ca.sqlpower.object.SPObjectpublic java.util.List<QueryCache> getQueries()
public java.util.List<Report> getReports()
public java.util.List<Template> getTemplates()
public Report getReportByName(java.lang.String name)
name - The name to search. If null, null will be returned.public void addUser(ca.sqlpower.enterprise.client.User u)
public void addUser(ca.sqlpower.enterprise.client.User u,
int index)
public boolean removeUser(ca.sqlpower.enterprise.client.User u)
public java.util.List<ca.sqlpower.enterprise.client.User> getUsers()
public void addGroup(ca.sqlpower.enterprise.client.Group g)
public void addGroup(ca.sqlpower.enterprise.client.Group g,
int index)
public boolean removeGroup(ca.sqlpower.enterprise.client.Group g)
public java.util.List<ca.sqlpower.enterprise.client.Group> getGroups()
public void addReportTask(ReportTask task)
public void addReportTask(ReportTask task,
int index)
public boolean removeReportTask(ReportTask task)
public java.util.List<ReportTask> getReportTasks()
public boolean isSystemWorkspace()
public WabitObject getParent()
WabitObjectWabitObject
tree.
getParent in interface ca.sqlpower.object.SPObjectgetParent in interface WabitObjectgetParent in class AbstractWabitObjectpublic boolean allowsChildren()
allowsChildren in interface ca.sqlpower.object.SPObjectpublic void addDataSource(ca.sqlpower.sql.SPDataSource dbcs)
addDataSource in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public boolean dsAlreadyAdded(ca.sqlpower.sql.SPDataSource dbcs)
public void removeDataSource(ca.sqlpower.sql.SPDataSource dbcs)
removeDataSource in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public void addDataSourceType(ca.sqlpower.sql.JDBCDataSourceType dataSourceType)
addDataSourceType in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public void addDatabaseListChangeListener(ca.sqlpower.sql.DatabaseListChangeListener l)
addDatabaseListChangeListener in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public java.util.List<ca.sqlpower.sql.SPDataSource> getConnections()
getConnections in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public <C extends ca.sqlpower.sql.SPDataSource> java.util.List<C> getConnections(java.lang.Class<C> classType)
getConnections in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public ca.sqlpower.sql.SPDataSource getDataSource(java.lang.String name)
getDataSource in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>
public <C extends ca.sqlpower.sql.SPDataSource> C getDataSource(java.lang.String name,
java.lang.Class<C> classType)
getDataSource in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public java.util.List<ca.sqlpower.sql.JDBCDataSourceType> getDataSourceTypes()
getDataSourceTypes in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public void mergeDataSource(ca.sqlpower.sql.SPDataSource dbcs)
mergeDataSource in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public void mergeDataSourceType(ca.sqlpower.sql.JDBCDataSourceType dst)
mergeDataSourceType in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>
public void read(java.io.File location)
throws java.io.IOException
read in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>java.io.IOException
public void read(java.io.InputStream inStream)
throws java.io.IOException
read in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>java.io.IOExceptionpublic boolean removeDataSourceType(ca.sqlpower.sql.JDBCDataSourceType dataSourceType)
removeDataSourceType in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public java.net.URI getServerBaseURI()
getServerBaseURI in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public java.net.URI getMondrianServerBaseURI()
getMondrianServerBaseURI in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public void setServerBaseURI(java.net.URI serverBaseURI)
public void removeDatabaseListChangeListener(ca.sqlpower.sql.DatabaseListChangeListener l)
removeDatabaseListChangeListener in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>
public void write()
throws java.io.IOException
write in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>java.io.IOException
public void write(java.io.File location)
throws java.io.IOException
write in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>java.io.IOException
public void write(java.io.OutputStream out)
throws java.io.IOException
write in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>java.io.IOExceptionpublic void addUndoableEditListener(javax.swing.event.UndoableEditListener l)
addUndoableEditListener in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public void removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
removeUndoableEditListener in interface ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource>public void setEditorPanelModel(ca.sqlpower.object.SPObject editorPanelModel)
public ca.sqlpower.object.SPObject getEditorPanelModel()
public void addOlapQuery(OlapQuery newQuery)
public void addOlapQuery(OlapQuery newQuery,
int index)
public java.util.List<OlapQuery> getOlapQueries()
public void removeDependency(ca.sqlpower.object.SPObject dependency)
removeDependency in interface ca.sqlpower.object.SPObjectpublic java.util.List<WabitObject> getDependencies()
getDependencies in interface ca.sqlpower.object.SPObject
public <T extends ca.sqlpower.object.SPObject> T findByUuid(java.lang.String uuid,
java.lang.Class<T> expectedType)
T - The expected type of the itemuuid - The UUID of the itemexpectedType - The type of the item with the given UUID. If you are uncertain
what type of object it is, or you do not want a
ClassCastException in case the item is of the wrong type, use
WabitObject.class for this parameter.
protected boolean removeChildImpl(ca.sqlpower.object.SPObject child)
removeChildImpl in class ca.sqlpower.object.AbstractSPObject
protected void addChildImpl(ca.sqlpower.object.SPObject child,
int index)
addChildImpl in class ca.sqlpower.object.AbstractSPObjectpublic int mergeIntoWorkspace(WabitWorkspace workspace)
workspace - The workspace to move all of the current workspace's children
into.
public boolean isServerWorkspace()
public boolean isMagicDisabled()
public void setMagicDisabled(boolean magicDisabled)
public void reset()
public java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> getAllowedChildTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||