接口 MagicResourceService
- 所有已知实现类:
DefaultMagicResourceService
public interface MagicResourceService
资源存储服务
-
方法概要
修饰符和类型方法说明复制分组boolean删除文件或文件夹voidexport(String groupId, List<SelectedResource> resources, OutputStream os) <T extends MagicEntity>
T获取文件详情<T extends MagicEntity>
List<T> 获取所有文件获取分组详情getGroupName(String groupId) 获取完整分组名称getGroupPath(String groupId) 获取完整分组路径获取分组 Resourcedefault StringgetScriptName(MagicEntity entity) <T extends MagicEntity>
List<T> 获取目录下的所有文件boolean锁定资源boolean移动booleanprocessNotify(MagicNotify magicNotify) voidrefresh()刷新缓存<T extends MagicEntity>
booleansaveFile(T entity) 保存文件boolean保存分组tree()全部分组全部分组boolean解锁资源booleanupload(InputStream inputStream, boolean full)
-
方法详细资料
-
refresh
void refresh()刷新缓存 -
getResource
Resource getResource() -
processNotify
-
saveGroup
保存分组 -
move
移动- 参数:
src- 源IDgroupId- 目标分组
-
copyGroup
复制分组- 参数:
src- 源IDtarget- 目标分组
-
tree
全部分组 -
tree
全部分组 -
getGroupsByFileId
-
getGroupResource
获取分组 Resource- 参数:
id- 分组ID
-
saveFile
保存文件- 参数:
entity- 文件内容
-
delete
删除文件或文件夹- 参数:
id- 文件或分组ID
-
listFiles
获取目录下的所有文件- 参数:
groupId- 分组ID
-
files
获取所有文件- 参数:
type- 类型
-
file
获取文件详情 -
getGroup
获取分组详情 -
export
- 抛出:
IOException
-
lock
锁定资源 -
unlock
解锁资源 -
upload
- 抛出:
IOException
-
getGroupPath
获取完整分组路径 -
getGroupName
获取完整分组名称 -
getScriptName
-