-
Notifications
You must be signed in to change notification settings - Fork 0
/
TransmartGnomeGrailsPlugin.groovy
41 lines (33 loc) · 1.18 KB
/
TransmartGnomeGrailsPlugin.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import org.springframework.context.ApplicationContext
import org.transmart.plugin.gnome.GnomeConfig
class TransmartGnomeGrailsPlugin {
private static final String TRANSMART_EXTENSIONS_REGISTRY_BEAN_NAME = 'transmartExtensionsRegistry'
String version = '18.1-SNAPSHOT'
String grailsVersion = '2.5 > *'
String author = 'Burt Beckwith'
String authorEmail = '[email protected]'
String description = 'gNOME Integration'
String documentation = 'TODO'
String title = 'Transmart gNOME Plugin'
String license = 'APACHE'
def organization = [name: 'TODO', url: 'TODO']
def issueManagement = [url: 'TODO']
def scm = [url: 'TODO']
def doWithSpring = {
gnomeConfig(GnomeConfig)
}
def doWithApplicationContext = { ApplicationContext ctx ->
GnomeConfig gnomeConfig = ctx.gnomeConfig
if (!gnomeConfig.enabled) {
return
}
if (!ctx.containsBean(TRANSMART_EXTENSIONS_REGISTRY_BEAN_NAME)) {
return
}
String extensionId = 'transmart-gnome'
String resourcesUrl = '/gnome/loadScripts'
String bootstrapFunction = 'gnomeBootstrap'
ctx.getBean(TRANSMART_EXTENSIONS_REGISTRY_BEAN_NAME).registerAnalysisTabExtension(
extensionId, resourcesUrl, bootstrapFunction)
}
}