REQ-3540: misc
This commit is contained in:
parent
a13a4bb45a
commit
d075ff8443
@ -8,26 +8,6 @@ public interface IndexNodeParentScope {
|
||||
|
||||
IndexNodeScope nodeScope();
|
||||
|
||||
default boolean isChildrenNameDuplicatable() {
|
||||
switch (nodeScope().context()) {
|
||||
case FILE_TEMPLATE:
|
||||
case TEMPLATE_DATABASE:
|
||||
return false;
|
||||
default:
|
||||
return nodeScope().scope().getChildNameDuplicatable();
|
||||
}
|
||||
}
|
||||
|
||||
default boolean isLimitChildrenCount() {
|
||||
switch (nodeScope().context()) {
|
||||
case FILE_TEMPLATE:
|
||||
case TEMPLATE_DATABASE:
|
||||
return true;
|
||||
default:
|
||||
return nodeScope().scope().getLimitChildrenCount();
|
||||
}
|
||||
}
|
||||
|
||||
default String parentCode() {
|
||||
return IndexNodeScope.TREE_ROOT_NODE_CODE;
|
||||
}
|
||||
|
||||
@ -102,15 +102,23 @@ public class IndexSupport {
|
||||
}
|
||||
|
||||
boolean isChildrenNameDuplicatable(IndexNodeParentScope parentScope) {
|
||||
if (StringUtils.isNotBlank(parentScope.parentCode()))
|
||||
return indexNodeDao.getOrThrow(parentScope.parentCode()).isChildrenNameDuplicatable();
|
||||
return parentScope.isChildrenNameDuplicatable();
|
||||
switch (parentScope.nodeScope().context()) {
|
||||
case FILE_TEMPLATE:
|
||||
case TEMPLATE_DATABASE:
|
||||
return false;
|
||||
default:
|
||||
return parentScope.nodeScope().scope().getChildNameDuplicatable();
|
||||
}
|
||||
}
|
||||
|
||||
boolean isLimitChildrenCount(IndexNodeParentScope parentScope) {
|
||||
if (StringUtils.isNotBlank(parentScope.parentCode()))
|
||||
return indexNodeDao.getOrThrow(parentScope.parentCode()).isLimitChildrenCount();
|
||||
return parentScope.isLimitChildrenCount();
|
||||
switch (parentScope.nodeScope().context()) {
|
||||
case FILE_TEMPLATE:
|
||||
case TEMPLATE_DATABASE:
|
||||
return true;
|
||||
default:
|
||||
return parentScope.nodeScope().scope().getLimitChildrenCount();
|
||||
}
|
||||
}
|
||||
|
||||
List<IndexNode> collectValidSubtreeAsValueRoot(IndexNode srcNode) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user