use of uk.ac.bbsrc.tgac.miso.dto.QcTypeDto in project miso-lims by miso-lims.
the class QcTypeRestController method updateSubproject.
@PutMapping(value = "/{id}", headers = { "Content-type=application/json" })
@ResponseBody
public QcTypeDto updateSubproject(@PathVariable("id") long id, @RequestBody QcTypeDto qcTypeDto) throws IOException {
return RestUtils.updateObject("QC Type", id, qcTypeDto, Dtos::to, qcTypeService, qcType -> {
QcTypeDto dto = Dtos.asDto(qcType);
constantsController.refreshConstants();
return dto;
});
}
use of uk.ac.bbsrc.tgac.miso.dto.QcTypeDto in project miso-lims by miso-lims.
the class QcTypeRestController method createQcType.
@PostMapping(headers = { "Content-type=application/json" })
@ResponseBody
public QcTypeDto createQcType(@RequestBody QcTypeDto qcTypeDto) throws IOException {
return RestUtils.createObject("QC Type", qcTypeDto, Dtos::to, qcTypeService, qcType -> {
QcTypeDto dto = Dtos.asDto(qcType);
constantsController.refreshConstants();
return dto;
});
}
use of uk.ac.bbsrc.tgac.miso.dto.QcTypeDto in project miso-lims by miso-lims.
the class QcTypeController method setupForm.
private ModelAndView setupForm(QcType qcType, ModelMap model) throws JsonProcessingException {
QcTypeDto dto = Dtos.asDto(qcType);
ObjectMapper mapper = new ObjectMapper();
model.put("qcTypeDto", mapper.writeValueAsString(dto));
return new ModelAndView("/WEB-INF/pages/editQcType.jsp", model);
}
Aggregations