public class BdfsService extends Object
| 构造器和说明 |
|---|
BdfsService(Endpoint endpoint,
AccessTokenService accessTokenService) |
BdfsService(Endpoint endpoint,
Config config,
AccessTokenService accessTokenService) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
abortMultiPartUpload(String projectId,
com.bimface.bdfs.bean.dto.v1.multipartupload.AbortMultipartUploadRequest abortMultipartUploadRequest)
终止分片上传任务
|
com.bimface.bdfs.bean.dto.FileItemAppendFileDTO |
appendUpload(InputStream fileIn,
String projectId,
String appendFileId,
String position)
追加上传文件
|
void |
batchDeleteFileItems(String projectId,
List<String> fileItemIds)
批量删除文件
|
com.bimface.bdfs.bean.dto.v1.FileItemDTOV1 |
completeMultiPartUpload(String projectId,
com.bimface.bdfs.bean.dto.v1.multipartupload.CompleteMultipartUploadRequest completeMultipartUploadRequest)
合并分片生成文件
|
List<com.bimface.bdfs.bean.dto.FileItemDTO> |
copyFile(String projectId,
com.bimface.bdfs.bean.CopyFileRequest copyFileRequest)
复制文件
|
com.bimface.bdfs.bean.dto.FileItemAppendFileDTO |
createAppendFile(String projectId,
String parentId,
String parentPath,
String name,
Long length,
String sourceId)
创建追加文件
|
com.bimface.bdfs.bean.dto.FileItemDTO |
createFolder(String projectId,
CreateFolderRequest createFolderRequest)
指定目录创建文件夹
|
com.bimface.bdfs.bean.dto.ProjectDTO |
createProject(String hubId,
ProjectCreateRequest request)
创建项目
|
com.bimface.bdfs.bean.dto.FileItemDTO |
createVersion(InputStream fileIn,
String projectId,
String fileItemId,
String path,
String name,
Long length,
String sourceId)
上传版本文件
|
String |
deleteFolder(String projectId,
String folderId,
String path)
删除文件夹
根据folderId(path)删除文件夹
|
com.bimface.bdfs.bean.dto.ProjectDTO |
deleteProject(String hubId,
String projectId)
删除项目
|
String |
deleteVersion(String projectId,
List<String> fileIds)
删除指定版本文件
|
String |
downloadFiles(String projectId,
List<String> fileItemIds)
打包下载压缩文件
|
com.bimface.bdfs.bean.dto.FileItemDTO |
fileRename(String projectId,
com.bimface.bdfs.bean.UpdateFileRequest updateFileRequest)
文件重命名
|
com.bimface.page.PagedList<com.bimface.bdfs.bean.dto.FileItemDTO> |
getAllVersions(String projectId,
String fileItemId,
String path,
Integer pageNo,
Integer pageSize)
获取所有版本文件信息
|
com.bimface.bdfs.bean.dto.FileItemAppendFileDTO |
getAppendFile(String projectId,
String appendFileId)
获取追加文件信息
获取FileItemAppendFile
|
com.bimface.page.PagedList<com.bimface.bdfs.bean.dto.FileItemDTO> |
getChildrenFileItems(String projectId,
FileItemQueryRequest fileItemQueryRequest)
获取children列表(不包含itemSource)
|
String |
getDownloadURl(String projectId,
String fileItemId,
String path,
Integer expireTime)
获取文件下载签名URL
|
com.bimface.bdfs.bean.dto.FileItemDTO |
getFileItemMeta(String projectId,
String fileItemId,
String path,
Boolean withItemSource)
获取文件信息(不包含itemSource信息)
|
String |
getFileItemPathById(String projectId,
String fileItemId)
获取文件路径
根据fileItemId获取fileItemPath
|
com.bimface.bdfs.bean.UploadPolicyResponse |
getFileItemPolicy(String projectId,
String parentId,
String parentPath,
String name,
String sourceId,
Long maxLength)
获取文件直传的policy凭证
获取上传file的policy
|
FileItemUploadStatusBean |
getFileItemStatus(String projectId,
String fileItemId,
String path)
获取文件状态
|
com.bimface.bdfs.bean.UploadPolicyResponse |
getFilePolicy(String projectId,
String fileItemId,
String path,
String name,
String sourceId,
Long maxLength)
获取新版本直传的policy凭证
|
com.bimface.bdfs.bean.dto.FileItemDTO |
getFolder(String projectId,
String folderId,
String path)
获取文件夹信息
|
String |
getFolderPathById(String projectId,
String folderId)
根据folderId 获取path
|
List<com.bimface.bdfs.bean.dto.HubDTO> |
getHubList(String name,
String tenantCode,
String info,
String dateTimeFrom,
String dateTimeTo)
获取hub列表
|
com.bimface.bdfs.bean.dto.HubDTO |
getHubMeta(Long hubId)
获取Hub Meta信息
|
String |
getMultipartSignedUrl(String projectId,
com.bimface.bdfs.bean.dto.v1.multipartupload.MultipartSignedUrlRequest multipartSignedUrlRequest)
获取分片上传url
|
com.bimface.bdfs.bean.dto.FileItemDTO |
getParent(String projectId,
String folderId)
获取父文件夹
|
List<com.bimface.bdfs.bean.dto.ProjectDTO> |
getProjectList(String hubId,
String name,
Boolean useFuzzySearch)
获取项目列表
|
com.bimface.bdfs.bean.dto.ProjectDTO |
getProjectMeta(String hubId,
String projectId)
获取项目信息
|
com.bimface.bdfs.bean.dto.FileItemWithPathDTO |
getProjectRootFolderInfo(String hubId,
String projectId)
获取项目根文件夹信息
|
com.bimface.bdfs.bean.dto.FileItemDTO |
getVersion(String projectId,
String fileId,
Boolean withFileSource)
获取指定版本文件信息
|
String |
getVersionSignedUrl(String projectId,
String fileId,
Integer expireTime)
下载指定版本文件
|
com.bimface.bdfs.bean.dto.v1.multipartupload.InitMultipartUploadDTO |
initMultipartUpload(String projectId,
com.bimface.bdfs.bean.dto.v1.multipartupload.InitMultipartUploadRequest initMultipartUploadRequest)
创建分片上传任务
|
List<com.bimface.bdfs.bean.dto.FileItemDTO> |
moveFile(String projectId,
com.bimface.bdfs.bean.MoveFileRequest moveFileRequest)
移动文件位置
|
com.bimface.bdfs.bean.dto.FileItemDTO |
updateFolder(String projectId,
com.bimface.bdfs.bean.UpdateFolderRequest updateFolderReq)
文件夹重命名
根据folderId(path)更新文件夹
|
com.bimface.bdfs.bean.dto.ProjectDTO |
updateProject(String hubId,
String projectId,
com.bimface.bdfs.bean.UpdateProjectRequest updateProjectReq)
更新项目信息
|
com.bimface.bdfs.bean.dto.FileItemDTO |
uploadByUrl(String projectId,
String parentId,
String parentPath,
String name,
String sourceId,
String url,
String etag,
Long maxLength)
指定外部文件url方式上传
|
com.bimface.bdfs.bean.dto.FileItemDTO |
uploadFileItem(InputStream fileIn,
String projectId,
String parentId,
String parentPath,
String name,
Long length,
String sourceId)
上传文件流
|
public BdfsService(Endpoint endpoint, AccessTokenService accessTokenService)
public BdfsService(Endpoint endpoint, Config config, AccessTokenService accessTokenService)
public List<com.bimface.bdfs.bean.dto.HubDTO> getHubList(String name, String tenantCode, String info, String dateTimeFrom, String dateTimeTo) throws com.bimface.exception.BimfaceException
name - hub名称tenantCode - 租户标识info - 描述信息dateTimeFrom - 开始时间dateTimeTo - 结束时间com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.HubDTO getHubMeta(Long hubId) throws com.bimface.exception.BimfaceException
hubId - hubIdcom.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.ProjectDTO createProject(String hubId, ProjectCreateRequest request) throws com.bimface.exception.BimfaceException
hubId - request - 项目目创建请求com.bimface.exception.BimfaceExceptionpublic List<com.bimface.bdfs.bean.dto.ProjectDTO> getProjectList(String hubId, String name, Boolean useFuzzySearch) throws com.bimface.exception.BimfaceException
hubId - name - 项目名称useFuzzySearch - 是否使用模糊查询com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.ProjectDTO getProjectMeta(String hubId, String projectId) throws com.bimface.exception.BimfaceException
hubId - hubIdprojectId - 项目Idcom.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.ProjectDTO deleteProject(String hubId, String projectId) throws com.bimface.exception.BimfaceException
hubId - hubIdprojectId - 项目Idcom.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.ProjectDTO updateProject(String hubId, String projectId, com.bimface.bdfs.bean.UpdateProjectRequest updateProjectReq) throws com.bimface.exception.BimfaceException
hubId - hubIdprojectId - 项目IdupdateProjectReq - 更新项目信息请求体com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemWithPathDTO getProjectRootFolderInfo(String hubId, String projectId) throws com.bimface.exception.BimfaceException
hubId - hubIdprojectId - 项目Idcom.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO createFolder(String projectId, CreateFolderRequest createFolderRequest) throws com.bimface.exception.BimfaceException
projectId - 项目idcreateFolderRequest - 文件夹创建请求com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO getFolder(String projectId, String folderId, String path) throws com.bimface.exception.BimfaceException
com.bimface.exception.BimfaceExceptionpublic com.bimface.page.PagedList<com.bimface.bdfs.bean.dto.FileItemDTO> getChildrenFileItems(String projectId, FileItemQueryRequest fileItemQueryRequest) throws com.bimface.exception.BimfaceException
projectId - 项目IDfileItemQueryRequest - com.bimface.exception.BimfaceExceptionpublic String getFolderPathById(String projectId, String folderId) throws com.bimface.exception.BimfaceException
projectId - 项目IDfolderId - 文件夹IDcom.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO getParent(String projectId, String folderId) throws com.bimface.exception.BimfaceException
projectId - folderId - com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO updateFolder(String projectId, com.bimface.bdfs.bean.UpdateFolderRequest updateFolderReq) throws com.bimface.exception.BimfaceException
projectId - 项目idupdateFolderReq - 更新文件夹请求体com.bimface.exception.BimfaceExceptionpublic String deleteFolder(String projectId, String folderId, String path) throws com.bimface.exception.BimfaceException
projectId - 项目idfolderId - 文件夹id(folderId和path,必须二选一填入)path - 文件夹路径,使用URL编码(UTF-8),最多256个字符(folderId和path,必须二选一填入)com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO uploadFileItem(InputStream fileIn, String projectId, String parentId, String parentPath, String name, Long length, String sourceId) throws com.bimface.exception.BimfaceException
fileIn - 文件流projectId - 项目idparentId - 父文件夹idparentPath - 父文件夹路径name - 文件名称length - 文件大小sourceId - 源文件idcom.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO uploadByUrl(String projectId, String parentId, String parentPath, String name, String sourceId, String url, String etag, Long maxLength) throws com.bimface.exception.BimfaceException
projectId - 项目IDparentId - 父文件夹IdparentPath - 父文件夹路径name - 文件名称sourceId - 调用方的文件源ID,不能重复url - sourceUrletag - 文件etagmaxLength - maxLengthcom.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemAppendFileDTO createAppendFile(String projectId, String parentId, String parentPath, String name, Long length, String sourceId) throws com.bimface.exception.BimfaceException
projectId - 项目IDparentId - 父文件夹IdparentPath - 父文件夹路径name - 文件名称length - 文件流的长度sourceId - 调用方的文件源ID,不能重复com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemAppendFileDTO getAppendFile(String projectId, String appendFileId) throws com.bimface.exception.BimfaceException
projectId - 项目IDappendFileId - 追加上传IDcom.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemAppendFileDTO appendUpload(InputStream fileIn, String projectId, String appendFileId, String position) throws com.bimface.exception.BimfaceException
projectId - 项目IDappendFileId - 父文件夹Idposition - 父文件夹路径com.bimface.exception.BimfaceExceptionpublic List<com.bimface.bdfs.bean.dto.FileItemDTO> copyFile(String projectId, com.bimface.bdfs.bean.CopyFileRequest copyFileRequest) throws com.bimface.exception.BimfaceException
projectId - 项目IDcopyFileRequest - 复制文件请求体com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.UploadPolicyResponse getFileItemPolicy(String projectId, String parentId, String parentPath, String name, String sourceId, Long maxLength) throws com.bimface.exception.BimfaceException
projectId - 项目IDparentId - 父文件IDparentPath - 父文件路径name - 文件名称sourceId - 调用方的文件源IDmaxLength - 文件流的长度com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO getFileItemMeta(String projectId, String fileItemId, String path, Boolean withItemSource) throws com.bimface.exception.BimfaceException
projectId - 项目idfileItemId - 文件idpath - 文件路径withItemSource - 是否携带fileItemSource信息com.bimface.exception.BimfaceExceptionpublic FileItemUploadStatusBean getFileItemStatus(String projectId, String fileItemId, String path) throws com.bimface.exception.BimfaceException
projectId - 项目idfileItemId - 文件idpath - 文件路径com.bimface.exception.BimfaceExceptionpublic String getDownloadURl(String projectId, String fileItemId, String path, Integer expireTime) throws com.bimface.exception.BimfaceException
projectId - 项目idfileItemId - 文件idpath - 文件路径expireTime - 过期时间com.bimface.exception.BimfaceExceptionpublic String getFileItemPathById(String projectId, String fileItemId) throws com.bimface.exception.BimfaceException
projectId - 项目IDfileItemId - 文件IDcom.bimface.exception.BimfaceExceptionpublic String downloadFiles(String projectId, List<String> fileItemIds) throws com.bimface.exception.BimfaceException
projectId - 项目IDfileItemIds - 文件IDcom.bimface.exception.BimfaceExceptionpublic List<com.bimface.bdfs.bean.dto.FileItemDTO> moveFile(String projectId, com.bimface.bdfs.bean.MoveFileRequest moveFileRequest) throws com.bimface.exception.BimfaceException
projectId - 项目IDmoveFileRequest - 移动文件请求体com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO fileRename(String projectId, com.bimface.bdfs.bean.UpdateFileRequest updateFileRequest) throws com.bimface.exception.BimfaceException
projectId - 项目IDupdateFileRequest - 更新文件请求体com.bimface.exception.BimfaceExceptionpublic void batchDeleteFileItems(String projectId, List<String> fileItemIds) throws com.bimface.exception.BimfaceException
projectId - 项目idfileItemIds - 文件id集合com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.v1.multipartupload.InitMultipartUploadDTO initMultipartUpload(String projectId, com.bimface.bdfs.bean.dto.v1.multipartupload.InitMultipartUploadRequest initMultipartUploadRequest) throws com.bimface.exception.BimfaceException
projectId - 项目idinitMultipartUploadRequest - 初始化分片上传的请求体com.bimface.exception.BimfaceException - BimfaceExceptionpublic String getMultipartSignedUrl(String projectId, com.bimface.bdfs.bean.dto.v1.multipartupload.MultipartSignedUrlRequest multipartSignedUrlRequest) throws com.bimface.exception.BimfaceException
projectId - 项目 idmultipartSignedUrlRequest - 获取分片的 signedUrl的请求体com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.v1.FileItemDTOV1 completeMultiPartUpload(String projectId, com.bimface.bdfs.bean.dto.v1.multipartupload.CompleteMultipartUploadRequest completeMultipartUploadRequest) throws com.bimface.exception.BimfaceException
projectId - 项目 idcompleteMultipartUploadRequest - 完成分片上传的请求体com.bimface.exception.BimfaceExceptionpublic String abortMultiPartUpload(String projectId, com.bimface.bdfs.bean.dto.v1.multipartupload.AbortMultipartUploadRequest abortMultipartUploadRequest) throws com.bimface.exception.BimfaceException
projectId - 项目 idabortMultipartUploadRequest - 终止分片上传的请求体com.bimface.exception.BimfaceExceptionpublic com.bimface.page.PagedList<com.bimface.bdfs.bean.dto.FileItemDTO> getAllVersions(String projectId, String fileItemId, String path, Integer pageNo, Integer pageSize) throws com.bimface.exception.BimfaceException
projectId - 项目IDfileItemId - 文件Idpath - 文件路径pageNo - 开始页码pageSize - 每页大小com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO createVersion(InputStream fileIn, String projectId, String fileItemId, String path, String name, Long length, String sourceId) throws com.bimface.exception.BimfaceException
fileIn - 文件流projectId - 项目IDfileItemId - 文件Idpath - 文件路径name - 文件名称length - 文件长度sourceId - 调用方的文件源ID,不能重复com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.UploadPolicyResponse getFilePolicy(String projectId, String fileItemId, String path, String name, String sourceId, Long maxLength) throws com.bimface.exception.BimfaceException
projectId - 项目IDfileItemId - 文件Idpath - 文件路径name - 文件名称sourceId - 调用方的文件源ID,不能重复maxLength - 文件流的长度com.bimface.exception.BimfaceExceptionpublic com.bimface.bdfs.bean.dto.FileItemDTO getVersion(String projectId, String fileId, Boolean withFileSource) throws com.bimface.exception.BimfaceException
projectId - 项目IDfileId - 文件版本IdwithFileSource - 是否携带itemSourcecom.bimface.exception.BimfaceExceptionpublic String getVersionSignedUrl(String projectId, String fileId, Integer expireTime) throws com.bimface.exception.BimfaceException
projectId - 项目IDfileId - 文件版本IdexpireTime - 有限期,默认3600scom.bimface.exception.BimfaceExceptionCopyright © 2024. All rights reserved.