Changeset 1178 for trunk/grails-app/conf/BootStrapStudies.groovy
- Timestamp:
- Nov 19, 2010, 1:19:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrapStudies.groovy
r1163 r1178 15 15 import grails.util.GrailsUtil 16 16 import dbnp.rest.common.CommunicationManager 17 import org.codehaus.groovy.grails.commons.* 18 17 19 18 20 class BootStrapStudies { … … 21 23 * Add example studies. This function is meant to be called only in development mode 22 24 */ 23 24 25 public static void addExampleStudies(dbnp.authentication.SecUser owner, dbnp.authentication.SecUser otherUser ) { 25 26 "inserting initial studies".grom() 27 28 // get configuration 29 def config = ConfigurationHolder.config 26 30 27 31 // Look up the used ontologies which should be in the database by now … … 463 467 .with { if (!validate()) { errors.each { println it} } else save()} 464 468 465 // sam urls are in config.groovy, where they belong...466 // if that doesn't work for you, make it work... now you're467 // breaking the other environments....468 //def samURL = GrailsUtil.environment == GrailsApplication.ENV_PRODUCTION ? 'http://sam.nmcdsp.org' : 'http://localhost:8182/sam'469 def nmcdspURL = GrailsUtil.environment == GrailsApplication.ENV_PRODUCTION ? 'http://metabolomics.nmcdsp.org' : 'http://localhost:8183/nmcdsp'470 def samURL = CommunicationManager.SAMServerURL471 472 469 // Add SAM assay reference 473 470 def clinicalModule = new AssayModule( 474 471 name: 'SAM module for clinical data', 475 472 platform: 'clinical measurements', 476 url: samURL473 url: config.modules.sam.url 477 474 ).with { if (!validate()) { errors.each { println it} } else save()} 478 475 … … 481 478 name: 'Metabolomics module', 482 479 platform: 'GCMS/LCMS', 483 url: nmcdspURL480 url: config.modules.metabolomics.url 484 481 ).with { if (!validate()) { errors.each { println it} } else save()} 485 482
Note: See TracChangeset
for help on using the changeset viewer.