Class UploadsAdminController
java.lang.Object
org.tailormap.api.controller.admin.UploadsAdminController
-
Constructor Summary
ConstructorsConstructorDescriptionUploadsAdminController(UploadRepository uploadRepository, ZipService zipService) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteUploadsByCategory(List<UUID> uuids) byte[]downloadUploadsByCategory(List<UUID> uuids) findUploadsByHash(UploadCategory category, List<String> hashes) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<?>
-
Constructor Details
-
UploadsAdminController
-
-
Method Details
-
handleException
@ExceptionHandler(IOException.class) public org.springframework.http.ResponseEntity<?> handleException(Exception ex) -
handleIllegalArgumentException
@ExceptionHandler(IllegalArgumentException.class) public org.springframework.http.ResponseEntity<?> handleIllegalArgumentException(IllegalArgumentException ex) -
findUploadsByHash
@PostMapping(path="${tailormap-api.admin.base-path}/uploads/find-by-hash/{category}", consumes="application/json") public List<UploadMatch> findUploadsByHash(@PathVariable UploadCategory category, @RequestBody List<String> hashes) -
downloadUploadsByCategory
@Transactional(readOnly=true) @GetMapping(path="${tailormap-api.admin.base-path}/uploads/{uuids}", produces="application/zip") public byte[] downloadUploadsByCategory(@PathVariable("uuids") List<UUID> uuids) throws IOException - Throws:
IOException
-
deleteUploadsByCategory
@DeleteMapping(path="${tailormap-api.admin.base-path}/uploads/{uuids}") public void deleteUploadsByCategory(@PathVariable("uuids") List<UUID> uuids) throws IllegalArgumentException - Throws:
IllegalArgumentException
-