package com.ard.sample.media.service; import com.ard.sample.common.model.PaginationData; import com.ard.sample.media.model.FileUploadDTO; import com.ard.sample.media.model.MediaFileDTO; import java.net.URL; import java.util.List; /** * @author sean * @version 0.2 * @date 2021/12/9 */ public interface IFileService { /** * Query if the file already exists based on the workspace id and the fingerprint of the file. * @param fingerprint * @return */ Boolean checkExist(String fingerprint); /** * Save the basic information of the file to the database. * @param file * @return */ Integer saveFile(FileUploadDTO file); /** * Query information about all files in this workspace based on the workspace id. * @return */ List getAllFiles(); /** * 根据任务id获取全部媒体库文件 * @param jobId 任务id * @return List 媒体库文件列表 * */ PaginationData getJobFiles(long page, long pageSize,String jobId, String isType); /** * Paginate through all media files in this workspace. * @param page * @param pageSize * @return */ PaginationData getMediaFilesPagination(long page, long pageSize); /** * Get the download address of the file. * @param fileId * @return */ URL getObjectUrl(String fileId); /** * Query all media files of a job. * @param jobId * @return */ List getFilesByWorkspaceAndJobId(String jobId); }