public interface DMC extends com.digiwin.dap.middleware.dmc.internal.client.OSS, SystemConfig
Document Management Center (a.k.a DMC) is the massive, secure, low cost and highly
reliable public storage which could be accessed from anywhere at anytime via
REST APIs, SDKs.
Developers could use DMC to create any services that need huge data storage
and access throughput, such as media sharing web apps, cloud storage service
or enterprise or personal data backup.
| 限定符和类型 | 方法和说明 |
|---|---|
List<FileOpTree> |
batchCopy(FileOpRequest request)
批量复制
|
List<FileOpTree> |
batchCopy(List<String> fileIds,
List<String> dirIds,
String targetDirId)
批量复制
|
void |
batchDelete(BatchRequest request)
永久删除文件、目录
|
void |
batchDelete(List<String> fileIds,
List<String> dirIds)
永久删除文件、目录
|
void |
batchDeleteRecycleBin(List<String> recycleIds)
批量删除回收站指定文件
|
void |
batchDeleteShare(List<String> shareIds)
批量删除分享记录
|
byte[] |
batchDownload(BatchRequest request)
批量下载(返回.zip文件)
|
byte[] |
batchDownload(List<String> fileIds,
List<String> dirIds)
批量下载(返回.zip文件)
|
void |
batchDownload(List<String> fileIds,
List<String> dirIds,
OutputStream output)
批量下载(返回.zip文件)
|
void |
batchDownload(List<String> fileIds,
List<String> dirIds,
String filePath)
批量下载(返回.zip文件)
|
void |
batchDownload(List<String> fileIds,
List<String> dirIds,
String filePath,
String fileName)
批量下载(返回.zip文件)
|
void |
batchMove(FileOpRequest request)
批量剪切
|
void |
batchMove(List<String> fileIds,
List<String> dirIds,
String targetDirId)
批量剪切
|
List<RecycleBin> |
batchRemove(BatchRequest request)
批量删除文件、目录到回收站
|
List<RecycleBin> |
batchRemove(List<String> fileIds,
List<String> dirIds)
批量删除文件、目录到回收站
|
void |
batchRestore(List<String> fileIds)
恢复回收站文件
|
void |
batchRestoreRecycleBin(BatchRequest request)
批量恢复回收站文件
|
void |
batchRestoreRecycleBin(List<String> recycleIds)
批量恢复回收站文件
|
List<FileInfo> |
batchUpload(List<File> files)
批量上传
|
List<FileInfo> |
batchUpload(List<File> files,
List<FileInfo> fileInfos)
批量上传
文件、文件信息一一对应
|
List<FileInfo> |
batchUpload(UploadMultiRequest request)
批量上传
|
List<FileInfo> |
batchUploadBytes(List<byte[]> bytes,
List<String> filenames)
批量上传
|
List<FileInfo> |
batchUploadBytes(List<byte[]> bytes,
Map<String,FileInfo> fileInfos)
批量上传
|
List<FileInfo> |
batchUploadStream(List<InputStream> inputs,
List<String> filenames)
批量上传
|
List<FileInfo> |
batchUploadStream(List<InputStream> inputs,
Map<String,FileInfo> fileInfos)
批量上传
|
void |
clearIamUserToken()
清除当前线程Iam用户Token
|
void |
clearRecycleBin()
清空回收站
|
String |
copy(String fileId)
复制一个文件到根目录
|
String |
copy(String fileId,
String targetDirId)
复制文件到一个指定目录
|
String |
copyDir(String dirId)
复制目录到根目录
|
String |
copyDir(String dirId,
String targetDirId)
复制目录到一个指定目录
|
FileInfo |
coverUpload(String fileId,
byte[] bytes)
覆盖上传
|
FileInfo |
coverUpload(String fileId,
File file)
覆盖上传
|
FileInfo |
coverUpload(String fileId,
InputStream input)
覆盖上传
|
DirInfo |
createDir(DirInfo dirInfo)
创建目录
|
void |
delete(String fileId)
永久删除指定文件
|
void |
deleteDir(String dirId)
永久删除指定文件
|
void |
deleteRecycleBin(String recycleId)
删除回收站指定文件
|
void |
deleteShare(String shareId)
删除分享记录
|
byte[] |
download(String fileId)
下载指定文件
|
void |
download(String fileId,
OutputStream output)
下载指定文件到流
|
void |
download(String fileId,
String filePath)
下载指定文件到本地
|
void |
download(String fileId,
String filePath,
String fileName)
下载指定文件到本地
|
String |
getConnectionPoolStats()
Get the statistics of the connection pool.
|
DirInfo |
getDirInfo(String dirId)
获取目录信息
|
DirInfo |
getDirInfoByName(String dirName)
通过目录名称或者路径获取目录
|
DirInfo |
getDirInfoByName(String parentDirId,
String dirName)
通过目录名称或者路径获取目录.
|
FileInfo |
getFileInfo(String fileId)
查询文件信息
|
FileInfo |
getFileInfoByName(String fileName)
查询文件信息
|
FileInfo |
getFileInfoByName(String dirId,
String fileName)
查询文件信息
|
List<FileInfo> |
getFileInfos(List<String> fileIds)
查询指定IDs的文件信息
|
List<FileInfo> |
getFileInfos(String dirId)
查询目录下的文件信息
|
List<ImageInfo> |
getImageInfo(String fileId)
根据图片ID获取缩放图片
|
List<ImageInfo> |
getImageInfo(String fileId,
boolean resize)
根据图片ID获取缩放图片
|
String |
getToken()
获取系统账号Token
|
String |
getToken(String tenantId)
获取指定租户对应的系统账号Token
|
DirInfo |
modDirInfo(DirInfo dirInfo)
修改目录信息
|
FileInfo |
modFileDirectoryId(String fileId,
String dirId)
修改文件目录
|
FileInfo |
modFileExpireDate(String fileId,
LocalDateTime expireDate)
设置文件过期时间
|
FileInfo |
modFileInfo(FileInfo fileInfo)
修改文件信息
|
void |
move(String fileId)
剪切文件到根目录
|
void |
move(String fileId,
String targetDirId)
剪切文件到一个指定目录
|
void |
moveDir(String dirId)
剪切目录到根目录
|
void |
moveDir(String dirId,
String targetDirId)
剪切目录到一个指定目录
|
String |
multipartUpload(File file)
分段上传
|
String |
multipartUpload(File file,
FileInfo fileInfo)
分段上传
|
String |
multipartUpload(File file,
FileInfo fileInfo,
int partSize)
分段上传
|
String |
multipartUpload(File file,
int partSize)
分段上传
|
String |
multipartUpload(InputStream input,
FileInfo fileInfo)
分段上传
|
String |
multipartUpload(InputStream input,
FileInfo fileInfo,
int partSize)
分段上传
|
String |
multipartUpload(MultipartUploadRequest request)
分段上传
|
RecycleBin |
remove(String fileId)
删除文件到回收站
|
RecycleBin |
removeDir(String dirId)
删除目录到回收站
|
DirInfo |
renameDir(String dirId,
String dirName)
重命名文件
|
FileInfo |
renameFile(String fileId,
String fileName)
重命名文件
|
ImageUpload |
resizeImage(File image,
FileInfo imageInfo)
图片上传
|
ImageUpload |
resizeImage(File image,
FileInfo imageInfo,
int width,
int height)
图片上传并缩放
|
ImageInfo |
resizeImage(String fileId,
int width,
int height)
根据图片ID缩放图片
|
ImageInfo |
resizeImage(String fileId,
int width,
int height,
boolean share)
根据图片ID缩放图片
|
ImageUpload |
resizeImageHeight(File image,
FileInfo imageInfo,
int height)
图片上传 指定缩放高度
|
ImageInfo |
resizeImageHeight(String fileId,
int height)
指定修改图片高度,宽度等比例缩放
|
ImageInfo |
resizeImageHeight(String fileId,
int height,
boolean share)
指定修改图片高度,宽度等比例缩放
|
ImageUpload |
resizeImageWidth(File image,
FileInfo imageInfo,
int width)
图片上传 指定缩放宽度
|
ImageInfo |
resizeImageWidth(String fileId,
int width)
指定修改图片宽度,高度等比例缩放
|
ImageInfo |
resizeImageWidth(String fileId,
int width,
boolean share)
指定修改图片宽度,高度等比例缩放
|
void |
restore(String fileId)
恢复回收站文件
|
void |
restoreRecycleBin(String recycleId)
恢复回收站文件
|
DMC |
setIamUserToken(String iamUserToken)
设置Iam用户Token,当前线程生效
|
DMC |
setIamUserToken(String iamUserToken,
boolean useOnce)
获取Iam用户Token,当前线程仅一次有效,调用dmc接口后会自动清除
|
DMC |
setTenantId(String tenantId)
设置上传租户,当前线程生效
只有默认(default)租户才能使用
文件都上传到该租户
本质是更新fileInfo一个属性tenantId
和
switchTenantId()不要混用,切换租户,该设定会被清空
|
ShareInfo |
share(ShareRequest request)
分享指定文件
|
ShareInfo |
share(String fileId)
分享指定文件
|
ShareInfo |
share(String fileId,
int allowCount)
分享指定文件,指定分享链接可使用次数
|
ShareInfo |
share(String fileId,
int allowCount,
boolean deleteFile)
分享指定文件,指定分享链接可使用次数,并指定是否在次数用完后删除文件
|
ShareInfo |
share(String fileId,
LocalDateTime expireDate)
分享指定文件,指定分享链接过期时间
|
void |
shutdown()
Shuts down the DMC instance (release all resources) The DMC instance is
not usable after its shutdown() is called.
|
void |
switchTenantId()
切换登录租户到默认(default)租户
无租户即default租户,可以操作所有租户文件
|
void |
switchTenantId(String tenantId)
Switches to another tenantId
切换登录租户,当前client生效
上传文件均归属该租户
没有权限操作其他租户的文件
和
setTenantId(String)不要混用,调用后会使setTenantId(String)失效
|
FileInfo |
upload(byte[] bytes,
FileInfo fileInfo)
普通上传,指定文件信息
|
FileInfo |
upload(byte[] bytes,
String filename)
普通上传
|
FileInfo |
upload(byte[] bytes,
String filename,
String dirId)
普通上传
|
FileInfo |
upload(File file)
普通上传
|
FileInfo |
upload(File file,
FileInfo fileInfo)
普通上传,指定文件信息
|
FileInfo |
upload(File file,
String dirId)
普通上传
|
FileInfo |
upload(File file,
String filename,
String dirId)
普通上传
|
FileInfo |
upload(InputStream input,
FileInfo fileInfo)
普通上传,指定文件信息
|
FileInfo |
upload(InputStream input,
String filename)
普通上传
|
FileInfo |
upload(InputStream input,
String filename,
String dirId)
普通上传
|
FileInfo |
upload(UploadRequest request)
普通上传
|
batchCopyV1, batchCopyV1, batchMoveV1, batchMoveV1, batchRemoveV1, batchRemoveV1, claimFileIdV1, copyDirV1, copyDirV1, copyV1, copyV1, createDirV1, createDirV1, createDirV1, deleteShareV1, deleteShareV1, deleteV1, deleteV1, downloadPartV1, downloadV1, downloadV1, getDirContentV1, getDirContentV1, getDirInfoByNameV1, getDirInfoV1, getDirInfoV1, getFileInfoV1, getFileInfoV1, getToken, moveDirV1, moveDirV1, moveV1, moveV1, removeDirV1, removeDirV1, removeV1, removeV1, renameDirV1, renameDirV1, renameV1, renameV1, shareV1, shareV1, shareV1, shareV1, uploadCoverV1, uploadCoverV1, uploadPartCoverV1, uploadPartV1, uploadShareV1, uploadShareV1, uploadV1, uploadV1addAppId, addUploadWhitelist, checkAppIdExist, deleteAppId, deleteUploadWhitelist, enableOnlinePreviewToken, enableUploadWhitelist, getUploadWhitelist, updateBucketConfig, updateUploadWhitelistString copy(String fileId) throws Exception
fileId - 被复制的文件IDException - 程序处理过程遇到的任何错误String copy(String fileId, String targetDirId) throws Exception
fileId - 被复制的文件IDtargetDirId - 目标目录IDException - 程序处理过程遇到的任何错误String copyDir(String dirId) throws Exception
dirId - 被复制的目录IDException - 程序处理过程遇到的任何错误String copyDir(String dirId, String targetDirId) throws Exception
dirId - 被复制的目录IDtargetDirId - 目标目录IDException - 程序处理过程遇到的任何错误List<FileOpTree> batchCopy(List<String> fileIds, List<String> dirIds, String targetDirId) throws Exception
fileIds - 被复制的文件ID集合dirIds - 被复制的目录ID集合targetDirId - 目标目录IDException - 程序处理过程遇到的任何错误List<FileOpTree> batchCopy(FileOpRequest request) throws Exception
request - 请求信息Exception - 程序处理过程遇到的任何错误void move(String fileId) throws Exception
fileId - 被剪切的文件IDException - 程序处理过程遇到的任何错误void move(String fileId, String targetDirId) throws Exception
fileId - 被剪切的文件IDtargetDirId - 目标目录IDException - 程序处理过程遇到的任何错误void moveDir(String dirId) throws Exception
dirId - 被剪切的目录IDException - 程序处理过程遇到的任何错误void moveDir(String dirId, String targetDirId) throws Exception
dirId - 被剪切的目录IDtargetDirId - 目标目录IDException - 程序处理过程遇到的任何错误void batchMove(List<String> fileIds, List<String> dirIds, String targetDirId) throws Exception
fileIds - 被剪切的文件ID集合dirIds - 被剪切的目录ID集合targetDirId - 目标目录IDException - 程序处理过程遇到的任何错误void batchMove(FileOpRequest request) throws Exception
request - 请求信息Exception - 程序处理过程遇到的任何错误void delete(String fileId) throws Exception
fileId - 被删除的文件IDException - 程序处理过程遇到的任何错误void deleteDir(String dirId) throws Exception
dirId - 被删除的目录IDException - 程序处理过程遇到的任何错误void batchDelete(List<String> fileIds, List<String> dirIds) throws Exception
fileIds - 被删除的文件ID集合dirIds - 被删除的目录ID集合Exception - 程序处理过程遇到的任何错误void batchDelete(BatchRequest request) throws Exception
request - 请求信息Exception - 程序处理过程遇到的任何错误FileInfo upload(File file) throws Exception
file - fileException - 程序处理过程遇到的任何错误FileInfo upload(File file, String dirId) throws Exception
file - 文件dirId - 目录、Exception - 程序处理过程遇到的任何错误FileInfo upload(File file, String filename, String dirId) throws Exception
file - 文件filename - 文件名 带后缀名 VanGogh.jpgdirId - 目录Exception - 程序处理过程遇到的任何错误FileInfo upload(File file, FileInfo fileInfo) throws Exception
file - 文件fileInfo - 文件信息Exception - 程序处理过程遇到的任何错误FileInfo upload(byte[] bytes, String filename) throws Exception
bytes - bytes 字节数组filename - 文件名 带后缀名 VanGogh.jpgException - 程序处理过程遇到的任何错误FileInfo upload(byte[] bytes, String filename, String dirId) throws Exception
bytes - bytes 字节数组filename - 文件名 带后缀名 VanGogh.jpgdirId - 目录IDException - 程序处理过程遇到的任何错误FileInfo upload(byte[] bytes, FileInfo fileInfo) throws Exception
bytes - 字节数组fileInfo - 文件信息Exception - 程序处理过程遇到的任何错误FileInfo upload(InputStream input, String filename) throws Exception
input - input 输入流filename - 文件名 带后缀名 VanGogh.jpgException - 程序处理过程遇到的任何错误FileInfo upload(InputStream input, String filename, String dirId) throws Exception
input - input 输入流filename - 文件名 带后缀名 VanGogh.jpgdirId - 目录IDException - 程序处理过程遇到的任何错误FileInfo upload(InputStream input, FileInfo fileInfo) throws Exception
input - 输入流fileInfo - 文件信息Exception - 程序处理过程遇到的任何错误FileInfo upload(UploadRequest request) throws Exception
request - 请求信息Exception - 程序处理过程遇到的任何错误FileInfo coverUpload(String fileId, File file) throws Exception
fileId - 文件IDfile - fileException - 程序处理过程遇到的任何错误FileInfo coverUpload(String fileId, byte[] bytes) throws Exception
fileId - 文件IDbytes - 字节数组Exception - 程序处理过程遇到的任何错误FileInfo coverUpload(String fileId, InputStream input) throws Exception
fileId - 文件IDinput - 输入流Exception - 程序处理过程遇到的任何错误List<FileInfo> batchUpload(List<File> files) throws Exception
files - 文件集合Exception - 程序处理过程遇到的任何错误List<FileInfo> batchUpload(List<File> files, List<FileInfo> fileInfos) throws Exception
files - 文件集合fileInfos - 文件信息集合Exception - 程序处理过程遇到的任何错误List<FileInfo> batchUploadBytes(List<byte[]> bytes, List<String> filenames) throws Exception
bytes - 字节数组集合filenames - 文件名集合Exception - 程序处理过程遇到的任何错误List<FileInfo> batchUploadBytes(List<byte[]> bytes, Map<String,FileInfo> fileInfos) throws Exception
bytes - 字节数组集合fileInfos - 文件名集合Exception - 程序处理过程遇到的任何错误List<FileInfo> batchUploadStream(List<InputStream> inputs, List<String> filenames) throws Exception
inputs - 输入流集合filenames - 文件名集合Exception - 程序处理过程遇到的任何错误List<FileInfo> batchUploadStream(List<InputStream> inputs, Map<String,FileInfo> fileInfos) throws Exception
inputs - 输入流集合fileInfos - 文件信息集合Exception - 程序处理过程遇到的任何错误List<FileInfo> batchUpload(UploadMultiRequest request) throws Exception
request - 请求信息Exception - 程序处理过程遇到的任何错误String multipartUpload(File file) throws Exception
file - 文件Exception - 程序处理过程遇到的任何错误String multipartUpload(File file, int partSize) throws Exception
file - 文件partSize - 分段大小Exception - 程序处理过程遇到的任何错误String multipartUpload(File file, FileInfo fileInfo) throws Exception
file - 文件fileInfo - 文件信息Exception - 程序处理过程遇到的任何错误String multipartUpload(File file, FileInfo fileInfo, int partSize) throws Exception
file - 文件fileInfo - 文件信息partSize - 分段大小Exception - 程序处理过程遇到的任何错误String multipartUpload(InputStream input, FileInfo fileInfo) throws Exception
input - 输入流fileInfo - 文件信息 fileName、size必填Exception - 程序处理过程遇到的任何错误String multipartUpload(InputStream input, FileInfo fileInfo, int partSize) throws Exception
input - 输入流fileInfo - 文件信息 fileName、size必填partSize - 分段大小Exception - 程序处理过程遇到的任何错误String multipartUpload(MultipartUploadRequest request) throws Exception
request - 请求信息Exception - 程序处理过程遇到的任何错误byte[] download(String fileId) throws Exception
fileId - 被下载的文件IDException - 程序处理过程遇到的任何错误void download(String fileId, String filePath) throws Exception
fileId - 被下载的文件IDfilePath - 文件路径Exception - 程序处理过程遇到的任何错误void download(String fileId, String filePath, String fileName) throws Exception
fileId - 被下载的文件IDfilePath - 文件路径fileName - 文件名Exception - 程序处理过程遇到的任何错误void download(String fileId, OutputStream output) throws Exception
fileId - 被下载的文件IDoutput - 输出流Exception - 程序处理过程遇到的任何错误byte[] batchDownload(List<String> fileIds, List<String> dirIds) throws Exception
fileIds - 被下载的文件ID集合dirIds - 被下载的目录ID集合Exception - 程序处理过程遇到的任何错误void batchDownload(List<String> fileIds, List<String> dirIds, String filePath) throws Exception
fileIds - 被下载的文件ID集合dirIds - 被下载的目录ID集合filePath - 文件路径Exception - 程序处理过程遇到的任何错误void batchDownload(List<String> fileIds, List<String> dirIds, String filePath, String fileName) throws Exception
fileIds - 被下载的文件ID集合dirIds - 被下载的目录ID集合filePath - 文件路径fileName - 文件名(xxx.zip)Exception - 程序处理过程遇到的任何错误void batchDownload(List<String> fileIds, List<String> dirIds, OutputStream output) throws Exception
fileIds - 被下载的文件ID集合dirIds - 被下载的目录ID集合output - 输出流Exception - 程序处理过程遇到的任何错误byte[] batchDownload(BatchRequest request) throws Exception
request - 请求信息Exception - 程序处理过程遇到的任何错误List<ImageInfo> getImageInfo(String fileId) throws Exception
fileId - 原图文件IDException - 程序处理过程遇到的任何错误List<ImageInfo> getImageInfo(String fileId, boolean resize) throws Exception
fileId - 原图文件IDresize - false-原图 true-缩放后的图片Exception - 程序处理过程遇到的任何错误ImageInfo resizeImageWidth(String fileId, int width) throws Exception
fileId - 原图文件IDwidth - 要设定的宽度Exception - 程序处理过程遇到的任何错误ImageInfo resizeImageWidth(String fileId, int width, boolean share) throws Exception
fileId - 原图文件IDwidth - 要设定的宽度share - 是否分享Exception - 程序处理过程遇到的任何错误ImageInfo resizeImageHeight(String fileId, int height) throws Exception
fileId - 原图文件IDheight - 要设定的高度Exception - 程序处理过程遇到的任何错误ImageInfo resizeImageHeight(String fileId, int height, boolean share) throws Exception
fileId - 原图文件IDheight - 要设定的高度share - 是否分享Exception - 程序处理过程遇到的任何错误ImageInfo resizeImage(String fileId, int width, int height) throws Exception
fileId - 原图文件IDwidth - 要设定的宽度height - 要设定的高度Exception - 程序处理过程遇到的任何错误ImageInfo resizeImage(String fileId, int width, int height, boolean share) throws Exception
fileId - 原图文件IDwidth - 要设定的宽度height - 要设定的高度share - 是否分享Exception - 程序处理过程遇到的任何错误ImageUpload resizeImage(File image, FileInfo imageInfo) throws Exception
image - imageimageInfo - 图片信息Exception - 程序处理过程遇到的任何错误ImageUpload resizeImageWidth(File image, FileInfo imageInfo, int width) throws Exception
image - imageimageInfo - 文件信息width - 要设定的宽度Exception - 程序处理过程遇到的任何错误ImageUpload resizeImageHeight(File image, FileInfo imageInfo, int height) throws Exception
image - imageimageInfo - 文件信息height - 要设定的高度Exception - 程序处理过程遇到的任何错误ImageUpload resizeImage(File image, FileInfo imageInfo, int width, int height) throws Exception
image - imageimageInfo - 文件信息width - 要设定的宽度height - 要设定的高度Exception - 程序处理过程遇到的任何错误RecycleBin remove(String fileId) throws Exception
fileId - 被删除的文件IDException - 程序处理过程遇到的任何错误RecycleBin removeDir(String dirId) throws Exception
dirId - 被删除的目录IDException - 程序处理过程遇到的任何错误List<RecycleBin> batchRemove(List<String> fileIds, List<String> dirIds) throws Exception
fileIds - 被删除的文件ID集合dirIds - 被删除的目录ID集合Exception - 程序处理过程遇到的任何错误List<RecycleBin> batchRemove(BatchRequest request) throws Exception
request - 请求信息Exception - 程序处理过程遇到的任何错误void deleteRecycleBin(String recycleId) throws Exception
recycleId - 回收站IDException - 程序处理过程遇到的任何错误void batchDeleteRecycleBin(List<String> recycleIds) throws Exception
recycleIds - 回收站ID集合Exception - 程序处理过程遇到的任何错误void restoreRecycleBin(String recycleId) throws Exception
recycleId - 回收站IDException - 程序处理过程遇到的任何错误void batchRestoreRecycleBin(List<String> recycleIds) throws Exception
recycleIds - 回收站ID集合Exception - 程序处理过程遇到的任何错误void batchRestoreRecycleBin(BatchRequest request) throws Exception
request - 请求信息Exception - 程序处理过程遇到的任何错误void restore(String fileId) throws Exception
fileId - 被删除的文件IDException - 程序处理过程遇到的任何错误void batchRestore(List<String> fileIds) throws Exception
fileIds - 被删除的文件ID集合Exception - 程序处理过程遇到的任何错误ShareInfo share(String fileId) throws Exception
fileId - 被分享的文件IDException - 程序处理过程遇到的任何错误ShareInfo share(String fileId, LocalDateTime expireDate) throws Exception
fileId - 被分享的文件IDexpireDate - 过期使时间Exception - 程序处理过程遇到的任何错误ShareInfo share(String fileId, int allowCount) throws Exception
fileId - 被分享的文件IDallowCount - 分享地址可使用次数Exception - 程序处理过程遇到的任何错误ShareInfo share(String fileId, int allowCount, boolean deleteFile) throws Exception
fileId - 被分享的文件IDallowCount - 分享地址可使用次数deleteFile - 分享次数为0时,是否删除文件Exception - 程序处理过程遇到的任何错误ShareInfo share(ShareRequest request) throws Exception
request - 分享信息Exception - 程序处理过程遇到的任何错误void deleteShare(String shareId) throws Exception
shareId - 分享IDException - 程序处理过程遇到的任何错误void batchDeleteShare(List<String> shareIds) throws Exception
shareIds - 分享ID集合Exception - 程序处理过程遇到的任何错误DirInfo createDir(DirInfo dirInfo) throws Exception
dirInfo - 目录信息Exception - 程序处理过程遇到的任何错误DirInfo renameDir(String dirId, String dirName) throws Exception
dirId - 文件IDdirName - 新文件名Exception - 程序处理过程遇到的任何错误DirInfo modDirInfo(DirInfo dirInfo) throws Exception
dirInfo - 目录信息Exception - 程序处理过程遇到的任何错误DirInfo getDirInfo(String dirId) throws Exception
dirId - 目录IDException - 程序处理过程遇到的任何错误DirInfo getDirInfoByName(String dirName) throws Exception
dirName - 目录名称或者路径Exception - 程序处理过程遇到的任何错误DirInfo getDirInfoByName(String parentDirId, String dirName) throws Exception
| 目录ID | 父目录ID | 目录名称 |
|---|---|---|
| 0001 | 0000 | 一级目录 |
| 0002 | 0001 | 二级目录 |
| 0003 | 0002 | 三级目录 |
范例:查询三级目录
| parentDirId | dirName |
|---|---|
| 0002 | 三级目录 |
| 0001 | 二级目录/三级目录 |
| 0000 | 一级目录/二级目录/三级目录 |
parentDirId - 父目录IDdirName - 目录名称或者路径Exception - 程序处理过程遇到的任何错误FileInfo renameFile(String fileId, String fileName) throws Exception
fileId - 文件IDfileName - 新文件名Exception - 程序处理过程遇到的任何错误FileInfo modFileInfo(FileInfo fileInfo) throws Exception
fileInfo - 文件信息Exception - 程序处理过程遇到的任何错误FileInfo modFileExpireDate(String fileId, LocalDateTime expireDate) throws Exception
fileId - 文件IDexpireDate - 过期时间Exception - 程序处理过程遇到的任何错误FileInfo modFileDirectoryId(String fileId, String dirId) throws Exception
fileId - 文件IDdirId - 目录IDException - 程序处理过程遇到的任何错误FileInfo getFileInfo(String fileId) throws Exception
fileId - 文件IDException - 程序处理过程遇到的任何错误FileInfo getFileInfoByName(String fileName) throws Exception
fileName - 文件名Exception - 程序处理过程遇到的任何错误FileInfo getFileInfoByName(String dirId, String fileName) throws Exception
dirId - 目录IDfileName - 文件名Exception - 程序处理过程遇到的任何错误List<FileInfo> getFileInfos(String dirId) throws Exception
dirId - 目录IDException - 程序处理过程遇到的任何错误List<FileInfo> getFileInfos(List<String> fileIds) throws Exception
fileIds - 文件ID集合Exception - 程序处理过程遇到的任何错误String getToken()
void switchTenantId()
无租户即default租户,可以操作所有租户文件
void switchTenantId(String tenantId)
切换登录租户,当前client生效
setTenantId(String)不要混用,调用后会使setTenantId(String)失效tenantId - the tenantId to switch to。DMC setTenantId(String tenantId)
switchTenantId()不要混用,切换租户,该设定会被清空tenantId - 租户IDDMC setIamUserToken(String iamUserToken)
iamUserToken - Iam用户tokenDMC setIamUserToken(String iamUserToken, boolean useOnce)
iamUserToken - Iam用户tokenuseOnce - 是否一次性使用,为true每次调用dmc后自动清除线程变量void clearIamUserToken()
void shutdown()
String getConnectionPoolStats()
Copyright © 2025. All rights reserved.