public class FileService extends Object
| 构造器和说明 |
|---|
FileService(Endpoint endpoint,
AccessTokenService accessTokenService) |
FileService(Endpoint endpoint,
Config config,
AccessTokenService accessTokenService) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
check(FileUploadRequest fileUploadRequest,
String accessToken) |
com.bimface.file.bean.AppendFileBean |
createAppendFile(String name,
String sourceId,
Long length)
创建追加文件
|
com.bimface.file.bean.AppendFileBean |
createAppendFile(String name,
String sourceId,
Long length,
String accessToken) |
void |
deleteFile(Long fileId)
删除文件
|
com.bimface.file.bean.FileBean |
getFile(Long fileId)
根据文件id获取文件元信息
|
com.bimface.file.bean.FileBean |
getFileMetadata(Long fileId)
已过时。
|
List<com.bimface.file.bean.FileBean> |
getFiles(FileBatchQueryRequest request)
根据批量获取文件元信息
|
com.bimface.file.bean.FileUploadStatusBean |
getFileUploadStatus(Long fileId)
根据文件id获取文件上传状态信息
|
com.bimface.file.bean.UploadPolicyBean |
getPolicy(String name,
String sourceId)
获取上传凭证
|
com.bimface.file.bean.UploadPolicyBean |
getPolicy(String name,
String sourceId,
String accessToken) |
com.bimface.file.bean.SupportFileBean |
getSupportedFileTypes()
根据文件id获取文件元信息
|
com.bimface.file.bean.AppendFileBean |
queryAppendFile(Long appendFileId)
查询追加文件信息
|
com.bimface.file.bean.AppendFileBean |
queryAppendFile(Long appendFileId,
String accessToken) |
com.bimface.file.bean.FileBean |
upload(FileUploadRequest fileUploadRequest)
上传文件
|
com.bimface.file.bean.FileBean |
upload(FileUploadRequest fileUploadRequest,
String accessToken) |
com.bimface.file.bean.AppendFileBean |
uploadAppendFile(InputStream inputStream,
Long appendFileId)
追加上传
|
com.bimface.file.bean.AppendFileBean |
uploadAppendFile(InputStream inputStream,
Long appendFileId,
Long fileLength,
Long position) |
com.bimface.file.bean.AppendFileBean |
uploadAppendFile(InputStream inputStream,
Long appendFileId,
String accessToken) |
com.bimface.file.bean.FileBean |
uploadByPolicy(String name,
String sourceId,
Long contentLength,
InputStream inputStream)
通过申请上传Policy的方式直接上传到OSS
|
com.bimface.file.bean.FileBean |
uploadByPolicy(String name,
String sourceId,
Long contentLength,
InputStream inputStream,
String accessToken) |
public FileService(Endpoint endpoint, AccessTokenService accessTokenService)
public FileService(Endpoint endpoint, Config config, AccessTokenService accessTokenService)
public com.bimface.file.bean.FileBean upload(FileUploadRequest fileUploadRequest) throws com.bimface.exception.BimfaceException
fileUploadRequest - 文件上传的请求参数FileBeancom.bimface.exception.BimfaceException - BimfaceExceptionpublic com.bimface.file.bean.FileBean upload(FileUploadRequest fileUploadRequest, String accessToken) throws com.bimface.exception.BimfaceException
com.bimface.exception.BimfaceExceptionpublic com.bimface.file.bean.UploadPolicyBean getPolicy(String name, String sourceId) throws com.bimface.exception.BimfaceException
name - 上传文件名,(带后缀名)sourceId - 上传源文件Id(非必选)UploadPolicyBeancom.bimface.exception.BimfaceException - BimfaceExceptionpublic com.bimface.file.bean.UploadPolicyBean getPolicy(String name, String sourceId, String accessToken) throws com.bimface.exception.BimfaceException
com.bimface.exception.BimfaceExceptionpublic com.bimface.file.bean.FileBean uploadByPolicy(String name, String sourceId, Long contentLength, InputStream inputStream) throws com.bimface.exception.BimfaceException
name - 上传文件名sourceId - 上传源文件Id(非必选)contentLength - 文件长度inputStream - 二进制文件流FileBeancom.bimface.exception.BimfaceException - BimfaceExceptionpublic com.bimface.file.bean.FileBean uploadByPolicy(String name, String sourceId, Long contentLength, InputStream inputStream, String accessToken) throws com.bimface.exception.BimfaceException
com.bimface.exception.BimfaceExceptionpublic void check(FileUploadRequest fileUploadRequest, String accessToken) throws com.bimface.exception.BimfaceException
com.bimface.exception.BimfaceExceptionpublic void deleteFile(Long fileId) throws com.bimface.exception.BimfaceException
fileId - 文件IDcom.bimface.exception.BimfaceException - BimfaceExceptionpublic com.bimface.file.bean.AppendFileBean createAppendFile(String name, String sourceId, Long length) throws com.bimface.exception.BimfaceException
name - 文件的全名,使用URL编码(UTF-8),最多256个字符sourceId - 调用方的文件源ID,不能重复length - 上传文件长度AppendFileBeancom.bimface.exception.BimfaceException - BimfaceExceptionpublic com.bimface.file.bean.AppendFileBean createAppendFile(String name, String sourceId, Long length, String accessToken) throws com.bimface.exception.BimfaceException
com.bimface.exception.BimfaceExceptionpublic com.bimface.file.bean.AppendFileBean queryAppendFile(Long appendFileId) throws com.bimface.exception.BimfaceException
appendFileId - AppendFileBeancom.bimface.exception.BimfaceException - BimfaceExceptionpublic com.bimface.file.bean.AppendFileBean queryAppendFile(Long appendFileId, String accessToken) throws com.bimface.exception.BimfaceException
com.bimface.exception.BimfaceExceptionpublic com.bimface.file.bean.AppendFileBean uploadAppendFile(InputStream inputStream, Long appendFileId) throws com.bimface.exception.BimfaceException
appendFileId - AppendFileBeancom.bimface.exception.BimfaceException - BimfaceExceptionpublic com.bimface.file.bean.AppendFileBean uploadAppendFile(InputStream inputStream, Long appendFileId, Long fileLength, Long position) throws com.bimface.exception.BimfaceException
com.bimface.exception.BimfaceExceptionpublic com.bimface.file.bean.AppendFileBean uploadAppendFile(InputStream inputStream, Long appendFileId, String accessToken) throws com.bimface.exception.BimfaceException
com.bimface.exception.BimfaceException@Deprecated public com.bimface.file.bean.FileBean getFileMetadata(Long fileId) throws com.bimface.exception.BimfaceException
fileId - 文件IdFileBeancom.bimface.exception.BimfaceException - BimfaceExceptionpublic com.bimface.file.bean.FileBean getFile(Long fileId) throws com.bimface.exception.BimfaceException
fileId - 文件IdFileBeancom.bimface.exception.BimfaceException - BimfaceExceptionpublic List<com.bimface.file.bean.FileBean> getFiles(FileBatchQueryRequest request) throws com.bimface.exception.BimfaceException
request - com.bimface.exception.BimfaceExceptionpublic com.bimface.file.bean.FileUploadStatusBean getFileUploadStatus(Long fileId) throws com.bimface.exception.BimfaceException
fileId - 文件IdFileBeancom.bimface.exception.BimfaceException - BimfaceExceptionpublic com.bimface.file.bean.SupportFileBean getSupportedFileTypes()
throws com.bimface.exception.BimfaceException
SupportFileBeancom.bimface.exception.BimfaceException - BimfaceExceptionCopyright © 2024. All rights reserved.