use of nikita.model.noark5.v4.metadata.DocumentMedium in project nikita-noark5-core by HiOA-ABI.
the class DocumentMediumController method findAll.
// API - All GET Requests (CRUD - READ)
// Retrieves all documentMedium
// GET [contextPath][api]/metadata/dokumentmedium/
@ApiOperation(value = "Retrieves all DocumentMedium ", response = DocumentMedium.class)
@ApiResponses(value = { @ApiResponse(code = 200, message = "DocumentMedium codes found", response = DocumentMedium.class), @ApiResponse(code = 404, message = "No DocumentMedium found"), @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(method = RequestMethod.GET, value = DOCUMENT_MEDIUM)
public ResponseEntity<MetadataHateoas> findAll(HttpServletRequest request) {
//ArrayList <DocumentMedium> documentMediumList = (ArrayList<DocumentMedium>) documentMediumService.findAll2();
MetadataHateoas metadataHateoas = new MetadataHateoas(new ArrayList<>(documentMediumService.findAll2()), DOCUMENT_MEDIUM);
metadataHateoasHandler.addLinks(metadataHateoas, request, new Authorisation());
return ResponseEntity.status(HttpStatus.OK).allow(CommonUtils.WebUtils.getMethodsForRequestOrThrow(request.getServletPath())).body(metadataHateoas);
}
Aggregations