Ignore:
Timestamp:
Mar 30, 2012, 3:35:57 PM (10 years ago)
Author:
work@…
Message:
  • implemented getSamplesForAssay api call
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/api/ApiService.groovy

    r2198 r2199  
    6161     * call and not to expose domain internals
    6262     *
    63      * @param elements
     63     * @param elements (List or Set)
    6464     * @return
    6565     */
    66     def flattenDomainData(List elements) {
     66    def flattenDomainData(elements) {
    6767        def items = []
    6868
     
    7474            // add token
    7575            if (it.respondsTo('getToken')) {
     76                // some domain methods implement getToken...
    7677                item['token'] = it.getToken()
     78            } else if (it.respondsTo('giveUUID')) {
     79                // ...while other implement giveUUID
     80                item['token'] = it.giveUUID()
    7781            } else {
     82                // and others don't at all... :S
    7883                item['id'] = it.id
    7984            }
Note: See TracChangeset for help on using the changeset viewer.