|
JRubik v0.6 | |||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
JRubik is a swing UI dor OLAP datasources.
The application encapsulated and distributed using a simple plugin system.
The aplication main controller implements the PluginListener
interface. It allows, to the plugins registered as listeners, to throw diferent request to the contrller defined in this interface. Rubik informs to all the registered objects that implement the RubikListener
interface.
The plugins must implement the Plugin
interface. PluginImpl
is an abstract class
with basic implementation of this interface. This class is good starting point
for build a new plugin, extending this class and writing the method:
public Object getPluginObject(PluginListener pluginListener) throws PluginException
.
The plugins are stored in the directory: pathApp/resources/lib/plugins
For a plugin contained in this directory, in order to be a valid plugin the Manifest file contained in the plugin jar file
must to have a section called RubikPlugin with the following attributes:
PluginName
: plugin namePluginType
: integer plugin typePluginLocale
: locale package namePluginBaseClass
: base class for the pluginPluginIcon
: plugin icon pathThis is a sample Manifest
file:
Name: RubikPlugin
PluginName: action_basicStat
PluginType: -1
PluginLocale: es.aeat.eett.plugins.action_basicStat.locale.LocalizationBundle
PluginBaseClass: es.aeat.eett.plugins.action_basicStat.Action_basicStat
PluginIcon: es/aeat/etss/plugins/mdxMenu_ScrollMenu/estadisticas_nav.gif
Nowadays there are 8 plugin types:
ShowSum
needs a scrollBasicStat
and a tableRubikPlugin
. If they are installed, shows in the BarStatus
the sum of the table selected cells.
MdxMenu_Base
jSplitPane
left component. They could be managed (loaded, shown and hiden) by other plugins.
jSplitPane
right component, on the jTabbedPane
. They could be managed (shown and hiden) by other plugins.ToolBar
plugin, always loadedJMenu
plugin is always loaded
jSplitPane
right component, on the jTabbedPane
The application uses the log4j framework. The RubikAppender class (extends AppenderSkeleton) takes the "es.aeat.eett" category logger and changes the log level to .INFO level if the level is higher than INFO. It register him self as a listener for events of this category and propagates the received events using the'RubikAppenderListener' interface to all the regustered listeners.
By default, the application have to log points: the statusbar and the application controller.
If the controller receives a message with a priority level higher or equal to ERROR_INT it shows the error window with this message.
It registers as RubikAppender
listener:
RubikAppender.getInstance().addRubikAppenderListener(this);
and as an olapModel listener:
Rubik.getInstance().getOlapModel().addModelChangeListener(this);
When the OlapModel sends a filter change event and obtains the query filter and if it isnīt empty is shown, In tother case it shows the ready message.
When the RubikAppender informs about this change:
Example: If we create the plugin org.xx.myPlugin, for showing messages on the statusbar and error window, we have to accomplish the following steps:
Category cat = Logger.getLogger("org.xx.myPlugin");
if(!Level.INFO.isGreaterOrEqual(cat.getEffectiveLevel()))
cat.setLevel(Level.INFO);
cat.addAppender(RubikAppender.getInstance());
Usage:
To show a message: logger.warn("Message text");
Waiting message: logger.inof("Waiting message text");
Error message: logger.error(...);
- Changes to the orginal package Jars:
Changes on the mondrian-x.x.jar: mondrian.util.Format added spanish support: Locale_SPANISH
|
JRubik v0.6 | |||||||||
PREV NEXT | FRAMES NO FRAMES |