State Restoring Methods

The remaining three methods are used to save and restore the internal state of your plugin. These methods are called prior to the promptForOptions and invokeAlgorithm methods, as well as when the FlowJo workspace is saved or reopened. The plugin implementer should implement these methods so that any internal fields are initialized or restored as needed. It is important to note that the instance of your plugin object that receives the promptForOptions invocation may not be the same object that receives the invokeAlgorithm call. To retain any internal field values needed by your plugin, you should use the symmetric getElement / setElement methods to remember the state of your plugin. This separation is necessary so your plugin can work in FlowJo Enterprise’s client/server architecture, as well as to allow your plugin to execute in a dedicated plugin engine separate from the FlowJo application. The state maintenance methods are described in more detail below:


SElement getElement()

This method returns an XML element that represents the state of the plugin that should be saved and restored. The returned XML element is used to retain configuration settings input by the user in the promptForOptions method, to be used later by the invokeAlgorithm or when a FlowJo workspace is saved. FlowJo provides a concrete implementation of org.w3c.dom.Element, named SElement, that provides a number of convenience methods to aid in the creation and modification of the XML element.


void setElement(SElement xmlElement)

This method takes as input an XML element as produced by the getElement() method described above, to be used to restore the internal fields of the plugin object. The setElement method should read the same attributes that were written in the getElement method.


String getVersion()

This method returns a version string for your plugin, that can be used by your plugin code to enforce compatibility or automatically upgrade different versions of your plugin. FlowJo’s plugin framework does not use the returned version string, but will ensure the version string is retained when the plugin node is saved in a FlowJo workspace.

results matching ""

    No results matching ""