public class IdvPersistenceManager extends IdvManager implements PrototypeManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
bundleIdvVersion
_more_
|
static int |
BUNDLES_ALL
The type to specify all bundles
|
static int |
BUNDLES_DATA
The type to specify the data
|
static int |
BUNDLES_DISPLAY
The type to specify the display templates
|
static int |
BUNDLES_FAVORITES
The type to specify the "Favorites" bundles
|
static java.lang.String |
CAT_GENERAL
Category name
|
static java.lang.String |
CAT_TOOLBAR
Category name
|
static java.lang.String |
CATEGORY_SEPARATOR
The separator to use when displaying categories
|
static java.lang.String |
CATEGORY_SEPARATOR_XML
The separator used in XML
|
static java.lang.String |
PROP_BUNDLEPATH
The macro for the bundle path in data paths
|
static java.lang.String |
PROP_DRIVERTIMEEND
property id
|
static java.lang.String |
PROP_DRIVERTIMESTART
property id
|
static java.lang.String |
PROP_ENSLIST
property id for ensemble list
|
static java.lang.String |
PROP_GEOSELECTION |
static java.lang.String |
PROP_TIMESLIST
property id
|
static java.lang.String |
PROP_ZIDVPATH
The macro for the zidv path in data paths
|
contents, dialog, frame, window
ARG_B64BUNDLE, ARG_B64ISL, ARG_BUNDLE, ARG_CATALOG, ARG_CHOOSER, ARG_CLEARDEFAULT, ARG_CODE, ARG_CONNECT, ARG_CURRENTTIME, ARG_DATA, ARG_DEBUG, ARG_DEFAULT, ARG_DISPLAY, ARG_DXML, ARG_FIXEDTIME, ARG_HELP, ARG_IMAGE, ARG_IMAGESERVER, ARG_INSTALLPLUGIN, ARG_ISLFILE, ARG_ISLINTERACTIVE, ARG_LISTRESOURCES, ARG_MAINCLASS, ARG_MOVIE, ARG_MSG_DEBUG, ARG_MSG_RECORD, ARG_NODEFAULT, ARG_NOERRORSINGUI, ARG_NOGUI, ARG_NOONEINSTANCE, ARG_NOPLUGINS, ARG_NOPREF, ARG_ONEINSTANCEPORT, ARG_PLUGIN, ARG_PORT, ARG_PRINTJNLP, ARG_PROPERTIES, ARG_SCRIPT, ARG_SERVER, ARG_SETFILES, ARG_SITEPATH, ARG_TEMPLATE, ARG_TEST, ARG_TESTEVAL, ARG_TRACE, ARG_TRACEONLY, ARG_USERPATH, DEFAULT_DATE_FORMAT, DEFAULT_DOCPATH, DEFAULT_TIMEZONE, FILTER_CPT, FILTER_ISL, FILTER_JNLP, FILTER_XIDV, FILTER_XIDVZIDV, FILTER_XML, FILTER_ZIDV, ID_COMMANDSTORUN, ID_DATASOURCES, ID_DISPLAYCONTROLS, ID_IDV, ID_JYTHON, ID_MESSAGE, ID_MISCHASHTABLE, ID_NCIDV_VERSION, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, NULL_STRING, PREF_APPEARANCEMODE, PREF_ARCHIVEDIR, PREF_ARCHIVENAME, PREF_AUTODISPLAYS_ENABLE, PREF_AUTODISPLAYS_SHOWGUI, PREF_AUTOSELECTDATA, PREF_CACHESIZE, PREF_CONTROLSINTABS, PREF_DATAPREFIX, PREF_DATE_FORMAT, PREF_DISTANCEUNIT, PREF_DOCACHE, PREF_EMBEDDATACHOOSERINDASHBOARD, PREF_EMBEDFIELDSELECTORINDASHBOARD, PREF_EMBEDLEGENDINDASHBOARD, PREF_EMBEDQUICKLINKSINDASHBOARD, PREF_EVENT_KEYBOARDMAP, PREF_EVENT_MOUSEMAP, PREF_EVENT_WHEELMAP, PREF_FAST_RENDER, PREF_FIELD_CACHETHRESHOLD, PREF_FILEREADDIR, PREF_FILEWRITEDIR, PREF_GEOMETRY_BY_REF, PREF_HISTORY, PREF_IMAGE_BY_REF, PREF_LARGE_REMOTE_DATA_WARN, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LEGEND_SHOWICONS, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_MEMORY, PREF_NPOT_IMAGE, PREF_OPEN_ASK, PREF_OPEN_MERGE, PREF_OPEN_REMOVE, PREF_PROJ_LIST, PREF_SAMPLINGMODE, PREF_SHOWCONTROLWINDOW, PREF_SHOWDASHBOARD, PREF_SHOWDECODEDIALOG, PREF_SHOWHIDDENFILES, PREF_SHOWQUITCONFIRM, PREF_SITEPATH, PREF_THREADS_DATA, PREF_THREADS_RENDER, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_WINDOW_SHOWTOOLBAR, PREF_ZIDV_ASK, PREF_ZIDV_DIRECTORY, PREF_ZIDV_SAVETOTMP, PROP_3DMODE, PROP_ABOUTTEXT, PROP_APPRESOURCEPATH, PROP_CHOOSERS, PROP_CHOOSERS_ALL, PROP_CONTROLDESCRIPTORS, PROP_CONTROLDESCRIPTORS_ALL, PROP_DATAHOLDERBOUNDS, PROP_DEFAULTLOCATIONS, PROP_DISPLAYLIST_GROUP, PROP_FIXFILELOCKUP, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_MAP_GLOBE_LEVEL, PROP_MAP_MAP_LEVEL, PROP_MINIMUMFRAMECYCLETIME, PROP_MONITORPORT, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWCLOCK_DASH, PROP_SHOWCLOCK_VIEW, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_USE_DISPLAYAREA, PROP_USE_TIMEDRIVER, PROP_VERSIONFILE, PROP_WINDOW_SCREENSIZEOFFSET, PROP_WINDOW_SIZEHEIGHT, PROP_WINDOW_SIZEWIDTH, PROP_WINDOW_USESCREENSIZE, SUFFIX_BAT, SUFFIX_CPT, SUFFIX_ISL, SUFFIX_JNLP, SUFFIX_RBI, SUFFIX_SH, SUFFIX_XIDV, SUFFIX_XML, SUFFIX_ZIDV
Constructor and Description |
---|
IdvPersistenceManager(IntegratedDataViewer idv)
The ctor
|
Modifier and Type | Method and Description |
---|---|
boolean |
addBundleCategory(int bundleType,
java.lang.String category)
Add the directory
|
void |
addFileMapping(java.lang.String identifier,
java.util.List files)
Add a file mapping.
|
protected boolean |
addToBundle(java.util.Hashtable data,
boolean usePersistenceManager,
java.util.List displayControls)
This method adds into the given hashtable the data sources,
display controls, view managers and extra gui state for
later persistence.
|
protected boolean |
addToBundle(java.util.Hashtable data,
java.util.List dataSources,
java.util.List displayControls,
java.util.List viewManagers,
java.lang.String jython)
Add the given state, if non null, to the bundle hashtable
|
protected java.lang.String |
applyPropertiesToBundle(java.lang.String xml)
replace any macros in the bundle xml
|
static java.lang.String |
categoriesToString(java.util.List cats)
Utility to convert a list of categories into a single string
to show the user.
|
void |
changeData(java.lang.Object[] input)
change data
|
boolean |
changeState(DataSource dataSource)
n/a
|
boolean |
changeState(DataSource dataSource,
boolean andReload)
n/a
|
void |
clearFileMapping()
Clear any filemappings.
|
void |
clearPrototype(java.lang.Class c)
Clear the prototype for the given class
|
void |
copyBundle(SavedBundle bundle,
java.util.List categories,
int bundleType)
Copy the bundle to the given category area
|
void |
decodeBase64Bundle(java.lang.String base64Bundle)
This does the actual work of converting the given base 64 encoded
bundle xml into a String and loading it in.
|
void |
decodeJnlpFile(java.lang.String filename)
Decode the jnlp file
|
void |
decodeXml(java.lang.String xml,
boolean fromCollab,
java.lang.String label,
boolean showDialog)
Using the XmlEncoder, decode the given xml string.
|
void |
decodeXml(java.lang.String xml,
boolean fromCollab,
java.lang.String xmlFile,
java.lang.String label,
boolean showDialog,
boolean shouldMerge,
java.util.Hashtable bundleProperties,
boolean didRemoveAll,
boolean letUserChangeData)
Using the XmlEncoder, decode the given xml string.
|
boolean |
decodeXmlFile(java.lang.String xmlFile,
boolean checkToRemove)
Read in the contents of the given xmlFile and evaluate the xml
|
boolean |
decodeXmlFile(java.lang.String xmlFile,
boolean checkToRemove,
boolean letUserChangeData)
Read in the contents of the given xmlFile and evaluate the xml
|
boolean |
decodeXmlFile(java.lang.String xmlFile,
boolean checkToRemove,
java.util.Hashtable bundleProperties)
Read in the contents of the given xmlFile and evaluate the xml
|
boolean |
decodeXmlFile(java.lang.String xmlFile,
java.lang.String label,
boolean checkToRemove)
Read in the contents of the given xmlFile and evaluate the xml
|
boolean |
decodeXmlFile(java.lang.String xmlFile,
java.lang.String label,
boolean checkToRemove,
boolean letUserChangeData,
java.util.Hashtable bundleProperties)
decode the xml
|
boolean |
decodeXmlFile(java.lang.String xmlFile,
java.lang.String label,
boolean checkToRemove,
java.util.Hashtable bundleProperties)
Import the bundle file
|
protected void |
decodeXmlInner(java.lang.String xml,
boolean fromCollab,
java.lang.String xmlFile,
java.lang.String label,
boolean showDialog)
This does the real work of decoding an xml bundle.
|
protected void |
decodeXmlInner(java.lang.String xml,
boolean fromCollab,
java.lang.String xmlFile,
java.lang.String label,
boolean showDialog,
boolean shouldMerge,
java.util.Hashtable bundleProperties,
boolean didRemoveAll,
boolean letUserChangeData)
This does the real work of decoding an xml bundle.
|
void |
deleteBundle(java.lang.String templateFile)
Remove the given template
|
void |
deleteBundleCategory(int bundleType,
java.lang.String category)
Delete the directory and all of its contents
that the given category represents.
|
void |
doImport(int bundleType,
java.lang.String file,
java.lang.String category)
Import the given file as the given bundle type
|
void |
doOpenDefault()
Called from the menu command to open the default bundle
|
void |
doSave()
Save the current state off to the current xidv filename
|
boolean |
doSave(java.lang.String filename)
Save the current state into the specified filename
|
boolean |
doSave(java.lang.String filename,
boolean usePersistenceManager)
Save the current state into the specified filename
|
boolean |
doSave(java.lang.String filename,
boolean usePersistenceManager,
boolean fromIsl)
Save the current state into the specified filename
|
void |
doSaveAs()
Have the user select an xidv filename and
write the current application state to it.
|
void |
doSaveAs(java.lang.String filename)
This api is called from the ISL to generate the zidv file using
the export tag with what equals zidv and filename
|
void |
doSaveAsDefault()
Called from the menu command to save the current state as the default bundle
|
void |
doSaveAsFavorite()
Have the user select an xidv filename for their favorites
|
void |
export(SavedBundle bundle,
int bundleType)
Export the bundle
|
java.lang.String |
extractBundleFromJnlp(java.lang.String filename)
This reads in the jnlp xml from the given filename.
|
static java.util.List<java.lang.String> |
fileToCategories(java.lang.String root,
java.lang.String filename)
The given filename is a full path under the given root.
|
java.util.List |
getAllCategories(int bundleType)
Get a list of all of the categories for the given bundleType
|
java.lang.String |
getBundleDirectory(int bundleType)
Get the directory that holds the given bundle type
|
static java.lang.String |
getBundleIdvVersion()
Gets the bundle idv version.
|
java.util.List<SavedBundle> |
getBundles(int bundleType)
Get the list of
SavedBundle s |
java.lang.String |
getBundleTitle(int bundleType)
Get the title to use for the given bundle type
|
java.lang.String |
getBundleXml(boolean formatXml)
This creates an xml encoded hashtable that contains the application state.
|
java.lang.String |
getBundleXml(boolean formatXml,
boolean usePersistenceManager)
This creates an xml encoded hashtable that contains the application state.
|
static java.lang.String |
getBundleXml(java.util.List<SavedBundle> bundles,
boolean includeCategoryInUrl)
Make the bundles xml
|
void |
getControlDescriptors(java.util.List l)
Create and add into the list the specical
ControlDescriptor s
that use the display templates. |
java.lang.String |
getCurrentFileName()
Get the last xidv filename for doing saves/saveas.
|
java.lang.String |
getCurrentTemplateName()
Get the CurrentTemplateName property.
|
java.util.List<SavedBundle> |
getDataSourceBundles()
Get list of data soruce bundles
|
protected java.util.List |
getDataSourcesToPersist()
Get the data sources we should persist
|
java.util.List<SavedBundle> |
getDisplayTemplates()
Get the list of display templates.
|
java.util.List<SavedBundle> |
getFavorites()
Create, if needed, and return the list of
SavedBundle s |
java.util.List |
getFavoritesCategories()
get categories
|
javax.swing.JPanel |
getFileAccessory()
Create, if needed, and return te GUI panel to put into the
file dialog when saving a file.
|
java.lang.String |
getJnlpBundle(java.lang.String xml)
A utility to create a jnlp file from the given bundle
|
java.lang.String |
getJnlpBundle(java.lang.String xml,
boolean embedBundle,
java.lang.String extraArgs)
A utility to create a jnlp file from the given bundle
|
java.util.List<SavedBundle> |
getLocalBundles()
Create, if needed, and return the list of locally saved
SavedBundle s |
java.lang.Object |
getPrototype(java.lang.Class c)
Instantiate a new object for the given class.
|
boolean |
getSaveData()
Should the visad data be saved
|
boolean |
getSaveDataSources()
Should the data sources be saved
|
boolean |
getSaveDisplays()
Should the displays be saved
|
boolean |
getSaveJython()
Should the jython be saved
|
boolean |
getSaveViewState()
Should the view state be saved
|
java.util.List |
getWritableBundles(int bundleType)
Get the list of
SavedBundle s that are writable |
java.util.List<SavedBundle> |
getXmlBundles(int type)
get list of xml bundles for the given type
|
void |
initBundleMenu(int bundleType,
javax.swing.JMenu bundleMenu)
Initialize the bundle menu
|
protected void |
instantiateFromBundle(java.util.Hashtable ht,
boolean fromCollab,
LoadBundleDialog loadDialog,
boolean shouldMerge,
java.util.Hashtable bundleProperties,
boolean didRemoveAll,
boolean letUserChangeData)
The given Hashtable contains the objects taht were saved
in the xml bundle file.
|
DisplayControl |
instantiateFromTemplate(java.lang.String templateFile)
Create the DisplayControl from the bundle in the given templateFile
|
void |
loadB64Bundle(java.lang.String base64Bundle)
This converts the given base 64 encoded xml bundle into an
xml String and loads it in.
|
javax.swing.JComboBox |
makeCategoryBox()
make category widget
|
DataSourceResults |
makeDataSourceFromXml(java.lang.String dataSourceXml)
This creates a new data source from the xml encoded representation
of a persisted data source.
|
void |
moveBundle(SavedBundle bundle,
java.util.List categories,
int bundleType)
Move the bundle to the given category area
|
void |
moveCategory(java.util.List fromCategories,
java.util.List toCategories,
int bundleType)
Move the bundle category
|
void |
moveOrCopyBundle(SavedBundle bundle,
java.util.List categories,
int bundleType,
boolean move)
Move or copy the bundle to the given category area, depending on the given argument.
|
boolean |
open(SavedBundle bundle)
Open the given bundle
|
boolean |
open(SavedBundle bundle,
boolean askToRemove)
Open the given bundle
|
void |
rename(SavedBundle bundle,
int bundleType)
Rename the bundle
|
void |
saveDataSource(DataSource dataSource) |
void |
saveDisplayControl(DisplayControl displayControl)
Write out the given display control
|
void |
saveDisplayControl(DisplayControl displayControl,
java.io.File file)
Write out the given display control to te given file
|
void |
saveDisplayControlFavorite(DisplayControl displayControl,
java.lang.String templateName)
Prompt the user for a name and write out the given display control
as a bundle into the user's .unidata/idv/displaytemplates directory.
|
void |
setAddWindows(boolean bl)
create window in the ISL offscreen mode
|
void |
setCurrentFileName(java.lang.String f)
Set the last xidv filename for doing saves/saveas.
|
void |
setFileMapping(java.util.List ids,
java.util.List files)
Define one or more file mappings.
|
static java.util.List |
stringToCategories(java.lang.String category)
Retur a list of categories from the given string
|
void |
writePrototype(java.lang.Object object)
Save off the given object as a prototype
|
getArgsManager, getCollabManager, getColorTableManager, getDataManager, getIdv, getIdvChooserManager, getIdvClass, getIdvProjectionManager, getIdvUIManager, getImageGenerator, getInstallManager, getJythonManager, getPersistenceManager, getPreferenceManager, getProperty, getProperty, getProperty, getPublishManager, getResourceManager, getStateManager, getStationModelManager, getStore, getVMManager, logException, showNormalCursor, showWaitCursor, waitUntilDisplaysAreDone, waitUntilDisplaysAreDone
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, getWindowTitle, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing
public static final java.lang.String PROP_BUNDLEPATH
public static final java.lang.String PROP_ZIDVPATH
public static final java.lang.String PROP_TIMESLIST
public static final java.lang.String PROP_DRIVERTIMESTART
public static final java.lang.String PROP_DRIVERTIMEEND
public static final java.lang.String PROP_GEOSELECTION
public static final java.lang.String PROP_ENSLIST
public static final java.lang.String CAT_GENERAL
public static final java.lang.String CAT_TOOLBAR
public static final int BUNDLES_ALL
public static final int BUNDLES_FAVORITES
public static final int BUNDLES_DISPLAY
public static final int BUNDLES_DATA
public static final java.lang.String CATEGORY_SEPARATOR
public static final java.lang.String CATEGORY_SEPARATOR_XML
public static java.lang.String bundleIdvVersion
public IdvPersistenceManager(IntegratedDataViewer idv)
idv
- The IDVpublic void getControlDescriptors(java.util.List l)
ControlDescriptor
s
that use the display templates.l
- List of control descriptors to add topublic void setFileMapping(java.util.List ids, java.util.List files)
ids
- List of String idsfiles
- List of lists of filenamespublic void clearFileMapping()
public void setAddWindows(boolean bl)
public void addFileMapping(java.lang.String identifier, java.util.List files)
identifier
- Id use to identify a data sourcefiles
- List of files (or urls).public javax.swing.JPanel getFileAccessory()
public static java.lang.String categoriesToString(java.util.List cats)
cats
- List of categories - String.public static java.util.List stringToCategories(java.lang.String category)
category
- The string representation of the categoriespublic static java.util.List<java.lang.String> fileToCategories(java.lang.String root, java.lang.String filename)
root
- File rootfilename
- File path to splitpublic static java.lang.String getBundleXml(java.util.List<SavedBundle> bundles, boolean includeCategoryInUrl)
bundles
- List of saved bundleincludeCategoryInUrl
- Should we add the category to the file namepublic java.util.List<SavedBundle> getXmlBundles(int type)
type
- bundle typepublic java.util.List<SavedBundle> getFavorites()
SavedBundle
spublic java.lang.String getCurrentFileName()
public void setCurrentFileName(java.lang.String f)
f
- The filenamepublic void doSaveAs()
public void doSaveAs(java.lang.String filename)
public void moveCategory(java.util.List fromCategories, java.util.List toCategories, int bundleType)
fromCategories
- The category to movetoCategories
- Where to move tobundleType
- What type are we dealing withpublic void export(SavedBundle bundle, int bundleType)
bundle
- The bundlebundleType
- What typepublic void rename(SavedBundle bundle, int bundleType)
bundle
- The bundlebundleType
- What typepublic void copyBundle(SavedBundle bundle, java.util.List categories, int bundleType)
bundle
- The bundlecategories
- The category locationbundleType
- What typepublic void moveBundle(SavedBundle bundle, java.util.List categories, int bundleType)
bundle
- The bundlecategories
- The category locationbundleType
- What typepublic void moveOrCopyBundle(SavedBundle bundle, java.util.List categories, int bundleType, boolean move)
bundle
- The bundlecategories
- The category locationbundleType
- What typemove
- Move or copypublic javax.swing.JComboBox makeCategoryBox()
public void doImport(int bundleType, java.lang.String file, java.lang.String category)
bundleType
- What typefile
- The filecategory
- The categorypublic java.util.List getFavoritesCategories()
public void doSaveAsFavorite()
public void doSave()
public void doSaveAsDefault()
public void doOpenDefault()
public boolean doSave(java.lang.String filename)
filename
- bundle file name to write to. If this ends in
".jnlp" then we base 64 encode the bundle and wrap it in
a jnlp file.public java.lang.String getJnlpBundle(java.lang.String xml)
xml
- The bundle xmlpublic java.lang.String getJnlpBundle(java.lang.String xml, boolean embedBundle, java.lang.String extraArgs)
xml
- The bundle xmlembedBundle
- Embed the b64 encoded bundle right in the jnlpextraArgs
- extra jnlp argspublic boolean doSave(java.lang.String filename, boolean usePersistenceManager)
filename
- bundle file name to write to. If this ends in
".jnlp" then we base 64 encode the bundle and wrap it in
a jnlp file.usePersistenceManager
- If true then we use the persistence manager
to determine what is to be saved.public boolean doSave(java.lang.String filename, boolean usePersistenceManager, boolean fromIsl)
filename
- bundle file name to write to. If this ends in
".jnlp" then we base 64 encode the bundle and wrap it in
a jnlp file.usePersistenceManager
- If true then we use the persistence manager
to determine what is to be saved.fromIsl
- If this api is invoked from the ISL script and save a zidv
bundle it will call the nogui api to save all display datapublic java.lang.String getBundleXml(boolean formatXml) throws java.lang.Exception
formatXml
- Should the result be formatted (i.e., new lines and indents
for easy reading).java.lang.Exception
- the exceptionpublic java.lang.String getBundleXml(boolean formatXml, boolean usePersistenceManager) throws java.lang.Exception
formatXml
- Should the result be formatted (i.e., new lines and indents
for easy reading).usePersistenceManager
- If true then use the persistence manager to decide what is savedjava.lang.Exception
- the exceptionpublic DisplayControl instantiateFromTemplate(java.lang.String templateFile)
templateFile
- File path to the templatepublic java.util.List getAllCategories(int bundleType)
bundleType
- What type of bundle (e.g., favorites)public java.lang.String getBundleTitle(int bundleType)
bundleType
- The type of bundle (e.g., favorites)public java.lang.String getBundleDirectory(int bundleType)
bundleType
- The type of bundle (e.g., favorites)public java.util.List<SavedBundle> getBundles(int bundleType)
SavedBundle
sbundleType
- The type of bundle (e.g., favorites)public void initBundleMenu(int bundleType, javax.swing.JMenu bundleMenu)
bundleType
- The type of bundle (e.g., favorites)bundleMenu
- The menupublic java.util.List getWritableBundles(int bundleType)
SavedBundle
s that are writablebundleType
- The type of bundle (e.g., favorites)public void saveDataSource(DataSource dataSource)
dataSource
- data source to savepublic void saveDisplayControlFavorite(DisplayControl displayControl, java.lang.String templateName)
displayControl
- The display control to writetemplateName
- Possibly null initial name for the templatepublic void saveDisplayControl(DisplayControl displayControl)
displayControl
- The display control to writepublic void saveDisplayControl(DisplayControl displayControl, java.io.File file)
displayControl
- The display control to writefile
- The file to write topublic java.util.List<SavedBundle> getLocalBundles()
SavedBundle
spublic java.util.List<SavedBundle> getDataSourceBundles()
public java.util.List<SavedBundle> getDisplayTemplates()
public boolean open(SavedBundle bundle)
bundle
- The bundle to openpublic boolean open(SavedBundle bundle, boolean askToRemove)
bundle
- bundleaskToRemove
- askpublic void deleteBundle(java.lang.String templateFile)
templateFile
- The template file to removepublic void deleteBundleCategory(int bundleType, java.lang.String category)
bundleType
- The type of bundle (e.g., favorites)category
- The category (really a directory path)public boolean addBundleCategory(int bundleType, java.lang.String category)
bundleType
- The type of bundle (e.g., favorites)category
- The category (really a directory path)protected java.util.List getDataSourcesToPersist()
protected boolean addToBundle(java.util.Hashtable data, boolean usePersistenceManager, java.util.List displayControls) throws java.lang.Exception
data
- The table to put things intousePersistenceManager
- Should we use the settings of this managerdisplayControls
- The display controls to addjava.lang.Exception
- When something bad happensprotected boolean addToBundle(java.util.Hashtable data, java.util.List dataSources, java.util.List displayControls, java.util.List viewManagers, java.lang.String jython)
data
- Holds the bundle statedataSources
- List of data sources to adddisplayControls
- List of displays to addviewManagers
- List of view managers to addjython
- jython to addpublic void loadB64Bundle(java.lang.String base64Bundle)
base64Bundle
- The base64 encoded xml bundlepublic void decodeBase64Bundle(java.lang.String base64Bundle)
base64Bundle
- The base64 encoded xml bundlepublic void decodeJnlpFile(java.lang.String filename)
filename
- the name of the filepublic java.lang.String extractBundleFromJnlp(java.lang.String filename)
filename
- The name of the jnlp file.public boolean decodeXmlFile(java.lang.String xmlFile, boolean checkToRemove)
xmlFile
- The bundle filecheckToRemove
- Should check the user preference to remove all/show dialog or not.public boolean decodeXmlFile(java.lang.String xmlFile, boolean checkToRemove, boolean letUserChangeData)
xmlFile
- filecheckToRemove
- check to removeletUserChangeData
- Set the 'user changes data flag' on decodingpublic boolean decodeXmlFile(java.lang.String xmlFile, boolean checkToRemove, java.util.Hashtable bundleProperties)
xmlFile
- The bundle filecheckToRemove
- Should check the user preference to remove all/show dialog or not.bundleProperties
- set of propertiespublic boolean decodeXmlFile(java.lang.String xmlFile, java.lang.String label, boolean checkToRemove)
xmlFile
- The bundle filelabel
- If non-null ten use this as te load dialog labelcheckToRemove
- Should check the user preference to remove all/show dialog or not.public boolean decodeXmlFile(java.lang.String xmlFile, java.lang.String label, boolean checkToRemove, java.util.Hashtable bundleProperties)
xmlFile
- file namelabel
- description for dialogcheckToRemove
- Should we ask the user about removing data/displaysbundleProperties
- set of propertiespublic boolean decodeXmlFile(java.lang.String xmlFile, java.lang.String label, boolean checkToRemove, boolean letUserChangeData, java.util.Hashtable bundleProperties)
xmlFile
- filelabel
- labelcheckToRemove
- check to removeletUserChangeData
- if true then ask user to change data pathsbundleProperties
- set of propertiespublic void decodeXml(java.lang.String xml, boolean fromCollab, java.lang.String label, boolean showDialog)
This method wraps a call to decodeXmlInner, setting LOADINGXML flags, etc.
xml
- The bundle xmlfromCollab
- Was this bundle from the collaboration facility.
If it was we treat it differently.label
- The label to use in the dialogshowDialog
- Should the dialog be shownpublic void decodeXml(java.lang.String xml, boolean fromCollab, java.lang.String xmlFile, java.lang.String label, boolean showDialog, boolean shouldMerge, java.util.Hashtable bundleProperties, boolean didRemoveAll, boolean letUserChangeData)
This method wraps a call to decodeXmlInner, setting LOADINGXML flags, etc.
xml
- The bundle xmlfromCollab
- Was this bundle from the collaboration facility.
If it was we treat it differently.xmlFile
- The filename this came from. May be null.label
- The label to use in the dialogshowDialog
- Should the dialog be shownshouldMerge
- Should we merge the windows/views in the bundle into the existing windowsbundleProperties
- set of propertiesdidRemoveAll
- Should we remove all data/displaysletUserChangeData
- Should popup the data path dialogprotected void decodeXmlInner(java.lang.String xml, boolean fromCollab, java.lang.String xmlFile, java.lang.String label, boolean showDialog)
xml
- The xml bundlefromCollab
- Was this bundle from the collaboration facility.
If it was we treat it differently.xmlFile
- The filename where the xml came from - may be null.label
- The label to show in the guishowDialog
- Should the loadbundle dialog be shownprotected java.lang.String applyPropertiesToBundle(java.lang.String xml)
xml
- bundle xmlprotected void decodeXmlInner(java.lang.String xml, boolean fromCollab, java.lang.String xmlFile, java.lang.String label, boolean showDialog, boolean shouldMerge, java.util.Hashtable bundleProperties, boolean didRemoveAll, boolean letUserChangeData)
xml
- The xml bundlefromCollab
- Was this bundle from the collaboration facility.
If it was we treat it differently.xmlFile
- The filename where the xml came from - may be null.label
- The label to show in the guishowDialog
- Should the loadbundle dialog be shownshouldMerge
- Should we merge the windows/views in the bundle into the existing windowsbundleProperties
- set of propertiesdidRemoveAll
- Was remove all called before we decoded the xmlletUserChangeData
- Should popup data path change dialogpublic void changeData(java.lang.Object[] input)
input
- the inputpublic boolean changeState(DataSource dataSource)
dataSource
- the data sourcepublic boolean changeState(DataSource dataSource, boolean andReload)
dataSource
- the data sourceandReload
- and reload the dataprotected void instantiateFromBundle(java.util.Hashtable ht, boolean fromCollab, LoadBundleDialog loadDialog, boolean shouldMerge, java.util.Hashtable bundleProperties, boolean didRemoveAll, boolean letUserChangeData) throws java.lang.Exception
ht
- Contains the unpersisted objectsfromCollab
- Was this bundle from the collaboration facility.
If it was we treat it differently.loadDialog
- The load bundle dialogshouldMerge
- Should we merge the windows/views in the bundle into the existing windowsbundleProperties
- set of propertiesdidRemoveAll
- Was remove all called before we decoded the xmlletUserChangeData
- Should popup data path change dialogjava.lang.Exception
- the exceptionpublic DataSourceResults makeDataSourceFromXml(java.lang.String dataSourceXml)
dataSourceXml
- The xml encoded data source representationpublic boolean getSaveViewState()
public boolean getSaveDisplays()
public boolean getSaveDataSources()
public boolean getSaveJython()
public boolean getSaveData()
public java.lang.String getCurrentTemplateName()
public void writePrototype(java.lang.Object object)
writePrototype
in interface PrototypeManager
object
- Object to write as prototypepublic void clearPrototype(java.lang.Class c)
c
- classpublic java.lang.Object getPrototype(java.lang.Class c)
getPrototype
in interface PrototypeManager
c
- classpublic static java.lang.String getBundleIdvVersion()