Search in sources :

Example 6 with SubmissionInsightDTO

use of com.odysseusinc.arachne.portal.api.v1.dto.SubmissionInsightDTO in project ArachneCentralAPI by OHDSI.

the class BaseAnalysisController method updateSubmissionInsight.

@ApiOperation("Update submission insight")
@RequestMapping(value = "/api/v1/analysis-management/submissions/{submissionId}/insight", method = PUT)
public JsonResult<SubmissionInsightDTO> updateSubmissionInsight(@PathVariable("submissionId") Long submissionId, @RequestBody SubmissionInsightUpdateDTO insightDTO) throws NotExistException {
    final SubmissionInsight insight = conversionService.convert(insightDTO, SubmissionInsight.class);
    final SubmissionInsight updatedInsight = submissionInsightService.updateSubmissionInsight(submissionId, insight);
    final SubmissionInsightDTO updatedInsightDTO = conversionService.convert(updatedInsight, SubmissionInsightDTO.class);
    final JsonResult<SubmissionInsightDTO> result = new JsonResult<>(NO_ERROR);
    result.setResult(updatedInsightDTO);
    return result;
}
Also used : SubmissionInsightDTO(com.odysseusinc.arachne.portal.api.v1.dto.SubmissionInsightDTO) SubmissionInsight(com.odysseusinc.arachne.portal.model.SubmissionInsight) JsonResult(com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult) ApiOperation(io.swagger.annotations.ApiOperation) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

SubmissionInsightDTO (com.odysseusinc.arachne.portal.api.v1.dto.SubmissionInsightDTO)6 SubmissionInsight (com.odysseusinc.arachne.portal.model.SubmissionInsight)5 ApiOperation (io.swagger.annotations.ApiOperation)4 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)4 JsonResult (com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult)3 Commentable (com.odysseusinc.arachne.portal.api.v1.dto.Commentable)3 CommentTopic (com.odysseusinc.arachne.portal.model.CommentTopic)2 Sort (org.springframework.data.domain.Sort)2 AnalysisDTO (com.odysseusinc.arachne.portal.api.v1.dto.AnalysisDTO)1 CommentableResultFileDTO (com.odysseusinc.arachne.portal.api.v1.dto.CommentableResultFileDTO)1 CommentableSubmissionFileDTO (com.odysseusinc.arachne.portal.api.v1.dto.CommentableSubmissionFileDTO)1 DataSourceDTO (com.odysseusinc.arachne.portal.api.v1.dto.DataSourceDTO)1 PermissionsDTO (com.odysseusinc.arachne.portal.api.v1.dto.PermissionsDTO)1 ShortUserDTO (com.odysseusinc.arachne.portal.api.v1.dto.ShortUserDTO)1 StudyShortDTO (com.odysseusinc.arachne.portal.api.v1.dto.StudyShortDTO)1 SubmissionDTO (com.odysseusinc.arachne.portal.api.v1.dto.SubmissionDTO)1 SubmissionStatusDTO (com.odysseusinc.arachne.portal.api.v1.dto.SubmissionStatusDTO)1 BaseConversionServiceAwareConverter (com.odysseusinc.arachne.portal.api.v1.dto.converters.BaseConversionServiceAwareConverter)1 Analysis (com.odysseusinc.arachne.portal.model.Analysis)1 Study (com.odysseusinc.arachne.portal.model.Study)1