RAMADDA has a plugin facility that enables one to add new kinds of entry types, new content views, etc. In the RAMADDA home directory there is a "plugins" sub-directory. When RAMADDA starts up it loads all of the files in the plugins directory.
When you install a new plugin you need to restart RAMADDA.
The plugins can be built from source or are available at the
Geode Systems RAMADDA site.
To install a plugin just download the file and copy it to the RAMADDA home directory plugins directory.
There are a core set of plugins that are released in the allplugins.jar file. This file can get installed during installation or can be installed later. Once the allplugins.jar is installed any new versions of RAMADDA will automatically update this plugin.
How plugins work
RAMADDA determines what to do with a plugin file by looking at its file name.
If the file is a .zip file RAMADDA will
unzip the files in the zip file and load each one as a plugin.
If the file is a jar file it will crack open the jar file and look at each contained file.
It handles the files in the following way:
Any ".properties" files are loaded as system properties.
RAMADDA supports multiple language translations.
To enable this set the property:
ramadda.languages.enabled = true
Once enabled there should be a number of languages listed in the settings menu:
Any plugin file that
ends with ".pack" (e.g., sp.pack) is loaded as a language pack.
See an example.pack file
at the Github site. There is documentation in the file.
The .pack files can also be added to your RAMADDA home directory under the directory:
The language ID should be unhyphenated, e.g.: "es", "fr", etc.
If the language already exists in the set of predefined languages then the additional file
will be appended to the predefined file.
There are a number of wiki tags that can be used
This sets the language for the page:
This is a block of text that is only shown for the respective language:
+lang one of es en fr etc.
Show language switching buttons in the page:
:langswitcher <comma separated list of ids or none for all>
Any file that ends with "template.html" is treated as an html
More documentation is available here.
If you have an "htdocs/somename" directory in your .jar plugin file then HTML content
in that directory can be served up by RAMADDA.
If you have a file "htdocs/somename/index.html" then RAMADDA will include a link
to that file from the main Help page. RAMADDA will extract the page title from the index.html file.
This is how this user guide is distributed.
This allows you to include documentation within your plugin.
Any .class file is loaded via a classloader.
Some classes are special in that RAMADDA needs to know about them and instantiate them. This includes any harvesters, User authenticators, page decorators, etc. You need to define the full class paths for these classes in a file that ends with "classes.txt", e.g.:
If the class is an instanceof a org.ramadda.repository.auth.UserAuthenticator then the class is instantiated and it is used to handle user login and authentication.
- If the class is an instanceof org.ramadda.repository.AdminHandler then the class is instantiated. You can use this to add new apis into the repository and to add admin configuration options.
If the file ends with "api.xml" then it defines new web application apis.
If the file ends with "types.xml" it defines new repository entry types.
If the file ends with "outputhandlers.xml" it defines new output handlers.
If the file ends with "metadata.xml" it defines new metadata types.
If the file ends with ".py" then it defines new jython routines that are loaded into any jython interpreter (e.g., used by the repository script entry type).
If the file ends with ".sql" then the file is evaluated at startup to define new database schemas.
Adding map layers
You can integrate map layers from external Web Map Servers (WMS) through the plugin mechanism.
The file chinamaps.properties.txt
has an example.
Remove the ".txt" suffix and copy the properties file to your RAMADDA plugin directory. The file has instructions on
how to specify the WMS layers.