use of uk.ac.bbsrc.tgac.miso.dto.Dtos 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.Dtos 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.Dtos in project miso-lims by miso-lims.
the class SampleClassRestController method updateSampleClass.
@PutMapping(value = "/{id}", headers = { "Content-type=application/json" })
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public SampleClassDto updateSampleClass(@PathVariable("id") long id, @RequestBody SampleClassDto sampleClassDto) throws IOException {
return RestUtils.updateObject("Sample Class", id, sampleClassDto, Dtos::to, sampleClassService, sampleClass -> {
SampleClassDto dto = Dtos.asDto(sampleClass);
constantsController.refreshConstants();
return dto;
});
}
use of uk.ac.bbsrc.tgac.miso.dto.Dtos in project miso-lims by miso-lims.
the class AsyncOperationManager method startAsyncBulkQcUpdate.
public <T, R extends Identifiable> ObjectNode startAsyncBulkQcUpdate(List<QcDto> dtos) throws IOException {
final QcTarget qcTarget = getQcTarget(dtos.get(0).getQcTarget());
List<QC> items = validateBulkUpdate("QC", dtos, Dtos::to, id -> qualityControlService.get(qcTarget, id));
BulkSaveOperation<QC> operation = qualityControlService.startBulkUpdate(items);
String uuid = addAsyncOperation(operation);
return makeRunningProgress(uuid, operation);
}
use of uk.ac.bbsrc.tgac.miso.dto.Dtos in project miso-lims by miso-lims.
the class LabRestController method createLab.
@PostMapping(headers = { "Content-type=application/json" })
@ResponseBody
public LabDto createLab(@RequestBody LabDto labDto, UriComponentsBuilder uriBuilder) throws IOException {
LabDto saved = RestUtils.createObject("Lab", labDto, Dtos::to, labService, Dtos::asDto);
constantsController.refreshConstants();
return saved;
}
Aggregations