← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5436: Changed arg order in AggregatedValueController

 

------------------------------------------------------------
revno: 5436
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-12-15 16:22:06 +0100
message:
  Changed arg order in AggregatedValueController
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AggregatedValueController.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/src/main/java/org/hisp/dhis/api/controller/AggregatedValueController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AggregatedValueController.java	2011-12-15 14:24:21 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AggregatedValueController.java	2011-12-15 15:22:06 +0000
@@ -39,6 +39,7 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.RelativePeriods;
+import org.hisp.dhis.util.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -84,6 +85,9 @@
 
     @RequestMapping( method = RequestMethod.GET )
     public void getAggregatedValues(
+        @RequestParam( value = "de", required = false ) List<String> dataElementUids,
+        @RequestParam( value = "in", required = false ) List<String> indicatorUids,
+        @RequestParam( value = "ou" ) List<String> organisationUnitsUids,
         @RequestParam( required = false ) boolean lastMonth,
         @RequestParam( required = false ) boolean monthsThisYear,
         @RequestParam( required = false ) boolean monthsLastYear,
@@ -93,9 +97,6 @@
         @RequestParam( required = false ) boolean thisYear,
         @RequestParam( required = false ) boolean lastYear,
         @RequestParam( required = false ) boolean lastFiveYears,
-        @RequestParam( value = "ou" ) List<String> organisationUnitsUids,
-        @RequestParam( value = "i", required = false ) List<String> indicatorUids,
-        @RequestParam( value = "de", required = false ) List<String> dataElementUids,
         HttpServletResponse response
     ) throws IOException, I18nManagerException
     {
@@ -201,7 +202,7 @@
 
         JacksonUtils.writeObject( valueList, response.getOutputStream() );
 
-        response.setContentType( "application/json" );
+        response.setContentType( ContextUtils.CONTENT_TYPE_JSON );
         response.setStatus( HttpServletResponse.SC_OK );
     }
 }