summaryrefslogtreecommitdiffstats
path: root/ResmanagementService/service
diff options
context:
space:
mode:
authorluxin <luxin7@huawei.com>2018-02-03 18:06:22 +0800
committerluxin <luxin7@huawei.com>2018-02-03 18:06:22 +0800
commita5daca3fc85954fd3393e6d51dd0b303fe5c022b (patch)
tree9976f2660bbc6d5cec94d50f11c96b849282039a /ResmanagementService/service
parent59b6b4a862f6c405a4f25bb0c4e7fe7fc2432d56 (diff)
description Replaced by constant
Change-Id: Ieeee362199b2d3b9b74f3cf6d75d26b58ad7f6dc Issue-ID: VFC-672 Signed-off-by: luxin <luxin7@huawei.com>
Diffstat (limited to 'ResmanagementService/service')
-rw-r--r--ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/ParamConstant.java2
-rw-r--r--ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java9
2 files changed, 7 insertions, 4 deletions
diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/ParamConstant.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/ParamConstant.java
index 0268632..475d972 100644
--- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/ParamConstant.java
+++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/ParamConstant.java
@@ -366,6 +366,8 @@ public class ParamConstant {
*/
public static final String PARAM_INFO = "info";
+ public static final String PARAM_DESCRIPTION = "description";
+
private ParamConstant() {
// private constructor
}
diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java
index 3a30015..fa43c67 100644
--- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java
+++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java
@@ -19,6 +19,7 @@ package org.onap.vfc.nfvo.resmanagement.service.entity;
import java.io.Serializable;
import org.apache.commons.lang.StringUtils;
+import org.onap.vfc.nfvo.resmanagement.common.constant.ParamConstant;
import org.onap.vfc.nfvo.resmanagement.common.util.JsonUtil;
import net.sf.json.JSONObject;
@@ -120,7 +121,7 @@ public class NsEntity implements Serializable {
nsEntity.setId(JsonUtil.getJsonFieldStr(jsonObject, "id"));
nsEntity.setNsdId(JsonUtil.getJsonFieldStr(jsonObject, "nsdId"));
nsEntity.setName(JsonUtil.getJsonFieldStr(jsonObject, "name"));
- nsEntity.setDescription(JsonUtil.getJsonFieldStr(jsonObject, "description"));
+ nsEntity.setDescription(JsonUtil.getJsonFieldStr(jsonObject, ParamConstant.PARAM_DESCRIPTION));
nsEntity.setStatus(JsonUtil.getJsonFieldStr(jsonObject, "status"));
nsEntity.setCreateTime(JsonUtil.getJsonFieldStr(jsonObject, "createTime"));
nsEntity.setLastUpdate(JsonUtil.getJsonFieldStr(jsonObject, "lastUpdate"));
@@ -133,7 +134,7 @@ public class NsEntity implements Serializable {
nsResJson.put("id", StringUtils.trimToEmpty(this.getId()));
nsResJson.put("nsdId", StringUtils.trimToEmpty(this.getNsdId()));
nsResJson.put("name", StringUtils.trimToEmpty(this.getName()));
- nsResJson.put("description", StringUtils.trimToEmpty(this.getDescription()));
+ nsResJson.put(ParamConstant.PARAM_DESCRIPTION, StringUtils.trimToEmpty(this.getDescription()));
nsResJson.put("status", StringUtils.trimToEmpty(this.getStatus()));
nsResJson.put("createTime", StringUtils.trimToEmpty(this.getCreateTime()));
nsResJson.put("lastUpdate", StringUtils.trimToEmpty(this.getLastUpdate()));
@@ -144,7 +145,7 @@ public class NsEntity implements Serializable {
JSONObject nsResJson = new JSONObject();
nsResJson.put("service-instnace-id", StringUtils.trimToEmpty(this.getId()));
nsResJson.put("service-instance-name", StringUtils.trimToEmpty(this.getName()));
- nsResJson.put("description", StringUtils.trimToEmpty(this.getDescription()));
+ nsResJson.put(ParamConstant.PARAM_DESCRIPTION, StringUtils.trimToEmpty(this.getDescription()));
nsResJson.put("orchestration-status", StringUtils.trimToEmpty(this.getStatus()));
nsResJson.put("created-at", StringUtils.trimToEmpty(this.getCreateTime()));
nsResJson.put("updated-at", StringUtils.trimToEmpty(this.getLastUpdate()));
@@ -157,7 +158,7 @@ public class NsEntity implements Serializable {
nsEntity.setId(JsonUtil.getJsonFieldStr(jsonObject, "service-instance-id"));
nsEntity.setNsdId(JsonUtil.getJsonFieldStr(jsonObject, "service-instance-id"));
nsEntity.setName(JsonUtil.getJsonFieldStr(jsonObject, "service-instance-name"));
- nsEntity.setDescription(JsonUtil.getJsonFieldStr(jsonObject, "description"));
+ nsEntity.setDescription(JsonUtil.getJsonFieldStr(jsonObject, ParamConstant.PARAM_DESCRIPTION));
nsEntity.setStatus(JsonUtil.getJsonFieldStr(jsonObject, "orchestration-status"));
nsEntity.setCreateTime(JsonUtil.getJsonFieldStr(jsonObject, "created-at"));
nsEntity.setLastUpdate(JsonUtil.getJsonFieldStr(jsonObject, "updated-at"));