package es.uv.saic.feign; import java.io.IOException; import java.util.HashMap; import java.util.List; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import es.uv.saic.domain.IndicadorEnquesta; import es.uv.saic.domain.Usuari; import es.uv.saic.dto.OrganDTO; @FeignClient(value = "organ-controller", url = "${saic.url.domain}") public interface OrganClient { @GetMapping("/getCentres") List getCentres(); @GetMapping("/getActiveCentres") List getActiveCentres(); @GetMapping("/getTitulacionsWithCentre") public List getTitulacionsWithCentre(); @GetMapping("/getAllIndsByRuct/{ruct}/{curs}") public List getAllIndsByRuct(@PathVariable Integer ruct, @PathVariable Integer curs); @GetMapping("/findById/{tlugar}/{idTitulacio}") public OrganDTO findByID(@PathVariable String tlugar, @PathVariable Integer idTitulacio); @GetMapping("/getTitulacions/supervisor") public List getTitulacionsSupervisor(); @GetMapping("/getTitulacionsByCentre/{centre}") public List getTitulacionsByCentre(@PathVariable Integer centre); @PostMapping("/findOrgansByUsuari") public List findOrgansByUsuari(@RequestBody Usuari usuari); @GetMapping("/findByRuct/{ruct}") public OrganDTO findByRuct(@PathVariable Integer ruct); @PostMapping("/ajax/search/titulations") public HashMap getTitulationsByCenter(@RequestParam(name="centers[]", required=false) List centres, @RequestParam String usuari ) throws IOException; @PostMapping("/ajax/search/managers/titulations") public HashMap getCenterTitulations(@RequestParam("center") Integer centre); @PostMapping("/ajax/find/titulations2") public HashMap getTitulationsByCenters(@RequestParam("centers[]") List centres, @RequestParam("procedure") Integer idProces) throws IOException; @PostMapping("/ajax/find/titulations") public HashMap getTitulationsByCenter(@RequestParam("center") Integer centre, @RequestParam("procedure") Integer idProces) throws IOException; @PostMapping("/ajax/get/titulations") public HashMap getAllTitulationsByCenter(@RequestParam("center") Integer centre) throws IOException; @PostMapping("/ajax/find/centers") public HashMap getAllCentresByAmbit(@RequestParam("procedure") Integer idProces) throws IOException; }