ucar.unidata.idv.publish
Class PublishManager

java.lang.Object
  extended by ucar.unidata.ui.WindowHolder
      extended by ucar.unidata.idv.IdvManager
          extended by ucar.unidata.idv.publish.PublishManager
All Implemented Interfaces:
ActionListener, EventListener, IdvConstants

public class PublishManager
extends IdvManager

This manages the nascent publishing facility within the IDV. This whole framework needs to be thought out a bit more but for now we have on instance of a publisher: InfoceteraBlogger that knows how to post articles and files to an infocetera web log server.

Author:
IDV development team

Field Summary
static String ATTR_CLASS
          Xml element "class" attribute name.
static String ATTR_NAME
          _more_
static String TAG_PUBLISHER
          Xml element "publisher" tag name
 
Fields inherited from class ucar.unidata.ui.WindowHolder
contents, dialog, frame, window
 
Fields inherited from interface ucar.unidata.idv.IdvConstants
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_MAX_PERMGENSIZE, 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_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_MAX_PERMGENSIZE, 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, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, 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 Summary
PublishManager(IntegratedDataViewer idv)
          Create me with the IDV
 
Method Summary
 void configurePublisher(IdvPublisher publisher)
          _more_
 void deletePublisher(IdvPublisher publisher)
          _more_
 void doPublish(String title, String filePath)
          Publish the file
 void doPublish(String title, String filePath, String properties)
          Publish the file
 IdvPublisher getPublisher()
          Gets a publisher.
 List getPublishers()
          Get the list of Publishers
static List<TwoFacedObject> getPublisherTypes(IntegratedDataViewer idv, Element root)
          Process the given xml, instantiating a list of IdvPublishers
 JComboBox getSelector(String fixedId)
          _more_
 void initMenu(JMenu menu)
          _more_
 void initPublisher()
          Initialize me
 boolean isPublishingEnabled()
          Do we have any publishers
 void makeMenu(JMenu menu)
          _more_
 JComboBox makeSelector()
          _more_
 void newPublisher()
          _more_
 boolean publishCheck()
          If publishing is not enabled then show a user message and return false
 void publishContent(String file, ViewManager fromViewmanager, JComboBox box)
          _more_
 void publishIslImage(ImageGenerator imageGenerator, Element tag, Image image)
          _more_
 void publishMessage()
          Publish a message
 void publishMessage(String properties)
          Publish a message with the given properties(?)
 void publishObject(String desc, Object object)
          This xml encoders the given object as a xidv bundle file and publishes it with the given description
 void publishState()
          Publish the idv bundle
 void publishState(String properties)
          Publish the idv bundle
 void publishXml(String desc, Element root)
          Publish the xml
 void publishXml(String desc, Element root, String fileExt)
          Publish the xml
 
Methods inherited from class ucar.unidata.idv.IdvManager
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
 
Methods inherited from class ucar.unidata.ui.WindowHolder
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, getWindowTitle, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_PUBLISHER

public static final String TAG_PUBLISHER
Xml element "publisher" tag name

See Also:
Constant Field Values

ATTR_CLASS

public static final String ATTR_CLASS
Xml element "class" attribute name. This is the class name of a concrete derived class of this class.

See Also:
Constant Field Values

ATTR_NAME

public static final String ATTR_NAME
_more_

See Also:
Constant Field Values
Constructor Detail

PublishManager

public PublishManager(IntegratedDataViewer idv)
Create me with the IDV

Parameters:
idv - The IDV
Method Detail

initMenu

public void initMenu(JMenu menu)
_more_

Parameters:
menu - _more_

getSelector

public JComboBox getSelector(String fixedId)
_more_

Parameters:
fixedId - _more_
Returns:
_more_

makeSelector

public JComboBox makeSelector()
_more_

Returns:
_more_

publishContent

public void publishContent(String file,
                           ViewManager fromViewmanager,
                           JComboBox box)
_more_

Parameters:
file - _more_
fromViewmanager - _more_
box - _more_

publishIslImage

public void publishIslImage(ImageGenerator imageGenerator,
                            Element tag,
                            Image image)
_more_

Parameters:
imageGenerator - _more_
tag - _more_
image - _more_

makeMenu

public void makeMenu(JMenu menu)
_more_

Parameters:
menu - _more_

configurePublisher

public void configurePublisher(IdvPublisher publisher)
_more_

Parameters:
publisher - _more_

deletePublisher

public void deletePublisher(IdvPublisher publisher)
_more_

Parameters:
publisher - _more_

newPublisher

public void newPublisher()
_more_


isPublishingEnabled

public boolean isPublishingEnabled()
Do we have any publishers

Returns:
Can we publish any content

publishCheck

public boolean publishCheck()
If publishing is not enabled then show a user message and return false

Returns:
Is publishing enabled

getPublisher

public IdvPublisher getPublisher()
Gets a publisher.

Returns:
The first publisher in the list of publishers (for now)

publishObject

public void publishObject(String desc,
                          Object object)
This xml encoders the given object as a xidv bundle file and publishes it with the given description

Parameters:
desc - The description
object - The object to encode and publish

publishXml

public void publishXml(String desc,
                       Element root)
Publish the xml

Parameters:
desc - The description
root - The xml root to publish

publishXml

public void publishXml(String desc,
                       Element root,
                       String fileExt)
Publish the xml

Parameters:
desc - The description
root - The xml root to publish
fileExt - The file extension

publishMessage

public void publishMessage()
Publish a message


publishMessage

public void publishMessage(String properties)
Publish a message with the given properties(?)

Parameters:
properties - The properties

publishState

public void publishState()
Publish the idv bundle


publishState

public void publishState(String properties)
Publish the idv bundle

Parameters:
properties - The properties

doPublish

public void doPublish(String title,
                      String filePath)
Publish the file

Parameters:
title - Title to use
filePath - The file

doPublish

public void doPublish(String title,
                      String filePath,
                      String properties)
Publish the file

Parameters:
title - Title to use
filePath - The file
properties - The properties

initPublisher

public void initPublisher()
Initialize me


getPublisherTypes

public static List<TwoFacedObject> getPublisherTypes(IntegratedDataViewer idv,
                                                     Element root)
Process the given xml, instantiating a list of IdvPublishers

Parameters:
idv - The idv
root - Root of the publishers.xml file
Returns:
List of publishers

getPublishers

public List getPublishers()
Get the list of Publishers

Returns:
The publishers