BasePluginDispatcher: The BasePluginDispatcher class

Description Usage Arguments Fields and Methods Definitions Run the plugin dispatcher without BASE (standalone) Author(s)

Description

Package: aroma.Base
Class BasePluginDispatcher

Object
~~|
~~+--BasePluginDispatcher

Directly known subclasses:

public static class BasePluginDispatcher
extends Object

See static method main() for help.

Usage

1

Arguments

...

Not used.

Fields and Methods

Methods:

buildReports Build reports from RSP templates.
main Static method to start a BASE plugin.
patchCode Sources all R source files in the patch directory.

Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clone, detach, equals, extend, finalize, gc, getEnvironment, getFields, getInstantiationTime, getStaticInstance, hasField, hashCode, ll, load, objectSize, print, registerFinalizer, save

Definitions

The plugin directory (path) is the directory where the plugin source code and the runBasePluginDispatcher script is located. Each plugin should have a unique plugin path.

The working directory (path) is the directory in which the plugin is evaluated by BASE. Contrary to the plugin directory, it is not possible to know the path to the working directory on before hand.

Run the plugin dispatcher without BASE (standalone)

While developing a plugin for BASE, it is possible to test the plugin by running it on a local machine without BASE. To do this, prepare the following:

Next is to run the plugin. Start R in the working directory you created above, alternatively, use setwd("~/work/12345/") to change it in R. Then, in R, do

1
2
3
   library(aroma.Base)
   BasePluginDispatcher$main(pluginPath="~/plugins/helloWorld/")
  

This will load all *.R files in the plugin path, read BASE data from file .inputData.base, call onParameters() as soon as the plugin parameters section is read, update parameters accordingly, continue to read the rest of the data file and wrap the data up in a BaseFile object, then call then onRun() function. Any output written by the plugin (to standard output of standard error) will be outputted to standard error, that is, in the example, the output will be seen on the screen, cf. when running on a BASE server such output will end up under "Plug-in output". if valid BASE data object are returned by onRun(), they are automatically written to a BASE file named .outputData.base.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)


HenrikBengtsson/aroma.Base documentation built on May 7, 2019, 1:51 a.m.