@@ -0,0 +1,3057 @@
+/*%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.equipment;%0A%0Aimport org.openlmis.equipment.domain.ServiceContract;%0Aimport org.openlmis.equipment.domain.ServiceType;%0Aimport org.openlmis.equipment.service.ServiceContractService;%0Aimport org.openlmis.equipment.service.ServiceTypeService;%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 static org.springframework.web.bind.annotation.RequestMethod.GET;%0Aimport static org.springframework.web.bind.annotation.RequestMethod.POST;%0A%0A@Controller%0A@RequestMapping(value=%22/equipment/service-contracts/%22)%0Apublic class ServiceContractController extends BaseController %7B%0A%0A  @Autowired%0A  private ServiceContractService service;%0A%0A  @RequestMapping(method = GET, value = %22list%22)%0A  public ResponseEntity%3COpenLmisResponse%3E getAll()%7B%0A    return  OpenLmisResponse.response(%22contract%22, service.getAll());%0A  %7D%0A%0A  @RequestMapping(method = GET, value = %22id%22)%0A  public ResponseEntity%3COpenLmisResponse%3E getById( @RequestParam(%22id%22) Long id)%7B%0A    return  OpenLmisResponse.response(%22contract%22, service.getById(id));%0A  %7D%0A%0A  @RequestMapping(method = GET, value = %22for-facility%22)%0A  public ResponseEntity%3COpenLmisResponse%3E getByFacilityId( @RequestParam(%22id%22) Long id)%7B%0A    return  OpenLmisResponse.response(%22contract%22, service.getAllForFacility(id));%0A  %7D%0A%0A  @RequestMapping(method = GET, value = %22for-vendor%22)%0A  public ResponseEntity%3COpenLmisResponse%3E getByVendorId( @RequestParam(%22id%22) Long id)%7B%0A    return  OpenLmisResponse.response(%22contract%22, service.getAllForVendor(id));%0A  %7D%0A%0A  @RequestMapping(value = %22save%22, method = POST, headers = ACCEPT_JSON)%0A  public ResponseEntity%3COpenLmisResponse%3E save(@RequestBody ServiceContract type)%7B%0A    service.save(type);%0A    return OpenLmisResponse.response(%22status%22,%22success%22);%0A  %7D%0A%7D%0A

implement service contract controller.