类 AbstractFileOperateSpiController
java.lang.Object
com.iplatform.base.AbstractController
com.iplatform.base.AbstractSecurityController
com.iplatform.base.AbstractFileOperateSpiController
- 所有已实现的接口:
org.springframework.beans.factory.InitializingBean
- 直接已知子类:
SystemController
-
嵌套类概要
从类继承的嵌套类/接口 com.iplatform.base.AbstractController
AbstractController.ResponseFormat -
字段概要
从类继承的字段 com.iplatform.base.AbstractController
DEFAULT_JS_NAME, DEFAULT_PAGER_VIEW_NAME, logger -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected FileOperateSpiprotected StringclearCdnPrefix(String path) 清除给定文件地址的CDN前缀。protected String返回存储文件的前缀,根据平台配置参数:本地、FTP或OSS远程存储不同而返回不同前缀。protected com.walker.file.FileInfogetFileInfo(String id) 根据文件id编号,获取文件基本信息。protected List<com.walker.file.FileInfo>getFileInfoList(List<String> ids) protected byte[]getLocalFileData(com.walker.file.FileInfo fileInfo) 根据文件信息,加载文件二进制内容。protected byte[]getOssFileData(String id) 下载oss文件protected com.walker.file.FileInfo[]uploadFileToLocal(InputStream[] inputStream, String[] fileName, String groupId, long[] fileSize, Integer businessType, String owner) protected com.walker.file.FileInfouploadFileToLocal(InputStream inputStream, String fileName, String groupId, long fileSize) 已过时。protected com.walker.file.FileInfouploadFileToLocal(InputStream inputStream, String fileName, String groupId, long fileSize, Integer businessType, String owner) protected com.walker.file.FileInfo[]uploadFileToLocal(org.springframework.web.multipart.MultipartFile[] multipartFile, String groupId, Integer businessType, String owner, String fileContentType) 上传多个文件protected com.walker.file.FileInfouploadFileToLocal(org.springframework.web.multipart.MultipartFile multipartFile, String groupId, Integer businessType, String owner, String fileContentType) 上传文件到本地,业务控制器直接调用该方法。protected com.walker.file.FileInfo[]uploadFileToRemote(InputStream[] inputStream, String[] fileName, String groupId, long[] fileSize, Integer businessType, String owner) protected com.walker.file.FileInfouploadFileToRemote(InputStream inputStream, String fileName, String groupId, long fileSize) 已过时。protected com.walker.file.FileInfouploadFileToRemote(InputStream inputStream, String fileName, String groupId, long fileSize, Integer businessType, String owner) protected com.walker.file.FileInfouploadFileToRemote(String absoluteFilePath) 已过时。protected com.walker.file.FileInfouploadFileToRemote(String absoluteFilePath, Integer businessType, String owner) protected com.walker.file.FileInfo[]uploadFileToRemote(org.springframework.web.multipart.MultipartFile[] multipartFile, String groupId, Integer businessType, String owner, String fileContentType) protected com.walker.file.FileInfouploadFileToRemote(org.springframework.web.multipart.MultipartFile multipartFile, String groupId, Integer businessType, String owner, String fileContentType) 从类继承的方法 com.iplatform.base.AbstractSecurityController
acquireSecurityUserProperties, encryptPassword, getCurrentDataScope, getCurrentUser, getCurrentUserId, getCurrentUserPrincipal, getCurrentUserRoleIdList, isSupervisor, loginAsWorkflowRole, matchesPassword, validatePasswordRule从类继承的方法 com.iplatform.base.AbstractController
acquireTablePage, ajaxOutputFileStream, ajaxOutputFileStream, ajaxOutPutHtml, ajaxOutPutJson, ajaxOutPutText, ajaxOutPutXml, downloadSimpleFile, getArgumentManager, getArgumentVariable, getAttribute, getContextPath, getDoubleParameter, getFloatParameter, getIntParameter, getLongParameter, getParameter, getParameterUTF8, getParameterValues, getParamsDateTime, getPlatformCallback, getRequest, getResponse, getServerDomain, getThirdPartyManager, preparePageSearch, print, setAttribute, setDefaultContentType从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.beans.factory.InitializingBean
afterPropertiesSet
-
构造器详细资料
-
AbstractFileOperateSpiController
public AbstractFileOperateSpiController()
-
-
方法详细资料
-
acquireFileOperateSpi
-
getOssFileData
下载oss文件- 参数:
id- 文件唯一编号- 返回:
-
clearCdnPrefix
清除给定文件地址的CDN前缀。如:https://qnyun.com/oss/12345678去掉前缀后,只剩下"12345678"- 参数:
path- 给定的文件资源地址- 返回:
-
getCdnUrl
返回存储文件的前缀,根据平台配置参数:本地、FTP或OSS远程存储不同而返回不同前缀。- 返回:
-
getLocalFileData
protected byte[] getLocalFileData(com.walker.file.FileInfo fileInfo) 根据文件信息,加载文件二进制内容。- 参数:
fileInfo-- 返回:
-
getFileInfo
根据文件id编号,获取文件基本信息。- 参数:
id-- 返回:
-
getFileInfoList
-
uploadFileToLocal
protected com.walker.file.FileInfo uploadFileToLocal(InputStream inputStream, String fileName, String groupId, long fileSize, Integer businessType, String owner) throws Exception - 抛出:
Exception
-
uploadFileToLocal
protected com.walker.file.FileInfo[] uploadFileToLocal(InputStream[] inputStream, String[] fileName, String groupId, long[] fileSize, Integer businessType, String owner) throws Exception - 抛出:
Exception
-
uploadFileToLocal
protected com.walker.file.FileInfo uploadFileToLocal(org.springframework.web.multipart.MultipartFile multipartFile, String groupId, Integer businessType, String owner, String fileContentType) throws Exception 上传文件到本地,业务控制器直接调用该方法。- 参数:
multipartFile-groupId- 分组ID,可选businessType- 业务类型,可选,请参考电商模块(PID)owner- 数据归属:平台为-1,其他为顶级机构ID(商户ID)fileContentType- 前端传入的文件上传类型:uploadf 表示文件,其他为图片- 返回:
- 抛出:
Exception- 上传失败抛出异常
-
uploadFileToLocal
protected com.walker.file.FileInfo[] uploadFileToLocal(org.springframework.web.multipart.MultipartFile[] multipartFile, String groupId, Integer businessType, String owner, String fileContentType) throws Exception 上传多个文件- 参数:
multipartFile-groupId-businessType-owner-fileContentType-- 返回:
- 抛出:
Exception
-
uploadFileToRemote
protected com.walker.file.FileInfo uploadFileToRemote(InputStream inputStream, String fileName, String groupId, long fileSize, Integer businessType, String owner) throws Exception - 抛出:
Exception
-
uploadFileToRemote
protected com.walker.file.FileInfo[] uploadFileToRemote(InputStream[] inputStream, String[] fileName, String groupId, long[] fileSize, Integer businessType, String owner) throws Exception - 抛出:
Exception
-
uploadFileToRemote
protected com.walker.file.FileInfo uploadFileToRemote(org.springframework.web.multipart.MultipartFile multipartFile, String groupId, Integer businessType, String owner, String fileContentType) throws Exception - 抛出:
Exception
-
uploadFileToRemote
protected com.walker.file.FileInfo[] uploadFileToRemote(org.springframework.web.multipart.MultipartFile[] multipartFile, String groupId, Integer businessType, String owner, String fileContentType) throws Exception - 抛出:
Exception
-
uploadFileToLocal
@Deprecated protected com.walker.file.FileInfo uploadFileToLocal(InputStream inputStream, String fileName, String groupId, long fileSize) throws Exception 已过时。上传文件到服务器本地磁盘。- 参数:
inputStream- 文件流,系统使用完会自动关闭fileName- 文件名,如: demo.txtgroupId- 业务ID,可选- 返回:
- 抛出:
Exception
-
uploadFileToRemote
@Deprecated protected com.walker.file.FileInfo uploadFileToRemote(InputStream inputStream, String fileName, String groupId, long fileSize) throws Exception 已过时。上传文件到远程服务。- 参数:
inputStream- 文件流,系统使用完会自动关闭fileName- 文件名,如: demo.txtgroupId- 业务ID,可选- 返回:
- 抛出:
Exception
-
uploadFileToRemote
protected com.walker.file.FileInfo uploadFileToRemote(String absoluteFilePath, Integer businessType, String owner) throws Exception - 抛出:
Exception
-
uploadFileToRemote
@Deprecated protected com.walker.file.FileInfo uploadFileToRemote(String absoluteFilePath) throws Exception 已过时。上传文件到远程服务目录中。- 参数:
absoluteFilePath-- 返回:
- 返回上传文件基本信息
- 抛出:
Exception
-