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

Revision 1069, 7.8 KB (checked in by work@…, 3 years ago)

- improved grom windows support
- updated grom version to 0.1.14
- added debug log4 loglevel to gscf project (outcommented)
- upgraded gscf grom plugin usage to 0.1.14

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