Changeset 1421
- Timestamp:
- Jan 20, 2011, 6:13:33 PM (13 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/importer/ImporterController.groovy
r1419 r1421 36 36 // (see http://www.grails.org/plugin/grom) 37 37 def pluginManager 38 def AuthenticationService38 def authenticationService 39 39 def fileService 40 40 def ImporterService … … 90 90 flow.pages = [ 91 91 [title: 'Import file'], 92 [title: ' Properties'],93 [title: ' Mappings'],92 [title: 'Assign properties'], 93 [title: 'Check imported data'], 94 94 //[title: 'Imported'], 95 [title: ' Persist']95 [title: 'Done'] 96 96 ] 97 97 flow.cancel = true; … … 127 127 128 128 flow.page = 1 129 flow.studies = Study.findAllWhere(owner: AuthenticationService.getLoggedInUser())129 flow.studies = Study.findAllWhere(owner: authenticationService.getLoggedInUser()) 130 130 flow.importer_importableentities = grailsApplication.config.gscf.domain.importableEntities 131 131 … … 140 140 // Trying to import data into an existing study? 141 141 if (flow.importer_study) 142 if (flow.importer_study.canWrite( AuthenticationService.getLoggedInUser())) {142 if (flow.importer_study.canWrite(authenticationService.getLoggedInUser())) { 143 143 if (fileImportPage(flow, params)) { 144 144 success() … … 521 521 //def (validatedSuccesfully, updatedEntities, failedToPersist) = 522 522 //try { 523 ImporterService.saveDatamatrix(flow.importer_study, flow.importer_importeddata )523 ImporterService.saveDatamatrix(flow.importer_study, flow.importer_importeddata, authenticationService) 524 524 525 525 //} -
trunk/grails-app/services/dbnp/importer/ImporterService.groovy
r1417 r1421 31 31 32 32 class ImporterService { 33 def AuthenticationService33 def authenticationService 34 34 35 35 boolean transactional = true … … 276 276 * @param datamatrix two dimensional array containing entities with values read from Excel file 277 277 */ 278 static saveDatamatrix(Study study, datamatrix ) {278 static saveDatamatrix(Study study, datamatrix, authenticationService) { 279 279 def validatedSuccesfully = 0 280 280 def entitystored = null … … 288 288 switch (entity.getClass()) { 289 289 case Study: println "Persisting Study `" + entity + "`: " 290 entity.owner = AuthenticationService.getLoggedInUser()290 entity.owner = authenticationService.getLoggedInUser() 291 291 persistEntity(entity) 292 292 break
Note: See TracChangeset
for help on using the changeset viewer.