REQ-3540: misc

This commit is contained in:
yanglin 2025-03-21 18:07:48 +08:00
parent d075ff8443
commit 8638e855c9

View File

@ -101,26 +101,6 @@ public class IndexSupport {
"节点深度超过限制{}, 无法再创建新节点", docProps.getIndexNodeMaxDepth());
}
boolean isChildrenNameDuplicatable(IndexNodeParentScope parentScope) {
switch (parentScope.nodeScope().context()) {
case FILE_TEMPLATE:
case TEMPLATE_DATABASE:
return false;
default:
return parentScope.nodeScope().scope().getChildNameDuplicatable();
}
}
boolean isLimitChildrenCount(IndexNodeParentScope parentScope) {
switch (parentScope.nodeScope().context()) {
case FILE_TEMPLATE:
case TEMPLATE_DATABASE:
return true;
default:
return parentScope.nodeScope().scope().getLimitChildrenCount();
}
}
List<IndexNode> collectValidSubtreeAsValueRoot(IndexNode srcNode) {
List<IndexNode> subtreeNodes = indexNodeDao.collectValidSubtreeNodes(srcNode);
subtreeNodes.stream() //
@ -184,6 +164,26 @@ public class IndexSupport {
.list();
}
boolean isChildrenNameDuplicatable(IndexNodeParentScope parentScope) {
switch (parentScope.nodeScope().context()) {
case FILE_TEMPLATE:
case TEMPLATE_DATABASE:
return false;
default:
return parentScope.nodeScope().scope().getChildNameDuplicatable();
}
}
boolean isLimitChildrenCount(IndexNodeParentScope parentScope) {
switch (parentScope.nodeScope().context()) {
case FILE_TEMPLATE:
case TEMPLATE_DATABASE:
return true;
default:
return parentScope.nodeScope().scope().getLimitChildrenCount();
}
}
<T> Future<T> submit(Callable<T> callable) {
return executor.submit(() -> {
try {