root/trunk/grails-app/conf/Config.groovy @ 1155

Revision 1155, 8.0 KB (checked in by work@…, 3 years ago)

- resolving issue #195, sample generation madness. This was partly caused by the intoduction of ParentEvent? and only happened in strange situations which normally should not happen in a serious study. But of course, it should never happen.
- also extended the sample name with eventGroupName

  • Property svn:keywords set to Author Date Rev
Line 
1import dbnp.rest.common.CommunicationManager
2
3/**
4 * Application Configuration
5 *
6 * @author Jeroen Wesbeek
7 * @since 20100520
8 *
9 * Revision information:
10 * $Rev$
11 * $Author$
12 * $Date$
13 */
14
15// locations to search for config files that get merged into the main config
16// config files can either be Java properties files or ConfigSlurper scripts
17
18// grails.config.locations = [ "classpath:${appName}-config.properties",
19//                             "classpath:${appName}-config.groovy",
20//                             "file:${userHome}/.grails/${appName}-config.properties",
21//                             "file:${userHome}/.grails/${appName}-config.groovy"]
22
23// if(System.properties["${appName}.config.location"]) {
24//    grails.config.locations << "file:" + System.properties["${appName}.config.location"]
25// }
26grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
27grails.mime.use.accept.header = false
28grails.mime.types = [html: ['text/html', 'application/xhtml+xml'],
29        xml: ['text/xml', 'application/xml'],
30        text: 'text/plain',
31        js: 'text/javascript',
32        rss: 'application/rss+xml',
33        atom: 'application/atom+xml',
34        css: 'text/css',
35        csv: 'text/csv',
36        all: '*/*',
37        json: ['application/json', 'text/json'],
38        form: 'application/x-www-form-urlencoded',
39        multipartForm: 'multipart/form-data'
40]
41// The default codec used to encode data with ${}
42grails.views.default.codec = "none" // none, html, base64
43grails.views.gsp.encoding = "UTF-8"
44grails.converters.encoding = "UTF-8"
45
46// enabled native2ascii conversion of i18n properties files
47grails.enable.native2ascii = true
48
49// set per-environment serverURL stem for creating absolute links
50environments {
51        development {
52                grails.serverURL = "http://localhost:8080/${appName}"
53
54                CommunicationManager.SAMServerURL = 'http://localhost:8182/sam'
55                CommunicationManager.registerRestWrapperMethodsGSCFtoSAM()
56        }
57        ci {
58                // used by build script
59                grails.serverURL = "http://ci.gscf.nmcdsp.org"
60
61                CommunicationManager.SAMServerURL = 'http://ci.sam.nmcdsp.org'
62                CommunicationManager.registerRestWrapperMethodsGSCFtoSAM()
63        }
64        test {
65                // used by build script
66                grails.serverURL = "http://test.gscf.nmcdsp.org"
67
68                CommunicationManager.SAMServerURL = 'http://test.sam.nmcdsp.org'
69                CommunicationManager.registerRestWrapperMethodsGSCFtoSAM()
70        }
71        dbnptest {
72                // used by build script
73                grails.serverURL = "http://test.dbnp.org"
74
75                CommunicationManager.SAMServerURL = 'http://test.sam.dbnp.org'
76                CommunicationManager.registerRestWrapperMethodsGSCFtoSAM()
77        }
78        dbnpdemo {
79                // used by build script
80                grails.serverURL = "http://demo.dbnp.org"
81
82                CommunicationManager.SAMServerURL = 'http://demo.sam.dbnp.org'
83                CommunicationManager.registerRestWrapperMethodsGSCFtoSAM()
84        }
85        production {
86                grails.serverURL = "http://www.nmcdsp.org"
87
88                CommunicationManager.SAMServerURL = 'http://sam.nmcdsp.org'
89                CommunicationManager.registerRestWrapperMethodsGSCFtoSAM()
90        }
91        www {
92                // used by build script
93                grails.serverURL = "http://www.nmcdsp.org"
94
95                CommunicationManager.SAMServerURL = 'http://sam.nmcdsp.org'
96                CommunicationManager.registerRestWrapperMethodsGSCFtoSAM()
97        }
98}
99
100// log4j configuration
101log4j = {
102        // Example of changing the log pattern for the default console
103        // appender:
104        //
105        //appenders {
106        //    console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
107        //}
108
109        error 'org.codehaus.groovy.grails.web.servlet',  //  controllers
110                'org.codehaus.groovy.grails.web.pages', //  GSP
111                'org.codehaus.groovy.grails.web.sitemesh', //  layouts
112                'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
113                'org.codehaus.groovy.grails.web.mapping', // URL mapping
114                'org.codehaus.groovy.grails.commons', // core / classloading
115                'org.codehaus.groovy.grails.plugins', // plugins
116                'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
117                'org.springframework',
118                'org.hibernate'
119
120        warn 'org.mortbay.log'
121
122        //info 'org.codehaus.groovy.grails.web.servlet',
123        //       'org.codehaus.groovy.grails.plugins'
124
125        //debug 'org.codehaus.groovy.grails.plugins'
126}
127
128graphviz {
129        // graphviz installation path is dependent on OS
130        // (requirement for class diagram plugin)
131        switch (System.properties["os.name"]) {
132                case "Mac OS X":
133                        // define mac path to Graphviz dot executable
134                        // (install using macports: sudo port install graphviz)
135                        dot.executable = "/opt/local/bin/dot"
136                        break
137                default:
138                        // assume the linux default path
139                        dot.executable = "/usr/bin/dot"
140        }
141}
142
143// cryptography settings
144// @see WizardTaglib.groovy (encrypt)
145// @see TemplateEditorController.groovy (decrypt)
146crypto {
147        shared.secret = "U73reG*mE^\$t@7s!e%"
148}
149
150// GSCF specific configuration
151gscf {
152        domain = [
153                // importable entities
154                // use: grailsApplication.config.gscf.domain.entities
155                entities: [
156                        // dbnp.data
157                        'dbnp.data.FeatureBase',
158                        'dbnp.data.FeatureType',
159                        'dbnp.data.Ontology',
160                        'dbnp.data.Term',
161
162                        // dbnp.studycapturing
163                        'dbnp.studycapturing.Assay',
164                        'dbnp.studycapturing.AssayModule',
165                        'dbnp.studycapturing.AssayType',
166                        'dbnp.studycapturing.Compound',
167                        'dbnp.studycapturing.Event',
168                        'dbnp.studycapturing.EventGroup',
169                        'dbnp.studycapturing.Person',
170                        'dbnp.studycapturing.PersonAffilitation',
171                        'dbnp.studycapturing.PersonRole',
172                        'dbnp.studycapturing.Publication',
173                        'dbnp.studycapturing.Sample',
174                        'dbnp.studycapturing.SamplingEvent',
175                        'dbnp.studycapturing.Study',
176                        'dbnp.studycapturing.StudyPerson',
177                        'dbnp.studycapturing.Subject',
178                        'dbnp.studycapturing.Template',
179                        'dbnp.studycapturing.TemplateEntity',
180                        'dbnp.studycapturing.TemplateField',
181                        'dbnp.studycapturing.TemplateFieldListItem',
182                        'dbnp.studycapturing.TemplateFieldType'
183                ],
184
185                // importable entities
186                // use: grailsApplication.config.gscf.domain.importableEntities
187                // @see ImporterController
188                importableEntities: [
189                        event: [name: 'Event', entity: 'dbnp.studycapturing.Event'],
190                        sample: [name: 'Sample', entity: 'dbnp.studycapturing.Sample'],
191                        study: [name: 'Study', entity: 'dbnp.studycapturing.Study'],
192                        subject: [name: 'Subject', entity: 'dbnp.studycapturing.Subject'],
193                        samplingevent: [name: 'SamplingEvent', entity: 'dbnp.studycapturing.SamplingEvent']
194
195                ]
196        ]
197}
198
199// jquery plugin
200grails.views.javascript.library = "jquery"
201
202// Needed for the Spring Security Core plugin:
203grails.plugins.springsecurity.userLookup.userDomainClassName = 'dbnp.authentication.SecUser'
204grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'dbnp.authentication.SecUserSecRole'
205grails.plugins.springsecurity.authority.className = 'dbnp.authentication.SecRole'
206grails.plugins.springsecurity.password.algorithm = 'SHA-256'
207grails.plugins.springsecurity.password.encodeHashAsBase64 = true
208grails.plugins.springsecurity.dao.reflectionSaltSourceProperty = 'username' // Use the persons username as salt for encryption
209grails.plugins.springsecurity.securityConfigType = grails.plugins.springsecurity.SecurityConfigType.Annotation
210grails.plugins.springsecurity.successHandler.targetUrlParameter = 'spring-security-redirect'
211
212// Needed for the (copy of) the Spring Security UI plugin
213grails.plugins.springsecurity.ui.forgotPassword.emailFrom = 'gscf@dbnp.org'
214grails.plugins.springsecurity.ui.forgotPassword.emailSubject = 'Password reset GSCF'
215
216// Make sure the different controllers provided by springsecurity.ui are only accessible by administrators
217// NB: the RegisterController is used for forgotten passwords. It should be accessible by anyone
218grails.plugins.springsecurity.controllerAnnotations.staticRules = [
219        '/user/**': ['ROLE_ADMIN'],
220        '/role/**': ['ROLE_ADMIN'],
221        '/aclclass/**': ['ROLE_ADMIN'],
222        '/aclentry/**': ['ROLE_ADMIN'],
223        '/aclobjectidentity/**': ['ROLE_ADMIN'],
224        '/aclsid/**': ['ROLE_ADMIN'],
225        '/persistentlogin/**': ['ROLE_ADMIN'],
226        '/registrationcode/**': ['ROLE_ADMIN'],
227        '/requestmap/**': ['ROLE_ADMIN'],
228        '/securityinfo/**': ['ROLE_ADMIN']
229]
230
231// Needed for sending emails
232grails {
233        mail {
234                host = "smtp.gmail.com"
235                port = 465
236                username = "gscfproject@gmail.com"
237                password = "gscf2010"
238                props = [
239                        "mail.smtp.auth": "true",
240                        "mail.smtp.socketFactory.port": '465',
241                        "mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
242                        "mail.smtp.socketFactory.fallback": "false"
243                ]
244        }
245}
Note: See TracBrowser for help on using the browser.