use of org.hisp.dhis.dxf2.dataset.ExportParams in project dhis2-core by dhis2.
the class CompleteDataSetRegistrationController method getCompleteRegistrationsJson.
@ApiVersion({ DhisApiVersion.DEFAULT, DhisApiVersion.V26, DhisApiVersion.V27 })
@RequestMapping(method = RequestMethod.GET, produces = CONTENT_TYPE_JSON)
public void getCompleteRegistrationsJson(@RequestParam Set<String> dataSet, @RequestParam(required = false) Set<String> period, @RequestParam(required = false) Date startDate, @RequestParam(required = false) Date endDate, @RequestParam(required = false, name = "children") boolean includeChildren, @RequestParam(required = false) Set<String> orgUnit, @RequestParam(required = false) Set<String> orgUnitGroup, @RequestParam(required = false) Date created, @RequestParam(required = false) String createdDuration, @RequestParam(required = false) Integer limit, IdSchemes idSchemes, HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setContentType(CONTENT_TYPE_JSON);
ExportParams params = registrationExchangeService.paramsFromUrl(dataSet, orgUnit, orgUnitGroup, period, startDate, endDate, includeChildren, created, createdDuration, limit, idSchemes);
registrationExchangeService.writeCompleteDataSetRegistrationsJson(params, response.getOutputStream());
}
Aggregations