use of com.odysseusinc.arachne.commons.api.v1.dto.CommonDataNodeCreationResponseDTO in project ArachneCentralAPI by OHDSI.
the class BaseDataNodeController method createDataNode.
@ApiOperation("Create new data node.")
@RequestMapping(value = "/api/v1/data-nodes", method = RequestMethod.POST)
public JsonResult<CommonDataNodeCreationResponseDTO> createDataNode(Principal principal) throws PermissionDeniedException, AlreadyExistException {
final IUser user = getUser(principal);
final DN dataNode = buildEmptyDN();
CommonDataNodeCreationResponseDTO responseDTO = createDataNode(dataNode, principal);
final JsonResult<CommonDataNodeCreationResponseDTO> result = new JsonResult<>(JsonResult.ErrorCode.NO_ERROR);
result.setResult(responseDTO);
return result;
}
use of com.odysseusinc.arachne.commons.api.v1.dto.CommonDataNodeCreationResponseDTO in project ArachneCentralAPI by OHDSI.
the class DataNodeToCommonDataNodeCreationResponseDTOConverter method convert.
@Override
public CommonDataNodeCreationResponseDTO convert(DataNode source) {
CommonDataNodeCreationResponseDTO dto = new CommonDataNodeCreationResponseDTO();
dto.setDataNodeUuid(source.getSid());
dto.setToken(source.getToken());
dto.setCentralId(source.getId());
return dto;
}
Aggregations