use of nikita.model.noark5.v4.casehandling.secondary.CorrespondencePartInternal in project nikita-noark5-core by HiOA-ABI.
the class CorrespondencePartHateoasController method findOneCorrespondencePartInternalBySystemId.
// Get a CorrespondencePartInternal identified by systemID
// GET [contextPath][api]/casehandling/korrespondansepartintern/{systemId}
@ApiOperation(value = "Retrieves a single CorrespondencePartInternal entity given a systemId", response = CorrespondencePartInternal.class)
@ApiResponses(value = { @ApiResponse(code = 200, message = "CorrespondencePartInternal returned", response = CorrespondencePartInternal.class), @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER), @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER), @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR) })
@Counted
@Timed
@RequestMapping(value = CORRESPONDENCE_PART_INTERNAL + SLASH + LEFT_PARENTHESIS + SYSTEM_ID + RIGHT_PARENTHESIS, method = RequestMethod.GET)
public ResponseEntity<CorrespondencePartInternalHateoas> findOneCorrespondencePartInternalBySystemId(final UriComponentsBuilder uriBuilder, HttpServletRequest request, final HttpServletResponse response, @ApiParam(name = "systemID", value = "systemID of the correspondencePartInternal to retrieve", required = true) @PathVariable("systemID") final String correspondencePartInternalSystemId) {
CorrespondencePartInternal correspondencePartInternal = (CorrespondencePartInternal) correspondencePartService.findBySystemIdOrderBySystemId(correspondencePartInternalSystemId);
CorrespondencePartInternalHateoas correspondencePartInternalHateoas = new CorrespondencePartInternalHateoas(correspondencePartInternal);
correspondencePartHateoasHandler.addLinks(correspondencePartInternalHateoas, request, new Authorisation());
return ResponseEntity.status(HttpStatus.OK).allow(CommonUtils.WebUtils.getMethodsForRequestOrThrow(request.getServletPath())).eTag(correspondencePartInternal.getVersion().toString()).body(correspondencePartInternalHateoas);
}
Aggregations