source: trunk/grails-app/conf/Config.groovy @ 444

Last change on this file since 444 was 444, checked in by duh, 14 years ago
  • extended gscf configuration for importer (importableEntities)
  • added documentation
  • Property svn:keywords set to Author Rev Date
File size: 5.0 KB
Line 
1/**
2 * Application Configuration
3 *
4 * @author  Jeroen Wesbeek
5 * @since       20100520
6 *
7 * Revision information:
8 * $Rev: 444 $
9 * $Author:$
10 * $Date: 2010-05-20 09:29:06 +0000 (do, 20 mei 2010) $
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://www.changeme.com"
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
84graphviz {
85    // graphviz installation path is dependent on OS
86    // (requirement for class diagram plugin)
87        switch (System.properties["os.name"]) {
88            case "Mac OS X":
89                // define mac path to Graphviz dot executable
90                // (install using macports: sudo port install graphviz)
91                dot.executable = "/opt/local/bin/dot"
92                break
93            default:
94                // assume the linux default path
95                dot.executable = "/usr/bin/dot"
96        }
97}
98
99// cryptography settings
100// @see WizardTaglib.groovy (encrypt)
101// @see TemplateEditorController.groovy (decrypt)
102crypto {
103        shared.secret = "U73reG*mE^\$t@7s!e%"
104}
105
106// GSCF specific configuration
107gscf {
108        domain = [
109                // importable entities
110                // use: grailsApplication.config.gscf.domain.entities
111                entities: [
112                        // dbnp.data
113                        'dbnp.data.FeatureBase',
114                        'dbnp.data.FeatureType',
115                        'dbnp.data.Ontology',
116                        'dbnp.data.Term',
117
118                        // dbnp.studycapturing
119                        'dbnp.studycapturing.Assay',
120                        'dbnp.studycapturing.AssayModule',
121                        'dbnp.studycapturing.AssayType',
122                        'dbnp.studycapturing.Compound',
123                        'dbnp.studycapturing.Event',
124                        'dbnp.studycapturing.EventGroup',
125                        'dbnp.studycapturing.Person',
126                        'dbnp.studycapturing.PersonAffilitation',
127                        'dbnp.studycapturing.PersonRole',
128                        'dbnp.studycapturing.Publication',
129                        'dbnp.studycapturing.Sample',
130                        'dbnp.studycapturing.SamplingEvent',
131                        'dbnp.studycapturing.Study',
132                        'dbnp.studycapturing.StudyPerson',
133                        'dbnp.studycapturing.Subject',
134                        'dbnp.studycapturing.Template',
135                        'dbnp.studycapturing.TemplateEntity',
136                        'dbnp.studycapturing.TemplateField',
137                        'dbnp.studycapturing.TemplateFieldListItem',
138                        'dbnp.studycapturing.TemplateFieldType'
139                ],
140
141                // importable entities
142                // use: grailsApplication.config.gscf.domain.importableEntities
143                // @see ImporterController
144                importableEntities: [
145                    study       : [name: 'Study', entity: 'dbnp.studycapturing.Study'],
146                        subject : [name: 'Subject', entity: 'dbnp.studycapturing.Subject'],
147                        sample  : [name: 'Sample', entity: 'dbnp.studycapturing.Sample']
148                ]
149        ]
150}
Note: See TracBrowser for help on using the repository browser.