public interface FileStorageAspect
| 限定符和类型 | 方法和说明 |
|---|---|
default boolean |
deleteAround(DeleteAspectChain chain,
FileInfo fileInfo,
FileStorage fileStorage,
FileRecorder fileRecorder)
删除文件,成功返回 true
|
default void |
downloadAround(DownloadAspectChain chain,
FileInfo fileInfo,
FileStorage fileStorage,
java.util.function.Consumer<InputStream> consumer)
下载文件,成功返回文件内容
|
default void |
downloadThAround(DownloadThAspectChain chain,
FileInfo fileInfo,
FileStorage fileStorage,
java.util.function.Consumer<InputStream> consumer)
下载缩略图文件,成功返回文件内容
|
default boolean |
existsAround(ExistsAspectChain chain,
FileInfo fileInfo,
FileStorage fileStorage)
文件是否存在,成功返回 true
|
default String |
generatePresignedUrlAround(GeneratePresignedUrlAspectChain chain,
FileInfo fileInfo,
Date expiration,
FileStorage fileStorage)
对文件生成可以签名访问的 URL,无法生成则返回 null
|
default String |
generateThPresignedUrlAround(GenerateThPresignedUrlAspectChain chain,
FileInfo fileInfo,
Date expiration,
FileStorage fileStorage)
对缩略图文件生成可以签名访问的 URL,无法生成则返回 null
|
default <T> T |
invoke(InvokeAspectChain chain,
FileStorage fileStorage,
String method,
Object[] args)
通过反射调用指定存储平台的方法
|
default boolean |
isSupportAclAround(IsSupportAclAspectChain chain,
FileStorage fileStorage)
是否支持文件的访问控制列表
|
default boolean |
isSupportMetadataAround(IsSupportMetadataAspectChain chain,
FileStorage fileStorage)
是否支持 Metadata
|
default boolean |
isSupportPresignedUrlAround(IsSupportPresignedUrlAspectChain chain,
FileStorage fileStorage)
是否支持对文件生成可以签名访问的 URL
|
default boolean |
setFileAcl(SetFileAclAspectChain chain,
FileInfo fileInfo,
Object acl,
FileStorage fileStorage)
设置文件的访问控制列表,一般情况下只有对象存储支持该功能
|
default boolean |
setThFileAcl(SetThFileAclAspectChain chain,
FileInfo fileInfo,
Object acl,
FileStorage fileStorage)
设置缩略图文件的访问控制列表,一般情况下只有对象存储支持该功能
|
default FileInfo |
uploadAround(UploadAspectChain chain,
FileInfo fileInfo,
UploadPretreatment pre,
FileStorage fileStorage,
FileRecorder fileRecorder)
上传,成功返回文件信息,失败返回 null
|
default FileInfo uploadAround(UploadAspectChain chain, FileInfo fileInfo, UploadPretreatment pre, FileStorage fileStorage, FileRecorder fileRecorder)
default boolean deleteAround(DeleteAspectChain chain, FileInfo fileInfo, FileStorage fileStorage, FileRecorder fileRecorder)
default boolean existsAround(ExistsAspectChain chain, FileInfo fileInfo, FileStorage fileStorage)
default void downloadAround(DownloadAspectChain chain, FileInfo fileInfo, FileStorage fileStorage, java.util.function.Consumer<InputStream> consumer)
default void downloadThAround(DownloadThAspectChain chain, FileInfo fileInfo, FileStorage fileStorage, java.util.function.Consumer<InputStream> consumer)
default boolean isSupportPresignedUrlAround(IsSupportPresignedUrlAspectChain chain, FileStorage fileStorage)
default String generatePresignedUrlAround(GeneratePresignedUrlAspectChain chain, FileInfo fileInfo, Date expiration, FileStorage fileStorage)
default String generateThPresignedUrlAround(GenerateThPresignedUrlAspectChain chain, FileInfo fileInfo, Date expiration, FileStorage fileStorage)
default boolean isSupportAclAround(IsSupportAclAspectChain chain, FileStorage fileStorage)
default boolean setFileAcl(SetFileAclAspectChain chain, FileInfo fileInfo, Object acl, FileStorage fileStorage)
default boolean setThFileAcl(SetThFileAclAspectChain chain, FileInfo fileInfo, Object acl, FileStorage fileStorage)
default boolean isSupportMetadataAround(IsSupportMetadataAspectChain chain, FileStorage fileStorage)
default <T> T invoke(InvokeAspectChain chain, FileStorage fileStorage, String method, Object[] args)
Copyright © 2023. All rights reserved.