use of org.hisp.dhis.datavalue.DataExportParams in project dhis2-core by dhis2.
the class DataValueSetController method getDataValueSetCsv.
@RequestMapping(method = RequestMethod.GET, produces = CONTENT_TYPE_CSV)
public void getDataValueSetCsv(@RequestParam(required = false) Set<String> dataSet, @RequestParam(required = false) Set<String> dataElementGroup, @RequestParam(required = false) Set<String> period, @RequestParam(required = false) Date startDate, @RequestParam(required = false) Date endDate, @RequestParam(required = false) Set<String> orgUnit, @RequestParam(required = false) boolean children, @RequestParam(required = false) Set<String> orgUnitGroup, @RequestParam(required = false) Set<String> attributeOptionCombo, @RequestParam(required = false) boolean includeDeleted, @RequestParam(required = false) Date lastUpdated, @RequestParam(required = false) String lastUpdatedDuration, @RequestParam(required = false) Integer limit, IdSchemes idSchemes, HttpServletResponse response) throws IOException {
response.setContentType(CONTENT_TYPE_CSV);
DataExportParams params = dataValueSetService.getFromUrl(dataSet, dataElementGroup, period, startDate, endDate, orgUnit, children, orgUnitGroup, attributeOptionCombo, includeDeleted, lastUpdated, lastUpdatedDuration, limit, idSchemes);
dataValueSetService.writeDataValueSetCsv(params, response.getWriter());
}
Aggregations