Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Adding plug in modules

mlist edited this page Apr 12, 2013 · 8 revisions

OLF modules are more or less identical to grails plug-ins. The only difference is that developers implementing an OLF module are aware of the concepts for extending OLF's menu, adding tabs or adding operations to existing data objects, as well as for creating new add-ins.

This being said, we want to go step by step through the creation of a new very simplistic OLF module for lab stock management.

##Creating a grails plug-in The creation of a grails plug-in is very well described in the [grails user documentation] (http://grails.org/doc/latest/guide/plugins.html#creatingAndInstallingPlugins). We will assume that you have configured grails correctly.

grails create-plugin OpenLabStocks

A new folder OpenLabStocks will appear that contains all you need to get started except of a few things.

You need to manually create a folder for the content modules OLF will need later under grails-app/

creating a folder for modules

In the next step we want to add the OpenLabBackend Module to our plug-in to have the necessary interfaces and base functionality available for us. We therefore add the plug-in dependency to the BuildConfig.groovy found under grails-app/conf

grails.plugin.location.backend = "../OpenLabBackend"

In the same way we integrate our new OpenLabStock module within OpenLabFrontend:

grails.plugin.location.backend = "../OpenLabBackend"
grails.plugin.location.geneTracker = "../GeneTracker"
grails.plugin.location.storage = "../Storage"
grails.plugin.location.barcode = "../OpenLabBarcode"
grails.plugin.location.attachments = "../OpenLabAttachments"
grails.plugin.location.stock = "../OpenLabStock"

Clone this wiki locally