Changeset 394


Ignore:
Timestamp:
Feb 20, 2010, 2:49:40 PM (15 years ago)
Author:
gav
Message:

Change TaskService create* to save* methods.

Location:
trunk/grails-app
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/EntryDetailedController.groovy

    r298 r394  
    107107
    108108    def save = {
    109         def result = taskService.createEntry(params)
     109        def result = taskService.saveEntry(params)
    110110
    111111        if(!result.error) {
  • trunk/grails-app/controllers/TaskDetailedController.groovy

    r390 r394  
    521521    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_TaskManager', 'ROLE_TaskUser'])
    522522    def save = {
    523         def result = taskService.create(params)
     523        def result = taskService.save(params)
    524524
    525525        if(!result.error) {
  • trunk/grails-app/services/CreateBulkDataService.groovy

    r291 r394  
    175175                    targetStartDate: today]
    176176
    177             taskResult = taskService.create(p)
     177            taskResult = taskService.save(p)
    178178        }
    179179
     
    198198                    durationMinute: durationMinute1]
    199199
    200             entryResult = taskService.createEntry(p)
     200            entryResult = taskService.saveEntry(p)
    201201
    202202        }
  • trunk/grails-app/services/CreateDataService.groovy

    r393 r394  
    656656                targetStartDate: dateUtilService.today]
    657657
    658         taskResult = taskService.create(p)
     658        taskResult = taskService.save(p)
    659659
    660660        //Task #2
     
    668668                parentTask: Task.get(1)]
    669669
    670         taskResult = taskService.create(p)
     670        taskResult = taskService.save(p)
    671671
    672672        //Task #3
     
    680680                parentTask: Task.get(1)]
    681681
    682         taskResult = taskService.create(p)
     682        taskResult = taskService.save(p)
    683683
    684684        //Task #4
     
    692692                parentTask: Task.get(1)]
    693693
    694         taskResult = taskService.create(p)
     694        taskResult = taskService.save(p)
    695695
    696696        //Task #5
     
    703703                targetStartDate: dateUtilService.today - 6]
    704704
    705         taskResult = taskService.create(p)
     705        taskResult = taskService.save(p)
    706706
    707707        //Task #6
     
    714714                targetStartDate: dateUtilService.today]
    715715
    716         taskResult = taskService.create(p)
     716        taskResult = taskService.save(p)
    717717    }
    718718
     
    746746                durationMinute: 20]
    747747
    748         entryResult = taskService.createEntry(p)
     748        entryResult = taskService.saveEntry(p)
    749749
    750750        //Entry #2
     
    754754                durationMinute: 30]
    755755
    756         entryResult = taskService.createEntry(p)
     756        entryResult = taskService.saveEntry(p)
    757757
    758758        //Entry #3
     
    762762                durationMinute: 20]
    763763
    764         entryResult = taskService.createEntry(p)
     764        entryResult = taskService.saveEntry(p)
    765765    }
    766766
  • trunk/grails-app/services/TaskService.groovy

    r291 r394  
    3333    * @returns A map containing result.error=true (if any error) and result.taskInstance.
    3434    */
    35     def create(params) {
     35    def save(params) {
    3636        Task.withTransaction { status ->
    3737            def result = [:]
     
    122122
    123123        } //end withTransaction
    124     } // end create()
     124    } // end save()
    125125
    126126    /**
     
    170170
    171171        // Create the sub task and return the result.
    172         result = create(p)
     172        result = save(p)
    173173
    174174    } // end createSubTask()
     
    179179    * @returns A map containing result.error=true (if any error), result.entryInstance and result.taskId.
    180180    */
    181     def createEntry(params) {
     181    def saveEntry(params) {
    182182        Task.withTransaction { status ->
    183183            def result = [:]
     
    244244
    245245        } //end withTransaction
    246     } // end create()
     246    } // end saveEntry()
    247247
    248248    /**
Note: See TracChangeset for help on using the changeset viewer.