← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6968: Xmlr representation of rport table data

 

------------------------------------------------------------
revno: 6968
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-05-16 23:22:10 +0200
message:
  Xmlr representation of rport table data
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.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/ReportTableController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java	2012-05-16 20:48:16 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java	2012-05-16 21:22:10 +0000
@@ -184,6 +184,27 @@
         return grid != null ? "reportTableData" : null;
     }
 
+    @RequestMapping( value = "/data.xml", method = RequestMethod.GET )
+    public void getReportTableDynamicDataXml( @RequestParam(required=false, value="in") List<String> indicators,
+                                             @RequestParam(required=false, value="de") List<String> dataElements,
+                                             @RequestParam(required=false, value="ds") List<String> dataSets,
+                                             @RequestParam(value="ou") List<String> orgUnits,
+                                             @RequestParam(required=false, value="crosstab") List<String> crossTab,
+                                             @RequestParam(required=false) boolean orgUnitIsParent,
+                                             @RequestParam(required=false) boolean minimal,
+                                             RelativePeriods relatives,
+                                             Model model, 
+                                             HttpServletResponse response ) throws Exception
+    {
+        Grid grid = getReportTableDynamicGrid( indicators, dataElements, dataSets, 
+            orgUnits, crossTab, orgUnitIsParent, minimal, relatives, response );
+
+        String filename = DATA_NAME + ".xml";
+        contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_XML, CacheStrategy.RESPECT_SYSTEM_SETTING, filename, false );
+
+        GridUtils.toXml( grid, response.getOutputStream() );
+    }
+
     @RequestMapping( value = "/data.html", method = RequestMethod.GET )
     public void getReportTableDynamicDataHtml( @RequestParam(required=false, value="in") List<String> indicators,
                                              @RequestParam(required=false, value="de") List<String> dataElements,