Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
c81904fa
o2oa
项目概览
weixin_42566577
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c81904fa
编写于
8月 23, 2022
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add list dump data
上级
c1b14b93
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
161 addition
and
253 deletion
+161
-253
o2server/configSample/externalStorageSources.json
o2server/configSample/externalStorageSources.json
+26
-182
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Config.java
.../src/main/java/com/x/base/core/project/config/Config.java
+20
-54
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ExternalStorageSource.java
...com/x/base/core/project/config/ExternalStorageSource.java
+13
-17
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ExternalStorageSources.java
...om/x/base/core/project/config/ExternalStorageSources.java
+8
-0
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/config/ActionListDumpData.java
...com/x/program/center/jaxrs/config/ActionListDumpData.java
+74
-0
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/config/ConfigAction.java
.../java/com/x/program/center/jaxrs/config/ConfigAction.java
+20
-0
未找到文件。
o2server/configSample/externalStorageSources.json
浏览文件 @
c81904fa
{
"file"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"processPlatform"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"mind"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"meeting"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"calendar"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"okr"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"cms"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"bbs"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"report"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"strategyDeploy"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"teamwork"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"structure"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"im"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"general"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
{}
],
"custom"
:
[
{
"protocol"
:
"webdav"
,
"username"
:
"admin"
,
"password"
:
"admin"
,
"host"
:
"127.0.0.1"
,
"port"
:
8080.0
,
"prefix"
:
""
,
"enable"
:
true
,
"weight"
:
100.0
,
"name"
:
"251"
,
"deepPath"
:
false
}
],
"store"
:
{},
{}
],
"store"
:
{
"demo"
:
{
"protocol"
:
"hdfs"
,
"username"
:
""
,
"password"
:
""
,
"host"
:
"hdfs://127.0.0.1"
,
"port"
:
9000.0
,
"name"
:
""
}
},
"###extension"
:
"扩展设置.###"
}
\ No newline at end of file
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Config.java
浏览文件 @
c81904fa
...
...
@@ -131,6 +131,7 @@ public class Config {
public
static
final
String
DIR_JVM
=
"jvm"
;
public
static
final
String
DIR_LOCAL
=
"local"
;
public
static
final
String
DIR_LOCAL_BACKUP
=
"local/backup"
;
public
static
final
String
DIR_LOCAL_DUMP
=
"local/dump"
;
public
static
final
String
DIR_LOCAL_REPOSITORY
=
"local/repository"
;
public
static
final
String
DIR_LOCAL_UPDATE
=
"local/update"
;
public
static
final
String
DIR_LOCAL_TEMP
=
"local/temp"
;
...
...
@@ -469,14 +470,13 @@ public class Config {
return
new
File
(
base
(),
DIR_STORE
);
}
public
static
File
dir_store
(
B
oolean
force
)
throws
Exception
{
public
static
File
dir_store
(
b
oolean
force
)
throws
Exception
{
File
dir
=
new
File
(
base
(),
DIR_STORE
);
if
(
force
)
{
if
((!
dir
.
exists
())
||
dir
.
isFile
())
{
FileUtils
.
forceMkdir
(
dir
);
}
if
(
force
&&
((!
dir
.
exists
())
||
dir
.
isFile
()))
{
FileUtils
.
forceMkdir
(
dir
);
}
return
dir
;
}
public
static
File
dir_store_jars
()
throws
Exception
{
...
...
@@ -1218,19 +1218,6 @@ public class Config {
}
}
// private Organization organization;
//
// public static synchronized Organization organization() throws Exception {
// if (null == instance().organization) {
// Organization obj = BaseTools.readConfigObject(PATH_CONFIG_ORGANIZATION, Organization.class);
// if (null == obj) {
// obj = Organization.defaultInstance();
// }
// instance().organization = obj;
// }
// return instance().organization;
// }
public
static
Object
resource
(
String
name
)
throws
Exception
{
return
initialContext
().
lookup
(
name
);
}
...
...
@@ -1253,11 +1240,6 @@ public class Config {
ConcurrentHashMap
<
String
,
Object
>
map
=
(
ConcurrentHashMap
<
String
,
Object
>)
initialContext
()
.
lookup
(
RESOURCE_NODE_APPLICATIONS
);
return
(
JsonElement
)
map
.
get
(
RESOURCE_NODE_APPLICATIONS
);
// Object o = initialContext().lookup(RESOURCE_NODE_APPLICATIONS);
// if (null != o) {
// return (JsonElement) o;
// }
// return null;
}
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -1265,7 +1247,6 @@ public class Config {
ConcurrentHashMap
<
String
,
Object
>
map
=
(
ConcurrentHashMap
<
String
,
Object
>)
initialContext
()
.
lookup
(
RESOURCE_NODE_APPLICATIONS
);
map
.
put
(
RESOURCE_NODE_APPLICATIONS
,
jsonElement
);
// initialContext().rebind(RESOURCE_NODE_APPLICATIONS, jsonElement);
}
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -1273,11 +1254,6 @@ public class Config {
ConcurrentHashMap
<
String
,
Object
>
map
=
(
ConcurrentHashMap
<
String
,
Object
>)
initialContext
()
.
lookup
(
RESOURCE_NODE_APPLICATIONS
);
return
(
Date
)
map
.
get
(
RESOURCE_NODE_APPLICATIONSTIMESTAMP
);
// Object o = initialContext().lookup(RESOURCE_NODE_APPLICATIONSTIMESTAMP);
// if (null != o) {
// return (Date) o;
// }
// return null;
}
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -1285,7 +1261,6 @@ public class Config {
ConcurrentHashMap
<
String
,
Object
>
map
=
(
ConcurrentHashMap
<
String
,
Object
>)
initialContext
()
.
lookup
(
RESOURCE_NODE_APPLICATIONS
);
map
.
put
(
RESOURCE_NODE_APPLICATIONSTIMESTAMP
,
date
);
// initialContext().rebind(RESOURCE_NODE_APPLICATIONSTIMESTAMP, date);
}
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -1293,11 +1268,6 @@ public class Config {
ConcurrentHashMap
<
String
,
Object
>
map
=
(
ConcurrentHashMap
<
String
,
Object
>)
initialContext
()
.
lookup
(
RESOURCE_NODE_APPLICATIONS
);
return
(
String
)
map
.
get
(
RESOURCE_NODE_CENTERSPRIMARYNODE
);
// Object o = initialContext().lookup()RESOURCE_NODE_CENTERSPRIMARYNODE;
// if (null != o) {
// return (String) o;
// }
// return null;
}
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -1312,11 +1282,6 @@ public class Config {
ConcurrentHashMap
<
String
,
Object
>
map
=
(
ConcurrentHashMap
<
String
,
Object
>)
initialContext
()
.
lookup
(
RESOURCE_NODE_APPLICATIONS
);
return
(
Integer
)
map
.
get
(
RESOURCE_NODE_CENTERSPRIMARYPORT
);
// Object o = initialContext().lookup(RESOURCE_NODE_CENTERSPRIMARYPORT);
// if (null != o) {
// return (Integer) o;
// }
// return null;
}
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -1324,7 +1289,6 @@ public class Config {
ConcurrentHashMap
<
String
,
Object
>
map
=
(
ConcurrentHashMap
<
String
,
Object
>)
initialContext
()
.
lookup
(
RESOURCE_NODE_APPLICATIONS
);
map
.
put
(
RESOURCE_NODE_CENTERSPRIMARYPORT
,
port
);
// initialContext().rebind(RESOURCE_NODE_CENTERSPRIMARYPORT, port);
}
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -1332,11 +1296,6 @@ public class Config {
ConcurrentHashMap
<
String
,
Object
>
map
=
(
ConcurrentHashMap
<
String
,
Object
>)
initialContext
()
.
lookup
(
RESOURCE_NODE_APPLICATIONS
);
return
(
Boolean
)
map
.
get
(
RESOURCE_NODE_CENTERSPRIMARYSSLENABLE
);
// Object o = initialContext().lookup(RESOURCE_NODE_CENTERSPRIMARYSSLENABLE);
// if (null != o) {
// return (Boolean) o;
// }
// return null;
}
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -1344,7 +1303,6 @@ public class Config {
ConcurrentHashMap
<
String
,
Object
>
map
=
(
ConcurrentHashMap
<
String
,
Object
>)
initialContext
()
.
lookup
(
RESOURCE_NODE_APPLICATIONS
);
map
.
put
(
RESOURCE_NODE_CENTERSPRIMARYSSLENABLE
,
sslEnable
);
// initialContext().rebind(RESOURCE_NODE_CENTERSPRIMARYSSLENABLE, sslEnable);
}
public
static
synchronized
ExecutorService
[]
resource_node_processPlatformExecutors
()
throws
Exception
{
...
...
@@ -1425,7 +1383,7 @@ public class Config {
return
command_java_path
().
startsWith
(
dir_jvm
().
toPath
().
resolve
(
OS_MACOS
+
"_"
+
JAVAVERSION_JAVA11
));
}
public
static
Path
path_commons_hadoop_windows
(
boolean
force
)
throws
Exception
{
public
static
Path
path_commons_hadoop_windows
(
boolean
force
)
throws
IOException
,
URISyntax
Exception
{
Path
path
=
Paths
.
get
(
base
(),
DIR_COMMONS_HADOOP_WINDOWS
);
if
((!
Files
.
exists
(
path
))
&&
force
)
{
Files
.
createDirectories
(
path
);
...
...
@@ -1433,7 +1391,7 @@ public class Config {
return
path
;
}
public
static
Path
path_commons_hadoop_linux
(
boolean
force
)
throws
Exception
{
public
static
Path
path_commons_hadoop_linux
(
boolean
force
)
throws
IOException
,
URISyntax
Exception
{
Path
path
=
Paths
.
get
(
base
(),
DIR_COMMONS_HADOOP_LINUX
);
if
((!
Files
.
exists
(
path
))
&&
force
)
{
Files
.
createDirectories
(
path
);
...
...
@@ -1441,7 +1399,7 @@ public class Config {
return
path
;
}
public
static
Path
path_commons_hadoop_aix
(
boolean
force
)
throws
Exception
{
public
static
Path
path_commons_hadoop_aix
(
boolean
force
)
throws
IOException
,
URISyntax
Exception
{
Path
path
=
Paths
.
get
(
base
(),
DIR_COMMONS_HADOOP_AIX
);
if
((!
Files
.
exists
(
path
))
&&
force
)
{
Files
.
createDirectories
(
path
);
...
...
@@ -1449,7 +1407,7 @@ public class Config {
return
path
;
}
public
static
Path
path_commons_hadoop_macos
(
boolean
force
)
throws
Exception
{
public
static
Path
path_commons_hadoop_macos
(
boolean
force
)
throws
IOException
,
URISyntax
Exception
{
Path
path
=
Paths
.
get
(
base
(),
DIR_COMMONS_HADOOP_MACOS
);
if
((!
Files
.
exists
(
path
))
&&
force
)
{
Files
.
createDirectories
(
path
);
...
...
@@ -1457,7 +1415,7 @@ public class Config {
return
path
;
}
public
static
Path
path_commons_hadoop_raspi
(
boolean
force
)
throws
Exception
{
public
static
Path
path_commons_hadoop_raspi
(
boolean
force
)
throws
IOException
,
URISyntax
Exception
{
Path
path
=
Paths
.
get
(
base
(),
DIR_COMMONS_HADOOP_RASPI
);
if
((!
Files
.
exists
(
path
))
&&
force
)
{
Files
.
createDirectories
(
path
);
...
...
@@ -1465,7 +1423,7 @@ public class Config {
return
path
;
}
public
static
Path
path_commons_hadoop_arm
(
boolean
force
)
throws
Exception
{
public
static
Path
path_commons_hadoop_arm
(
boolean
force
)
throws
IOException
,
URISyntax
Exception
{
Path
path
=
Paths
.
get
(
base
(),
DIR_COMMONS_HADOOP_ARM
);
if
((!
Files
.
exists
(
path
))
&&
force
)
{
Files
.
createDirectories
(
path
);
...
...
@@ -1473,7 +1431,7 @@ public class Config {
return
path
;
}
public
static
Path
path_commons_hadoop_mips
(
boolean
force
)
throws
Exception
{
public
static
Path
path_commons_hadoop_mips
(
boolean
force
)
throws
IOException
,
URISyntax
Exception
{
Path
path
=
Paths
.
get
(
base
(),
DIR_COMMONS_HADOOP_MIPS
);
if
((!
Files
.
exists
(
path
))
&&
force
)
{
Files
.
createDirectories
(
path
);
...
...
@@ -1481,4 +1439,12 @@ public class Config {
return
path
;
}
public
static
Path
path_local_dump
(
boolean
force
)
throws
IOException
,
URISyntaxException
{
Path
path
=
Paths
.
get
(
base
(),
DIR_LOCAL_DUMP
);
if
((!
Files
.
exists
(
path
))
&&
force
)
{
Files
.
createDirectories
(
path
);
}
return
path
;
}
}
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ExternalStorageSource.java
浏览文件 @
c81904fa
...
...
@@ -19,22 +19,20 @@ public class ExternalStorageSource extends ConfigObject {
// 无需保存
private
transient
String
_password
;
public
ExternalStorageSource
()
{
this
.
protocol
=
DEFAULT_PROTOCOL
;
this
.
username
=
DEFAULT_USERNAME
;
this
.
password
=
DEFAULT_PASSWORD
;
this
.
host
=
DEFAULT_HOST
;
this
.
port
=
DEFAULT_PORT
;
this
.
prefix
=
DEFAULT_PREFIX
;
this
.
enable
=
DEFAULT_ENABLE
;
this
.
weight
=
DEFAULT_WEIGHT
;
this
.
name
=
DEFAULT_NAME
;
this
.
deepPath
=
DEFAULT_DEEPPATH
;
}
public
static
ExternalStorageSource
defaultInstance
()
{
return
new
ExternalStorageSource
();
ExternalStorageSource
o
=
new
ExternalStorageSource
();
o
.
protocol
=
DEFAULT_PROTOCOL
;
o
.
username
=
DEFAULT_USERNAME
;
o
.
password
=
DEFAULT_PASSWORD
;
o
.
host
=
DEFAULT_HOST
;
o
.
port
=
DEFAULT_PORT
;
o
.
prefix
=
DEFAULT_PREFIX
;
o
.
enable
=
DEFAULT_ENABLE
;
o
.
weight
=
DEFAULT_WEIGHT
;
o
.
name
=
DEFAULT_NAME
;
o
.
deepPath
=
DEFAULT_DEEPPATH
;
o
.
store
=
DEFAULT_STORE
;
return
o
;
}
public
static
final
StorageProtocol
DEFAULT_PROTOCOL
=
StorageProtocol
.
webdav
;
...
...
@@ -154,7 +152,5 @@ public class ExternalStorageSource extends ConfigObject {
public
void
setStore
(
String
store
)
{
this
.
store
=
store
;
}
}
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ExternalStorageSources.java
浏览文件 @
c81904fa
...
...
@@ -61,6 +61,14 @@ public class ExternalStorageSources extends ConfigObject {
public
Map
<
String
,
Store
>
getStore
()
{
if
(
null
==
this
.
store
)
{
this
.
store
=
new
ConcurrentHashMap
<>();
Store
s
=
new
Store
();
s
.
setHost
(
"hdfs://127.0.0.1"
);
s
.
setName
(
""
);
s
.
setUsername
(
""
);
s
.
setPassword
(
""
);
s
.
setProtocol
(
StorageProtocol
.
hdfs
);
s
.
setPort
(
9000
);
this
.
store
.
put
(
"demo"
,
s
);
}
return
this
.
store
;
}
...
...
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/config/ActionListDumpData.java
0 → 100644
浏览文件 @
c81904fa
package
com.x.program.center.jaxrs.config
;
import
java.io.IOException
;
import
java.net.URISyntaxException
;
import
java.nio.file.DirectoryStream
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.tools.DateTools
;
import
io.swagger.v3.oas.annotations.media.Schema
;
public
class
ActionListDumpData
extends
BaseAction
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
ActionListDumpData
.
class
);
private
static
final
String
DUMPDATA_PREFIX
=
"dumpData_"
;
ActionResult
<
List
<
Wo
>>
execute
(
EffectivePerson
effectivePerson
)
throws
IOException
,
URISyntaxException
{
LOGGER
.
debug
(
"execute:{}."
,
effectivePerson:
:
getDistinguishedName
);
ActionResult
<
List
<
Wo
>>
result
=
new
ActionResult
<>();
List
<
Wo
>
wos
=
new
ArrayList
<>();
try
(
DirectoryStream
<
Path
>
stream
=
Files
.
newDirectoryStream
(
Config
.
path_local_dump
(
true
)))
{
for
(
Path
path
:
stream
)
{
String
fileName
=
path
.
getFileName
().
toString
();
if
(
StringUtils
.
startsWith
(
fileName
,
DUMPDATA_PREFIX
)
&&
BooleanUtils
.
isTrue
(
DateTools
.
isCompactDateTime
(
StringUtils
.
substringAfter
(
fileName
,
DUMPDATA_PREFIX
)))
&&
Files
.
exists
(
path
.
resolve
(
"catalog.json"
)))
{
Wo
wo
=
new
Wo
();
wo
.
setValue
(
fileName
);
wos
.
add
(
wo
);
}
}
}
result
.
setData
(
wos
.
stream
().
sorted
(
Comparator
.
comparing
(
Wo:
:
getValue
).
reversed
()).
collect
(
Collectors
.
toList
()));
return
result
;
}
@Schema
(
name
=
"com.x.program.center.jaxrs.config.ActionListDumpData$Wo"
)
public
static
class
Wo
extends
GsonPropertyObject
{
private
static
final
long
serialVersionUID
=
-
7649649109954668631L
;
private
String
value
;
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
}
}
o2server/x_program_center/src/main/java/com/x/program/center/jaxrs/config/ConfigAction.java
浏览文件 @
c81904fa
...
...
@@ -431,4 +431,24 @@ public class ConfigAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@Operation
(
summary
=
"列示所有数据备份."
,
operationId
=
OPERATIONID_PREFIX
+
"listDumpData"
,
responses
=
{
@ApiResponse
(
content
=
{
@Content
(
array
=
@ArraySchema
(
schema
=
@Schema
(
implementation
=
ActionListDumpData
.
Wo
.
class
)))
})
})
@JaxrsMethodDescribe
(
value
=
"列示所有数据备份."
,
action
=
ActionListDumpData
.
class
)
@GET
@Path
(
"list/dump/data"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
listDumpData
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
)
{
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
ActionResult
<
List
<
ActionListDumpData
.
Wo
>>
result
=
new
ActionResult
<>();
try
{
result
=
new
ActionListDumpData
().
execute
(
effectivePerson
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录