diff --git a/src/main/java/neatlogic/framework/cmdb/dao/mapper/validator/ValidatorMapper.java b/src/main/java/neatlogic/framework/cmdb/dao/mapper/validator/ValidatorMapper.java
index 0e5a31a151102a04dfdf215ebfc3e7f641ac08d5..602594aace82f98fbb7b7e538ff3316821b0a2c7 100644
--- a/src/main/java/neatlogic/framework/cmdb/dao/mapper/validator/ValidatorMapper.java
+++ b/src/main/java/neatlogic/framework/cmdb/dao/mapper/validator/ValidatorMapper.java
@@ -27,6 +27,8 @@ public interface ValidatorMapper {
ValidatorVo getValidatorById(Long validatorId);
+ ValidatorVo getValidatorByName(String name);
+
void insertValidator(ValidatorVo validatorVo);
void updateValidator(ValidatorVo validatorVo);
diff --git a/src/main/java/neatlogic/framework/cmdb/dao/mapper/validator/ValidatorMapper.xml b/src/main/java/neatlogic/framework/cmdb/dao/mapper/validator/ValidatorMapper.xml
index 6f79dc095b2a78706a5022b886be78d9d3c69899..4dbf2d9684af399c5c92564e7d3d67b449b8e94e 100644
--- a/src/main/java/neatlogic/framework/cmdb/dao/mapper/validator/ValidatorMapper.xml
+++ b/src/main/java/neatlogic/framework/cmdb/dao/mapper/validator/ValidatorMapper.xml
@@ -31,6 +31,19 @@ limitations under the License.
WHERE id = #{value}
+
+
diff --git a/src/main/java/neatlogic/framework/cmdb/dto/ci/CiVo.java b/src/main/java/neatlogic/framework/cmdb/dto/ci/CiVo.java
index ca63c6b0c0fb9cda3cd8848acb32163b8ca756dd..8fb375ea50afe19d4fc1c89e65e47ec4575e036f 100644
--- a/src/main/java/neatlogic/framework/cmdb/dto/ci/CiVo.java
+++ b/src/main/java/neatlogic/framework/cmdb/dto/ci/CiVo.java
@@ -104,6 +104,10 @@ public class CiVo implements Serializable {
private FileVo fileVo;
@EntityField(name = "有效日期", type = ApiParamType.INTEGER)
private int expiredDay;
+ @EntityField(name = "字段显示设置列表", type = ApiParamType.JSONARRAY)
+ private List viewList;
+ @EntityField(name = "关系分组列表", type = ApiParamType.JSONARRAY)
+ private List relGroupList;
@Override
public boolean equals(Object o) {
@@ -476,4 +480,20 @@ public class CiVo implements Serializable {
public void setFileVo(FileVo fileVo) {
this.fileVo = fileVo;
}
+
+ public List getViewList() {
+ return viewList;
+ }
+
+ public void setViewList(List viewList) {
+ this.viewList = viewList;
+ }
+
+ public List getRelGroupList() {
+ return relGroupList;
+ }
+
+ public void setRelGroupList(List relGroupList) {
+ this.relGroupList = relGroupList;
+ }
}
diff --git a/src/main/java/neatlogic/framework/cmdb/dto/ci/RelVo.java b/src/main/java/neatlogic/framework/cmdb/dto/ci/RelVo.java
index 6e2a58cbb0752a95698728bf1ccabcda33a15794..235e81007b894552be7e8874518858a8806f64cd 100644
--- a/src/main/java/neatlogic/framework/cmdb/dto/ci/RelVo.java
+++ b/src/main/java/neatlogic/framework/cmdb/dto/ci/RelVo.java
@@ -65,7 +65,7 @@ public class RelVo implements Serializable {
@EntityField(name = "上游端规则名称", type = ApiParamType.STRING)
private String fromRuleText;
@EntityField(name = "上游端分组id", type = ApiParamType.LONG)
- private String fromGroupId;
+ private Long fromGroupId;
@EntityField(name = "上游端分组名称", type = ApiParamType.STRING)
private String fromGroupName;
@EntityField(name = "上游端是否唯一", type = ApiParamType.INTEGER)
@@ -97,7 +97,7 @@ public class RelVo implements Serializable {
@EntityField(name = "下游端规则名称", type = ApiParamType.STRING)
private String toRuleText;
@EntityField(name = "下游端分组id", type = ApiParamType.LONG)
- private String toGroupId;
+ private Long toGroupId;
@EntityField(name = "下游端分组名称", type = ApiParamType.STRING)
private String toGroupName;
@EntityField(name = "下游端是否唯一", type = ApiParamType.INTEGER)
@@ -238,11 +238,11 @@ public class RelVo implements Serializable {
this.fromRule = fromRule;
}
- public String getFromGroupId() {
+ public Long getFromGroupId() {
return fromGroupId;
}
- public void setFromGroupId(String fromGroupId) {
+ public void setFromGroupId(Long fromGroupId) {
this.fromGroupId = fromGroupId;
}
@@ -286,11 +286,11 @@ public class RelVo implements Serializable {
this.toRule = toRule;
}
- public String getToGroupId() {
+ public Long getToGroupId() {
return toGroupId;
}
- public void setToGroupId(String toGroupId) {
+ public void setToGroupId(Long toGroupId) {
this.toGroupId = toGroupId;
}
diff --git a/src/main/java/neatlogic/framework/cmdb/enums/CmdbImportExportHandlerType.java b/src/main/java/neatlogic/framework/cmdb/enums/CmdbImportExportHandlerType.java
index 6164487aa8d32963b27211ba617674bcb148678f..a809f1301e7759bc6d8cc1ee4aa20798ecc35b94 100644
--- a/src/main/java/neatlogic/framework/cmdb/enums/CmdbImportExportHandlerType.java
+++ b/src/main/java/neatlogic/framework/cmdb/enums/CmdbImportExportHandlerType.java
@@ -20,7 +20,10 @@ import neatlogic.framework.importexport.core.ImportExportHandlerType;
import neatlogic.framework.util.$;
public enum CmdbImportExportHandlerType implements ImportExportHandlerType {
- PROTOCOL("protocol", "term.cmdb.protocol"),
+ PROTOCOL("protocol", "协议"),
+ CI_TYPE("ciType", "模型类型"),
+ CI_VALIDATOR("cmdbValidator", "校验规则管理"),
+ CI_REL_TYPE("cmdbRelType", "关系类型管理"),
;
private String value;
diff --git a/src/main/java/neatlogic/framework/cmdb/exception/ci/CiTypeNotFoundException.java b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiTypeNotFoundException.java
new file mode 100644
index 0000000000000000000000000000000000000000..18406666d543a56a93eef2e2832a58c303506051
--- /dev/null
+++ b/src/main/java/neatlogic/framework/cmdb/exception/ci/CiTypeNotFoundException.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright(c) 2023 NeatLogic Co., Ltd. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package neatlogic.framework.cmdb.exception.ci;
+
+import neatlogic.framework.exception.core.ApiRuntimeException;
+
+@SuppressWarnings("serial")
+public class CiTypeNotFoundException extends ApiRuntimeException {
+
+ public CiTypeNotFoundException(Long id) {
+ super("nfcec.citypenotfoundexception.citypenotfoundexception", id);
+ }
+
+ public CiTypeNotFoundException(String name) {
+ super("nfcec.citypenotfoundexception.citypenotfoundexception", name);
+ }
+}
diff --git a/src/main/java/neatlogic/framework/cmdb/exception/reltype/RelTypeNotFoundException.java b/src/main/java/neatlogic/framework/cmdb/exception/reltype/RelTypeNotFoundException.java
new file mode 100644
index 0000000000000000000000000000000000000000..aaaba5bd8f4208e6405ec03a9ba0e48399e535ff
--- /dev/null
+++ b/src/main/java/neatlogic/framework/cmdb/exception/reltype/RelTypeNotFoundException.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright(c) 2023 NeatLogic Co., Ltd. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package neatlogic.framework.cmdb.exception.reltype;
+
+import neatlogic.framework.exception.core.ApiRuntimeException;
+
+@SuppressWarnings("serial")
+public class RelTypeNotFoundException extends ApiRuntimeException {
+
+ public RelTypeNotFoundException(Long id) {
+ super("nfcer.reltypenotfoundexception.reltypenotfoundexception", id);
+ }
+
+ public RelTypeNotFoundException(String name) {
+ super("nfcer.reltypenotfoundexception.reltypenotfoundexception", name);
+ }
+}
diff --git a/src/main/java/neatlogic/framework/cmdb/exception/validator/ValidatorNotFoundException.java b/src/main/java/neatlogic/framework/cmdb/exception/validator/ValidatorNotFoundException.java
index dc41eea7cd8f4f7a109aa93dc9d5a9ccfd163fb4..50fd038753e74f9ee99b42ac1ad3ecd4d340c510 100644
--- a/src/main/java/neatlogic/framework/cmdb/exception/validator/ValidatorNotFoundException.java
+++ b/src/main/java/neatlogic/framework/cmdb/exception/validator/ValidatorNotFoundException.java
@@ -20,6 +20,9 @@ import neatlogic.framework.exception.core.ApiRuntimeException;
public class ValidatorNotFoundException extends ApiRuntimeException {
public ValidatorNotFoundException(Long validatorId) {
- super("验证规则“{0}”不存在", validatorId);
+ super("nfcev.validatornotfoundexception.validatornotfoundexception", validatorId);
+ }
+ public ValidatorNotFoundException(String name) {
+ super("nfcev.validatornotfoundexception.validatornotfoundexception", name);
}
}