Class UploadsAdminController

java.lang.Object
org.tailormap.api.controller.admin.UploadsAdminController

@RestController public class UploadsAdminController extends Object
  • Constructor Details

  • 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)
    • downloadUploads

      @Transactional(readOnly=true) @PostMapping(path="${tailormap-api.admin.base-path}/uploads/multi", produces="application/zip") public org.springframework.http.ResponseEntity<org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody> downloadUploads(@RequestBody List<UUID> uuids) throws IOException
      Throws:
      IOException
    • getUpload

      @GetMapping(path={"${tailormap-api.admin.base-path}/uploads/download/{category}/{id}","${tailormap-api.admin.base-path}/uploads/download/{category}/{id}/{filename}"}) public org.springframework.http.ResponseEntity<byte[]> getUpload(@PathVariable UploadCategory category, @PathVariable(name="id") UUID id, @PathVariable(required=false) String filename)
    • deleteUploads

      @DeleteMapping(path="${tailormap-api.admin.base-path}/uploads/multi") public void deleteUploads(@RequestBody List<UUID> uuids) throws IllegalArgumentException
      Throws:
      IllegalArgumentException