- Timestamp:
- Jul 13, 2010, 5:49:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/groovy/dbnp/rest/common/CommunicationManager.groovy
r648 r649 28 28 def public static SAMServerURL = "http://localhost:8182/sam" 29 29 def public static GSCFServerURL = "http://localhost:8080/gscf" 30 def public static DSPServerURL = "http://localhost:8080/gscf" 30 31 31 32 … … 194 195 // "class":"data.SimpleAssay", "externalAssayID":"1", "id":1, "measurements":null, "unit":"Insulin", "inSerum":false, 195 196 // "name":"test Simple Assay 1", "referenceValues":"test Reference Values 1"], dbnp.studycapturing.Assay : 1]]] 196 def closure = { map -> 197 def studies = [] 198 def assays = [] 197 def closure = { map -> 198 def studies = [] 199 def assays = [] 199 200 def studiesHQ = "from dbnp.studycapturing.Study as s where s.code=?" 200 201 map['studyIds'].each { studies.add( dbnp.studycapturing.Study.find(studiesHQ,[it]) ) } … … 212 213 213 214 215 /** 216 * This method creates on run time new methods for accessing Grails views that SAM provides for GSCF. 217 * This method should be called in grails-app/conf/BootStrap.groovy in the GSCF module. 218 */ 219 public static registerRestWrapperMethodsGSCFtoDSP() { 220 def url = DSPServerURL 221 addRestWrapper( url, 'isUser', ['username','password'] ) 222 addRestWrapper( url, 'listStudies', ['username','password'] ) 223 addRestWrapper( url, 'listStudySamples', ['username','password','study_token'] ) 224 addRestWrapper( url, 'getStudy', ['username','password','study_token'] ) 225 addRestWrapper( url, 'getStudySample', ['username','password','study_token','sample_token'] ) 226 addRestWrapper( url, 'isUser', ['username','password'] ) 227 } 228 229 230 214 231 }
Note: See TracChangeset
for help on using the changeset viewer.