public abstract class AbstractOOBase extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected Cache |
cache |
protected CommonConfig |
configuration |
protected cn.hutool.json.JSONObject |
convert |
protected FileCustomization |
customization |
protected String |
EDIT
============================
|
protected DocumentPermission |
editPermission |
protected FileEmbedded |
embedded |
protected OnlyProperties |
onlyProperties
配置信息 ============================
|
protected Plugins |
plugins |
protected SaveFileProcessor |
saveFileProcessor |
protected String |
VIEW |
protected DocumentPermission |
viewPermission |
| 构造器和说明 |
|---|
AbstractOOBase(CommonConfig configuration) |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract void |
close(cn.hutool.json.JSONObject jsonObject)
关闭文档
|
abstract String |
converted(String filetype,
String key,
String outputtype,
String title,
String password)
文件转化 #简单请求参数示例:
|
String |
getCommandServiceUrl()
保存文件回调地址
|
String |
getDowloadUrl(String fineId)
文件下载地址
|
String |
getFileId(String key) |
Integer |
getHistNum()
获取规定历史文件数量
|
String |
getKey(String fileId)
获取打开文档时的唯一key
|
protected DocumentPermission |
getPermission(String mode,
DocumentPermission documentPermission) |
protected String |
getServerName() |
FileMetadata |
getTempFile(String key)
临时文件信息
|
int |
getUserNum(String key)
获取文件的当前使用人数
|
protected FileMetadata |
handlerFile(Map<String,Object> map,
Boolean collaborativeEditing) |
abstract void |
handlerStatus(cn.hutool.json.JSONObject jsonObject)
文件保存 状态为6时调用
|
int |
iskey(String key,
Integer users)
缓存中存放文件使用人数
|
abstract Map |
openDocument(Map<String,Object> map,
String mode,
boolean collaborativeEditing,
DocumentPermission documentPermission) |
protected FileConfig |
openEditConfig(Map<String,Object> map,
String mode,
boolean collaborativeEditing,
DocumentPermission documentPermission) |
protected void |
ProcessConvertServiceResponceError(int errorCode) |
void |
removeTempFile(cn.hutool.json.JSONObject jsonObject)
删除临时文件信息
|
abstract String |
save(String key,
String userId)
手动执行保存回调
|
protected String |
saveMessage(Integer error) |
void |
setCache(String key,
String value)
缓存数据
|
protected final CommonConfig configuration
protected Cache cache
protected SaveFileProcessor saveFileProcessor
protected OnlyProperties onlyProperties
protected DocumentPermission viewPermission
protected DocumentPermission editPermission
protected FileCustomization customization
protected FileEmbedded embedded
protected Plugins plugins
protected cn.hutool.json.JSONObject convert
protected String EDIT
protected String VIEW
public AbstractOOBase(CommonConfig configuration)
protected String getServerName()
public Integer getHistNum()
public String getCommandServiceUrl()
public int iskey(String key, Integer users)
key - 文件唯一标识users - 用户人数public int getUserNum(String key)
key - 文件唯一标识public FileMetadata getTempFile(String key)
key - 文件唯一标识public void removeTempFile(cn.hutool.json.JSONObject jsonObject)
jsonObject - oo服务器回调参数protected FileMetadata handlerFile(Map<String,Object> map, Boolean collaborativeEditing) throws Exception
map - 文件信息{
必填 fileId
必填 fileName
必填 fileType
必填 fileSize
可用携带其它值
}collaborativeEditing - 是否协同Exception - 返回异常protected FileConfig openEditConfig(Map<String,Object> map, String mode, boolean collaborativeEditing, DocumentPermission documentPermission)
map - 文件信息mode - 模式collaborativeEditing - 是否协同documentPermission - 权限信息public abstract void close(cn.hutool.json.JSONObject jsonObject)
jsonObject - oo服务回调参数public abstract Map openDocument(Map<String,Object> map, String mode, boolean collaborativeEditing, DocumentPermission documentPermission)
map - 文件信息map{ - 必填 fileId
必填 fileName
必填 fileType
必填 fileSize
可用携带其它信息
}mode - 打开方式 edit/viewcollaborativeEditing - 是否协同编辑documentPermission - 权限信息 非必填public abstract void handlerStatus(cn.hutool.json.JSONObject jsonObject)
throws Exception
jsonObject - Exceptionpublic abstract String save(String key, String userId)
key - 文件唯一标识userId - 调用接口的用户public abstract String converted(String filetype, String key, String outputtype, String title, String password)
filetype - 文件类型key - 文件keyoutputtype - 输出类型title - 输出文件名称password - 加密文档的密码protected DocumentPermission getPermission(String mode, DocumentPermission documentPermission)
protected void ProcessConvertServiceResponceError(int errorCode)
throws Exception
ExceptionCopyright © 2024. All rights reserved.