Class ResearchStudyParticipantFileController
java.lang.Object
org.diabetestechnology.drh.service.http.pg.ux.ResearchStudyParticipantFileController
-
Constructor Summary
ConstructorsConstructorDescriptionResearchStudyParticipantFileController
(ResearchStudyParticipantFileService researchStudyParticipantFileService, ResearchStudyService researchStudyService) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<byte[]> org.springframework.http.ResponseEntity
<byte[]> uploadFile
(org.springframework.web.multipart.MultipartFile file, @Valid ParticipantFileDataRequest request)
-
Constructor Details
-
ResearchStudyParticipantFileController
public ResearchStudyParticipantFileController(ResearchStudyParticipantFileService researchStudyParticipantFileService, ResearchStudyService researchStudyService)
-
-
Method Details
-
uploadFile
@PostMapping("/participant/file/upload") @ResponseBody public Response uploadFile(@RequestPart("file") @Nonnull org.springframework.web.multipart.MultipartFile file, @Valid @Valid ParticipantFileDataRequest request) throws IOException, com.opencsv.exceptions.CsvException - Throws:
IOException
com.opencsv.exceptions.CsvException
-
downloadParticipantMealsTemplate
@GetMapping("/participant/meals-file/template") @ResponseBody public org.springframework.http.ResponseEntity<byte[]> downloadParticipantMealsTemplate(@RequestParam(required=false,defaultValue="csv") String format) throws IOException - Throws:
IOException
-
downloadParticipantFitnessTemplate
@GetMapping("/participant/fitness-file/template") @ResponseBody public org.springframework.http.ResponseEntity<byte[]> downloadParticipantFitnessTemplate(@RequestParam(required=false,defaultValue="csv") String format) throws IOException - Throws:
IOException
-