[Mondrian] Mondrian Workbench Menu Plugin API Proposal
wgorman at pentaho.com
Tue Apr 1 09:48:51 EDT 2008
Pentaho is currently working on adding publishing capability to the
Mondrian Workbench. This capability will allow a schema designer to
easily publish their Mondrian schema to Pentaho's BI Platform. Once a
schema has been published to the platform, the schema can be hosted as
an XMLA service, and end users will be able to create new JPivot views
based on the schema.
To avoid a direct coupling of this new feature with the Mondrian
Workbench, I'm proposing some basic modifications that allow plugins to
be added to Workbench's menu system. Below are the modifications I've
made and their purpose with regards to this new publishing capability.
I'm open to suggestions regarding these changes. Your thoughts are
#1 Added the Workbench.loadMenubarPlugins() method which gets called in
Workbench's constructor. This method looks for the properties file
"/workbench_plugins.properties" on the classpath, and instantiates any
listed plugins that implement the interface "WorkbenchMenubarPlugin",
passing the Workbench object and MenuBar object to the plugin.
Publish Plugin Usage: the publish plugin inserts itself into the menubar
right below the File -> Save As... Menu item.
#2 Added the public method Workbench.getWorkbenchProperty(), and made
the Workbench.setWorkbenchProperty() and
Workbench.storeWorkbenchProperties() methods public so that plugins can
get and set properties.
Publish Plugin Usage: the publish plugin stores previous values such as
publish url / etc.
#3 Added the Workbench.getCurrentSchemaExplorer() method which returns
the current schema object.
Publish Plugin Usage: the publish plugin uses the SchemaExplorer object
to obtain the schema file, and other schema meta data.
#4 made the Workbench.saveMenuItemActionPerformed() public.
Publish Plugin Usage: the publish plugin detects if the schema needs
saving, and asks the user if they would like to save their changes
More information about the Mondrian