public class SohelpBootResourceDBServiceImpl extends Object implements ISohelpBootResourceService
构造器和说明 |
---|
SohelpBootResourceDBServiceImpl() |
限定符和类型 | 方法和说明 |
---|---|
Map<String,Object> |
add(String filePath,
String fileContent) |
void |
deleteBatch(String filePath)
删除所有匹配的资源
|
void |
deleteByPath(String filePath)
删除指定的单个文件
|
boolean |
exists(String filePath)
根据地址判断资源是否存在
|
com.alibaba.fastjson.JSONObject |
getByPath(String path)
根据文件名获取文件内容
|
<T> T |
getByPath(String filePath,
Class<T> cls)
根据路径获取对象
|
List<com.alibaba.fastjson.JSONObject> |
listByPath(String filePath)
读取配置资源,列出当前目录的资源
|
<T> List<T> |
listByPath(String filePath,
Class<T> cls) |
<T> List<T> |
listByPath(String filePath,
Class<T> cls,
int deep)
查询deep目录下文件
|
List<com.alibaba.fastjson.JSONObject> |
listByPath(String filePath,
int deep)
资源列表
|
void |
renamePath(String srcFilePath,
String newFilePath)
修改路径
|
Map<String,Object> |
save(String filePath,
Map<String,Object> formMap)
保存配置资源
|
Map<String,Object> |
save(String filePath,
String fileJson) |
Map<String,Object> |
updateByPath(String filePath,
String fileContent)
更新
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
formatFilePath, readOnly
public boolean exists(String filePath)
ISohelpBootResourceService
exists
在接口中 ISohelpBootResourceService
filePath
- 资源路径public com.alibaba.fastjson.JSONObject getByPath(String path)
getByPath
在接口中 ISohelpBootResourceService
path
- public <T> T getByPath(String filePath, Class<T> cls) throws Exception
getByPath
在接口中 ISohelpBootResourceService
T
- filePath
- cls
- Exception
public Map<String,Object> save(String filePath, Map<String,Object> formMap) throws SQLException, BusiException
save
在接口中 ISohelpBootResourceService
filePath
- formMap
- SQLException
BusiException
public Map<String,Object> save(String filePath, String fileJson) throws SQLException, BusiException
save
在接口中 ISohelpBootResourceService
filePath
- fileJson
- SQLException
BusiException
public Map<String,Object> add(String filePath, String fileContent) throws SQLException, BusiException
add
在接口中 ISohelpBootResourceService
filePath
- fileContent
- SQLException
BusiException
public void renamePath(String srcFilePath, String newFilePath) throws SQLException, BusiException
renamePath
在接口中 ISohelpBootResourceService
srcFilePath
- 修改路径newFilePath
- SQLException
BusiException
public Map<String,Object> updateByPath(String filePath, String fileContent) throws SQLException, BusiException
updateByPath
在接口中 ISohelpBootResourceService
filePath
- 例如: filePath=/datasource/32932032009329fileContent
- SQLException
BusiException
public <T> List<T> listByPath(String filePath, Class<T> cls) throws SQLException
listByPath
在接口中 ISohelpBootResourceService
T
- filePath
- cls
- SQLException
public List<com.alibaba.fastjson.JSONObject> listByPath(String filePath)
listByPath
在接口中 ISohelpBootResourceService
public List<com.alibaba.fastjson.JSONObject> listByPath(String filePath, int deep)
ISohelpBootResourceService
listByPath
在接口中 ISohelpBootResourceService
filePath
- deep
- 包括查询的深度 1级,2级....public <T> List<T> listByPath(String filePath, Class<T> cls, int deep) throws SQLException
ISohelpBootResourceService
listByPath
在接口中 ISohelpBootResourceService
T
- filePath
- cls
- deep
- 深度1,2,3级SQLException
public void deleteByPath(String filePath) throws BusiException
ISohelpBootResourceService
deleteByPath
在接口中 ISohelpBootResourceService
BusiException
public void deleteBatch(String filePath) throws BusiException
deleteBatch
在接口中 ISohelpBootResourceService
filePath
- BusiException
Copyright © 2025. All rights reserved.