Changeset 92 for trunk/grails-app/conf


Ignore:
Timestamp:
Jan 19, 2010, 2:25:45 PM (14 years ago)
Author:
duh
Message:
  • added sample template data in bootstrap
  • upgraded jQuery
  • improved study capture wizard
  • fixed selenium test
Location:
trunk/grails-app/conf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r34 r92  
    11import org.codehaus.groovy.grails.commons.GrailsApplication
    22import grails.util.GrailsUtil
     3import dbnp.studycapturing.*
     4import intient.nimble.InstanceGenerator
    35
    46/**
    57 * Application Bootstrapper
    6  * @Author  Jeroen Wesbeek
    7  * @Since   20091021
     8 * @Author Jeroen Wesbeek
     9 * @Since 20091021
    810 *
    911 * Revision information:
     
    1315 */
    1416class BootStrap {
    15      def init = { servletContext ->     
    16          // check if we're in development
    17          if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) {
    18              printf("development bootstrapping....\n\n");
    19              
    20          }
    21      }
    22      def destroy = {
    23      }
     17        def init = {servletContext ->
     18                if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) {
     19                        printf("development bootstrapping....\n\n");
     20
     21                        // ontologies
     22                        def speciesOntology = new Ontology(
     23                                name: 'Species',
     24                                shortName: 'Species',
     25                                url: 'http://www.obofoundry.org/cgi-bin/detail.cgi?id=ncbi_taxonomy'
     26                        ).save()
     27
     28                        // terms
     29                        def mouseTerm = new Term(
     30                                name: 'Mus musculus',
     31                                ontology: speciesOntology,
     32                                accession: '10090'
     33                        ).save()
     34                        def humanTerm = new Term(
     35                                name: 'Homo sapiens',
     36                                ontology: speciesOntology,
     37                                accession: '9606'
     38                        ).save()
     39
     40                        // create system user
     41                        /*
     42                        def systemUser = userService.createUser(InstanceGenerator.user(
     43                                username: 'system',
     44                                pass: 'system',
     45                                passConfirm: 'system',
     46                                enabled: true
     47                        ))
     48                        */
     49
     50                        // define template fields
     51                        def genotypeTemplateField = new TemplateSubjectField(
     52                                name: 'Genotype',
     53                                type: TemplateFieldType.STRINGLIST
     54                        ).save()
     55
     56                        // Mouse template
     57                        def mouseTemplate = new Template(
     58                                name: 'Mouse'
     59                        ).addToSubjectFields(genotypeTemplateField).save()
     60                }
     61        }
     62
     63        def destroy = {
     64        }
    2465}
  • trunk/grails-app/conf/NimbleBootStrap.groovy

    r54 r92  
    4747    // Execute any custom Nimble related BootStrap for your application below
    4848    if (nimble.User.count() == 0) {
     49        println ".bootstrapping nimble"
    4950
    5051        // Create example User account
Note: See TracChangeset for help on using the changeset viewer.