All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.molgenis.api.files.FilesService Maven / Gradle / Ivy

The newest version!
package org.molgenis.api.files;

import java.util.concurrent.CompletableFuture;
import javax.servlet.http.HttpServletRequest;
import org.molgenis.data.file.model.FileMeta;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody;

public interface FilesService {

  /** Asynchronous file upload from HTTP request */
  @Async
  CompletableFuture upload(HttpServletRequest httpServletRequest);

  /**
   * Asynchronous file download to HTTP response
   *
   * @throws org.molgenis.data.UnknownEntityException if fileId is unknown
   */
  ResponseEntity download(String fileId);

  /**
   * Get file metadata
   *
   * @throws org.molgenis.data.UnknownEntityException if fileId is unknown
   */
  FileMeta getFileMeta(String fileId);

  /**
   * Delete file and file metadata
   *
   * @throws org.molgenis.data.UnknownEntityException if fileId is unknown
   */
  void delete(String fileId);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy