Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
kt-keystone
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
kt-keystone
Commits
d77ababb
提交
d77ababb
authored
3月 24, 2022
作者:
黄夏豪
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(base): 增加了动作变量的调用
上级
d9f793cd
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
13 行增加
和
3 行删除
+13
-3
CompleteExpressionUtil.java
...ava/org/matrix/actuators/util/CompleteExpressionUtil.java
+13
-3
没有找到文件。
kt-base/src/main/java/org/matrix/actuators/util/CompleteExpressionUtil.java
浏览文件 @
d77ababb
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import
com.jayway.jsonpath.Configuration
;
import
com.jayway.jsonpath.Configuration
;
import
com.jayway.jsonpath.JsonPath
;
import
com.jayway.jsonpath.JsonPath
;
import
org.matrix.actuators.env.EnvironmentActuator
;
import
org.matrix.actuators.env.EnvironmentActuator
;
import
org.matrix.actuators.move.MoveActuator
;
import
org.matrix.actuators.sql.SqlExpActuator
;
import
org.matrix.actuators.sql.SqlExpActuator
;
import
org.matrix.util.SpringUtils
;
import
org.matrix.util.SpringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -24,16 +25,20 @@ public class CompleteExpressionUtil {
...
@@ -24,16 +25,20 @@ public class CompleteExpressionUtil {
public
static
final
String
JSON_PATH_REG
=
"\\{(\\s)*\\$.*?}|(<(\\s)*\\$.*?>)"
;
public
static
final
String
JSON_PATH_REG
=
"\\{(\\s)*\\$.*?}|(<(\\s)*\\$.*?>)"
;
public
static
final
String
ACTION_REG
=
"\\$(?=\\{(\\s)*
pre
\\.)(.*?)(?<=})(\\[(.*?)])?"
;
public
static
final
String
ACTION_REG
=
"\\$(?=\\{(\\s)*
(pre|mid|aft)[0-9]
\\.)(.*?)(?<=})(\\[(.*?)])?"
;
public
static
final
String
ENV_VARIABLE_REG
=
"\\#\\{(.*?)}"
;
public
static
final
String
ENV_VARIABLE_REG
=
"\\#\\{(.*?)}"
;
public
static
final
String
DYNAMIC_VARIABLE_REG
=
"\\$\\{(((?!
pre
\\.).)*?)}(\\[(.*?)])?"
;
public
static
final
String
DYNAMIC_VARIABLE_REG
=
"\\$\\{(((?!
(pre|mid|aft)[0-9]
\\.).)*?)}(\\[(.*?)])?"
;
public
static
final
String
PATH_REG
=
"\\{(((?!
pre
\\.).)*?)}(\\[(.*?)])?"
;
public
static
final
String
PATH_REG
=
"\\{(((?!
(pre|mid|aft)[0-9]
\\.).)*?)}(\\[(.*?)])?"
;
public
String
completeVariable
(
String
expression
,
Long
envId
,
Long
projectId
)
{
public
String
completeVariable
(
String
expression
,
Long
envId
,
Long
projectId
)
{
String
result
=
expression
;
String
result
=
expression
;
result
=
regexExpression
(
result
,
ACTION_REG
,
null
,
(
o
,
s
)
->
getMoveActuator
().
parseMoveVar
(
s
));
result
=
regexExpression
(
result
=
regexExpression
(
result
,
DYNAMIC_VARIABLE_REG
,
result
,
DYNAMIC_VARIABLE_REG
,
null
,
(
o
,
s
)
->
null
,
(
o
,
s
)
->
...
@@ -99,4 +104,9 @@ public class CompleteExpressionUtil {
...
@@ -99,4 +104,9 @@ public class CompleteExpressionUtil {
return
SpringUtils
.
getBean
(
"environmentActuator"
);
return
SpringUtils
.
getBean
(
"environmentActuator"
);
}
}
private
static
MoveActuator
getMoveActuator
(){
return
SpringUtils
.
getBean
(
"moveActuator"
);
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论