← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5834: Send comfirm message back to mobile client

 

------------------------------------------------------------
revno: 5834
committer: Long <thanhlongngo1988>
branch nick: dhis2
timestamp: Tue 2012-01-31 14:12:47 +0700
message:
  Send comfirm message back to mobile client
modified:
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java	2012-01-13 16:03:02 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileOrganisationUnitController.java	2012-01-31 07:12:47 +0000
@@ -34,7 +34,10 @@
 public class MobileOrganisationUnitController
     extends AbstractMobileController
 {
-
+	private static final String ACTIVITY_REPORT_UPLOADED = "activity_report_uploaded";
+    
+    private static final String DATASET_REPORT_UPLOADED = "dataset_report_uploaded";
+	
     @Autowired
     private ActivityReportingService activityReportingService;
 
@@ -88,11 +91,12 @@
      * @throws NotAllowedException if the {@link DataSetValue} is invalid
      */
     @RequestMapping( method = RequestMethod.POST, value = "     {id}/dataSets" )
-    @ResponseStatus( value = HttpStatus.NO_CONTENT )
-    public void saveDataSetValues( @PathVariable int id, @RequestBody DataSetValue dataSetValue )
+    @ResponseBody
+    public String saveDataSetValues( @PathVariable int id, @RequestBody DataSetValue dataSetValue )
         throws NotAllowedException
     {
         facilityReportingService.saveDataSetValues( getUnit( id ), dataSetValue );
+        return DATASET_REPORT_UPLOADED;
     }
 
     /**
@@ -103,11 +107,12 @@
      *         is invalid
      */
     @RequestMapping( method = RequestMethod.POST, value = "{id}/activities" )
-    @ResponseStatus( value = HttpStatus.NO_CONTENT )
-    public void saveActivityReport( @PathVariable int id, @RequestBody ActivityValue activityValue )
+    @ResponseBody
+    public String saveActivityReport( @PathVariable int id, @RequestBody ActivityValue activityValue )
         throws NotAllowedException
     {
         activityReportingService.saveActivityReport( getUnit( id ), activityValue );
+        return ACTIVITY_REPORT_UPLOADED;
     }
 
     @RequestMapping( method = RequestMethod.POST, value = "{id}/activitiyplan" )