Changeset 1635
- Timestamp:
- Mar 15, 2011, 2:06:25 PM (11 years ago)
- Location:
- trunk/grails-app/conf
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrap.groovy
r1590 r1635 29 29 30 30 def init = { servletContext -> 31 // grom what's happening32 "bootstrapping application".grom()31 // Grom a development message 32 if (String.metaClass.getMetaMethod("grom")) "bootstrapping application".grom() 33 33 34 34 // get configuration … … 61 61 // from other modules. Part of gscf ticket #185 62 62 if (config.modules) { 63 // register SAM REST methods64 "Registering SAM REST methods".grom()63 // Grom a development message 64 if (String.metaClass.getMetaMethod("grom")) "Registering SAM REST methods".grom() 65 65 CommunicationManager.registerModule('gscf', config.grails.serverURL, config.modules) 66 66 CommunicationManager.registerRestWrapperMethodsFromSAM() … … 102 102 103 103 def destroy = { 104 "stopping application...".grom() 104 // Grom a development message 105 if (String.metaClass.getMetaMethod("grom")) "stopping application...".grom() 105 106 } 106 107 } -
trunk/grails-app/conf/BuildConfig.groovy
r1590 r1635 24 24 grailsPlugins() 25 25 grailsHome() 26 // mavenRepo "http://nmcdsp.org:8080/nexus-webapp-1.7.2/content/repositories/releases/"27 mavenRepo "http://nexus.nmcdsp.org/content/repositories/releases"28 26 grailsCentral() 29 27 … … 31 29 // from public Maven repositories 32 30 //mavenLocal() 33 //mavenCentral() 31 mavenCentral() 32 mavenRepo 'http://repository.jboss.org/maven2/' 33 mavenRepo "http://nexus.nmcdsp.org/content/repositories/releases" 34 34 //mavenRepo "http://snapshots.repository.codehaus.org" 35 35 //mavenRepo "http://repository.codehaus.org" … … 39 39 dependencies { 40 40 // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg. 41 42 41 // runtime 'mysql:mysql-connector-java:5.1.5' 42 build 'org.codehaus.gpars:gpars:0.11' 43 43 } 44 44 } -
trunk/grails-app/conf/DatabaseUpgrade.groovy
r1602 r1635 47 47 if (sql.firstRow("SELECT count(*) as total FROM template_field WHERE templatefieldentity='dbnp.studycapturing.Study' AND templatefieldname='Description'").total > 0) { 48 48 // grom that we are performing the upgrade 49 "performing database upgrade: study description".grom()49 if (String.metaClass.getMetaMethod("grom")) "performing database upgrade: study description".grom() 50 50 51 51 // database upgrade required … … 96 96 if (sql.firstRow("SELECT count(*) as total FROM information_schema.columns WHERE columns.table_schema::text = 'public'::text AND columns.table_name='study' AND column_name='description' AND data_type != 'text'").total > 0) { 97 97 // grom that we are performing the upgrade 98 "performing database upgrade: study description to text".grom()98 if (String.metaClass.getMetaMethod("grom")) "performing database upgrade: study description to text".grom() 99 99 100 100 // database upgrade required … … 121 121 sql.eachRow("SELECT columns.table_name as tablename FROM information_schema.columns WHERE columns.table_schema::text = 'public'::text AND column_name='template_text_fields_elt' AND data_type != 'text';") 122 122 { row -> 123 "performing database upgrade: ${row.tablename} template_text_fields_string/elt to text".grom()123 if (String.metaClass.getMetaMethod("grom")) "performing database upgrade: ${row.tablename} template_text_fields_string/elt to text".grom() 124 124 try { 125 125 // change the datatype of text fields to text … … 147 147 (sql.firstRow("SELECT * FROM assay_module WHERE notify IS NULL") || sql.firstRow("SELECT * FROM assay_module WHERE open_in_frame IS NULL")) 148 148 ) { 149 "performing database upgrade: assay_module default values for boolean fields".grom()149 if (String.metaClass.getMetaMethod("grom")) "performing database upgrade: assay_module default values for boolean fields".grom() 150 150 151 151 try { … … 175 175 if (db == "org.postgresql.Driver") { 176 176 if (sql.firstRow("SELECT * FROM pg_constraint WHERE contype='mapping_column_name_key'")) { 177 "performing database upgrade: mapping column name constraint".grom()177 if (String.metaClass.getMetaMethod("grom")) "performing database upgrade: mapping column name constraint".grom() 178 178 try { 179 179 // Check if constraint still exists … … 196 196 // do we need to perform this update? 197 197 if (sql.firstRow("SELECT * FROM information_schema.columns WHERE columns.table_name='mapping_column' AND columns.column_name='value' AND is_nullable='NO'")) { 198 "performing database upgrade: making mapping_column::value nullable".grom()198 if (String.metaClass.getMetaMethod("grom")) "performing database upgrade: making mapping_column::value nullable".grom() 199 199 200 200 try { … … 220 220 // see if table assay contains a column external_assayid 221 221 if (sql.firstRow("SELECT * FROM information_schema.columns WHERE columns.table_name='assay' AND columns.column_name='external_assayid'")) { 222 "performing database upgrade: dropping column 'external_assayid' from table 'assay'".grom()222 if (String.metaClass.getMetaMethod("grom")) "performing database upgrade: dropping column 'external_assayid' from table 'assay'".grom() 223 223 224 224 try { … … 233 233 // see if table study contains a column code which is not nullable 234 234 if (sql.firstRow("SELECT * FROM information_schema.columns WHERE columns.table_name='study' AND columns.column_name='code' AND is_nullable='NO'")) { 235 "performing database upgrade: dropping column 'code' from table 'study'".grom()235 if (String.metaClass.getMetaMethod("grom")) "performing database upgrade: dropping column 'code' from table 'study'".grom() 236 236 237 237 try { … … 245 245 // Load all studies and save them again. This prevents errors on saving later 246 246 if (updated) { 247 "re-saving studies...".grom()247 if (String.metaClass.getMetaMethod("grom")) "re-saving studies...".grom() 248 248 249 249 Study.list().each { study -> 250 "re-saving study: ${study}".grom()250 if (String.metaClass.getMetaMethod("grom")) "re-saving study: ${study}".grom() 251 251 study.save() 252 252 } -
trunk/grails-app/conf/dbnp/configuration/BootStrapAuthentication.groovy
r1588 r1635 19 19 */ 20 20 public static void initDefaultAuthentication(springSecurityService) { 21 "setting up default authentication".grom() 21 // Grom a development message 22 if (String.metaClass.getMetaMethod("grom")) "setting up default authentication".grom() 22 23 23 24 // user work variable … … 53 54 } 54 55 } 55 56 //package dbnp.configuration57 //import dbnp.authentication.*58 //import org.codehaus.groovy.grails.commons.ConfigurationHolder59 //60 ///**61 // * @Author Jeroen Wesbeek <work@osx.eu>62 // * @Since 2010111163 // *64 // * Revision information:65 // * $Rev$66 // * $Author$67 // * $Date$68 // */69 //class BootStrapAuthentication {70 // /**71 // * set up the initial roles and users if required72 // * @visibility public73 // * @void74 // */75 // public static void initDefaultAuthentication(springSecurityService) {76 // "setting up default authentication".grom()77 //78 // // user work variable79 // def user=null80 //81 // // get configuration82 // def config = ConfigurationHolder.config83 //84 // // create the admin role85 // def adminRole = SecRole.findByAuthority('ROLE_ADMIN') ?: new SecRole(authority: 'ROLE_ADMIN').save()86 //87 // // iterate through default users, see88 // // - grails-app/conf/config-environment.properties89 // // - ~/.grails-config/environment-gscf.properties90 // config.authentication.users.each { key, values ->91 // // make sure we do not add duplicate users92 // if (!SecUser.findAllByUsername(values.username)) {93 // // create user instance94 // user = new SecUser(95 // username:values.username,96 // password:springSecurityService.encodePassword( values.password , values.username ),97 // email:values.email,98 // userConfirmed: true,99 // adminConfirmed: true100 // ).save(failOnError: true)101 //102 // // is this user an administrator?103 // if (values.administrator == 'true') {104 // SecUserSecRole.create(user, adminRole, true)105 // }106 // }107 // }108 // }109 //} -
trunk/grails-app/conf/dbnp/configuration/ExampleStudies.groovy
r1594 r1635 66 66 */ 67 67 public static void addExampleStudies(dbnp.authentication.SecUser owner, dbnp.authentication.SecUser otherUser) { 68 "inserting initial studies".grom() 68 // Grom a development message 69 if (String.metaClass.getMetaMethod("grom")) "inserting initial studies".grom() 69 70 70 71 // get configuration -
trunk/grails-app/conf/dbnp/configuration/ExampleTemplates.groovy
r1604 r1635 23 23 */ 24 24 public static void initTemplateOntologies() { 25 "inserting initial ontologies".grom() 25 // Grom a development message 26 if (String.metaClass.getMetaMethod("grom")) "inserting initial ontologies".grom() 26 27 27 28 // If running in development or test mode, add ontologies manually to speed up development and allow running offline … … 84 85 */ 85 86 public static void initTemplates() { 86 "inserting initial templates".grom() 87 // Grom a development message 88 if (String.metaClass.getMetaMethod("grom")) "inserting initial templates".grom() 87 89 88 90 def genderField = new TemplateField(
Note: See TracChangeset
for help on using the changeset viewer.