程序包 cool.scx.ext.fss

类 FSSHandler

  • 直接已知子类:
    FSSHandlerImpl

    public abstract class FSSHandler
    extends Object

    Abstract FSSHandler class.

    版本:
    1.3.7
    作者:
    scx567888
    • 构造器详细资料

      • FSSHandler

        public FSSHandler()

        Constructor for FSSHandler.

    • 方法详细资料

      • checkFSSObjectId

        public FSSObject checkFSSObjectId​(String fssObjectId)
                                   throws cool.scx.exception.NotFoundException,
                                          SQLException

        checkFileId.

        参数:
        fssObjectId - a String object
        返回:
        a FSSObject object
        抛出:
        cool.scx.exception.NotFoundException - if any.
        SQLException - if any.
      • checkPhysicalFile

        public File checkPhysicalFile​(FSSObject fssObject)
                               throws cool.scx.exception.NotFoundException
        检查物理文件是否存在 存在则返回物理文件 不存在则抛出异常
        参数:
        fssObject - a FSSObject object
        返回:
        a File object
        抛出:
        cool.scx.exception.NotFoundException - if any.
      • getNewFSSObjectPath

        public String[] getNewFSSObjectPath​(LocalDateTime uploadTime,
                                            String fssObjectId,
                                            String fileName)
        获取 文件存储路径
        规则 年份/月份/天/文件ID/文件真实名称
        参数:
        uploadTime - 上传时间
        fssObjectId - id
        fileName - 文件名称
        返回:
        s
      • getLastUploadChunk

        public Integer getLastUploadChunk​(File uploadConfigFile,
                                          Integer chunkLength)

        getLastUploadChunk.

        参数:
        uploadConfigFile - a File object.
        chunkLength - a Integer object.
        返回:
        a Integer object.
      • updateLastUploadChunk

        public void updateLastUploadChunk​(File uploadConfigFile,
                                          Integer nowChunkIndex,
                                          Integer chunkLength)
        更新最后一次文件上传的区块
        参数:
        uploadConfigFile - a File object.
        nowChunkIndex - a Integer object.
        chunkLength - a Integer object.
      • download

        public cool.scx.vo.Download download​(String fssObjectId)
                                      throws cool.scx.exception.HttpRequestException,
                                             SQLException

        download.

        参数:
        fssObjectId - a String object
        返回:
        a Download object
        抛出:
        cool.scx.exception.HttpRequestException - if any.
        SQLException - if any.
      • image

        public cool.scx.vo.Image image​(String fssObjectId,
                                       Integer width,
                                       Integer height,
                                       String type)
                                throws cool.scx.exception.HttpRequestException,
                                       SQLException

        image.

        参数:
        fssObjectId - a String object
        width - a Integer object
        height - a Integer object
        type - a String object
        返回:
        a Image object
        抛出:
        cool.scx.exception.HttpRequestException - if any.
        SQLException - if any.
      • raw

        public cool.scx.vo.Raw raw​(String fssObjectId)
                            throws cool.scx.exception.HttpRequestException,
                                   SQLException

        raw.

        参数:
        fssObjectId - a String object
        返回:
        a Raw object
        抛出:
        cool.scx.exception.HttpRequestException - if any.
        SQLException - if any.
      • upload

        public cool.scx.vo.Json upload​(String fileName,
                                       Long fileSize,
                                       String fileMD5,
                                       Integer chunkLength,
                                       Integer nowChunkIndex,
                                       cool.scx.bo.FileUpload fileData)
                                throws SQLException

        upload.

        参数:
        fileName - a String object
        fileSize - a Long object
        fileMD5 - a String object
        chunkLength - a Integer object
        nowChunkIndex - a Integer object
        fileData - a FileUpload object
        返回:
        a Json object
        抛出:
        SQLException - if any.
      • delete

        public cool.scx.vo.Json delete​(String fssObjectIds)
                                throws SQLException

        delete.

        参数:
        fssObjectIds - a String object
        返回:
        a Json object
        抛出:
        SQLException - if any.
      • checkAnyFileExistsByThisMD5

        public cool.scx.vo.Json checkAnyFileExistsByThisMD5​(String fileName,
                                                            Long fileSize,
                                                            String fileMD5)
                                                     throws SQLException
        检查 md5 是否可用 (用于秒传)
        参数:
        fileName - f
        fileSize - f
        fileMD5 - f
        返回:
        f
        抛出:
        SQLException - f