REQ-3540: 惹名scope的子节点名可以重复

This commit is contained in:
yanglin 2025-03-19 14:21:40 +08:00
parent 76cbac7bcc
commit acfe320172
3 changed files with 6 additions and 29 deletions

View File

@ -6,19 +6,12 @@ package cn.axzo.nanopart.doc.api.domain;
*/
public interface IndexNodeParentScope {
default IndexNodeScope nodeScope() {
return IndexNodeScope.NONE;
}
IndexNodeScope nodeScope();
default String parentCode() {
return "";
}
IndexNodeParentScope TEMPLATE_DATABASE_ROOT = new IndexNodeParentScope() {
@Override
public IndexNodeScope nodeScope() {
return IndexNodeScope.TEMPLATE_DATABASE;
}
};
IndexNodeParentScope TEMPLATE_DATABASE_ROOT = () -> IndexNodeScope.TEMPLATE_DATABASE;
}

View File

@ -9,9 +9,7 @@ import cn.axzo.nanopart.doc.api.enums.IndexNodeContext;
*/
public interface IndexNodeScope {
default IndexNodeContext context() {
return IndexNodeContext.NONE;
}
IndexNodeContext context();
default DatabaseScope scope() {
return DatabaseScope.NONE;
@ -32,22 +30,10 @@ public interface IndexNodeScope {
}
}
// @formatter:off
IndexNodeScope NONE = new IndexNodeScope() {};
// @formatter:on
IndexNodeScope NONE = () -> IndexNodeContext.NONE;
IndexNodeScope FILE_TEMPLATE = new IndexNodeScope() {
@Override
public IndexNodeContext context() {
return IndexNodeContext.FILE_TEMPLATE;
}
};
IndexNodeScope FILE_TEMPLATE = () -> IndexNodeContext.FILE_TEMPLATE;
IndexNodeScope TEMPLATE_DATABASE = new IndexNodeScope() {
@Override
public IndexNodeContext context() {
return IndexNodeContext.TEMPLATE_DATABASE;
}
};
IndexNodeScope TEMPLATE_DATABASE = () -> IndexNodeContext.TEMPLATE_DATABASE;
}

View File

@ -6,8 +6,6 @@ package cn.axzo.nanopart.doc.api.enums;
*/
public enum IndexNodeContext {
NONE,
// 系统内置
SYSTEM,
// 文件模版
FILE_TEMPLATE,
// 模版数据库