@@ -0,0 +1,2374 @@
+/*%0A * This program was produced for the U.S. Agency for International Development. It was prepared by the USAID %7C DELIVER PROJECT, Task Order 4. It is part of a project which utilizes code originally licensed under the terms of the Mozilla Public License (MPL) v2 and therefore is licensed under MPL v2 or later.%0A *%0A * This program is free software: you can redistribute it and/or modify it under the terms of the Mozilla Public License as published by the Mozilla Foundation, either version 2 of the License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Mozilla Public License for more details.%0A *%0A * You should have received a copy of the Mozilla Public License along with this program. If not, see http://www.mozilla.org/MPL/%0A */%0A%0Apackage org.openlmis.web.controller.vaccine;%0A%0Aimport org.openlmis.vaccine.dto.FacilityDemographicEstimateForm;%0Aimport org.openlmis.vaccine.service.demographics.FacilityDemographicEstimateService;%0Aimport org.openlmis.web.controller.BaseController;%0Aimport org.openlmis.web.response.OpenLmisResponse;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.stereotype.Controller;%0Aimport org.springframework.web.bind.annotation.RequestBody;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestParam;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0A%0A@Controller%0A@RequestMapping(value = %22/vaccine/demographic/estimate/facility/%22)%0Apublic class FacilityDemographicEstimateController extends BaseController %7B%0A%0A  @Autowired%0A  FacilityDemographicEstimateService service;%0A%0A  @RequestMapping(%22get%22)%0A  public ResponseEntity%3COpenLmisResponse%3E get( @RequestParam(%22year%22) Integer year, @RequestParam(%22programId%22) Long programId,  HttpServletRequest request)%7B%0A    return OpenLmisResponse.response(%22estimates%22, service.getEstimateFor(loggedInUserId(request), programId, year));%0A  %7D%0A%0A  @RequestMapping(%22save%22)%0A  public ResponseEntity%3COpenLmisResponse%3E save(@RequestBody FacilityDemographicEstimateForm form,  HttpServletRequest request)%7B%0A    service.save(form);%0A    return OpenLmisResponse.response(%22estimates%22, form);%0A  %7D%0A%0A%7D%0A

Create facility demographic estimate controller