summaryrefslogtreecommitdiffstats
path: root/ResmanagementService/service/src/main
diff options
context:
space:
mode:
authorluxin <luxin7@huawei.com>2017-09-04 14:21:02 +0800
committerluxin <luxin7@huawei.com>2017-09-04 14:21:02 +0800
commit4d7b0ce7d8a10b6587f44a5000f13a40cb201012 (patch)
tree095f805fb31286c591955d91984a49396188722a /ResmanagementService/service/src/main
parent47d3c331a04ce44b756973217f85a4a04ea45be0 (diff)
Modify field name
Modify vfc resmanagement field name and add ns url Change-Id: I6510ea8fc80dc8cbfe29400ea0d5b12d4043f723 Issue-Id:VFC-216 Signed-off-by: luxin <luxin7@huawei.com>
Diffstat (limited to 'ResmanagementService/service/src/main')
-rw-r--r--ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/UrlConstant.java5
-rw-r--r--ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java2
-rw-r--r--ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java14
-rw-r--r--ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/mapper/NsEntityMapper.java8
-rw-r--r--ResmanagementService/service/src/main/resources/mybatis/mysql/NsEntityMapper.xml24
5 files changed, 32 insertions, 21 deletions
diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/UrlConstant.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/UrlConstant.java
index 1aa50c1..3abb3c4 100644
--- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/UrlConstant.java
+++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/UrlConstant.java
@@ -72,6 +72,11 @@ public class UrlConstant {
public static final String VNF_URL = "/v1/vnf";
/**
+ * ns url
+ */
+ public static final String NS_URL = "/v1/ns";
+
+ /**
* vnfinfo url.
*/
public static final String VNFINFO_URL = "/v1/vnfinfo";
diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java
index f403aa0..a8256f1 100644
--- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java
+++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java
@@ -34,7 +34,6 @@ import org.onap.vfc.nfvo.resmanagement.service.adapter.inf.IResmgrAdapterMgrServ
import org.openo.baseservice.util.impl.SystemEnvVariablesFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
import net.sf.json.JSONObject;
@@ -46,7 +45,6 @@ import net.sf.json.JSONObject;
* @author
* @version NFVO 0.5 Sep 22, 2016
*/
-@Service
public class ResmgrAdapterMgrService implements IResmgrAdapterMgrService {
private static final Logger LOG = LoggerFactory.getLogger(ResmgrAdapterMgrService.class);
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 a413134..adc61c7 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
@@ -49,7 +49,7 @@ public class NsEntity implements Serializable {
private String status;
/** */
- private String cteateTime;
+ private String createTime;
/** */
private String lastUpdate;
@@ -96,12 +96,12 @@ public class NsEntity implements Serializable {
this.status = status;
}
- public String getCteateTime() {
- return cteateTime;
+ public String getCreateTime() {
+ return createTime;
}
- public void setCteateTime(String cteateTime) {
- this.cteateTime = cteateTime;
+ public void setCreateTime(String createTime) {
+ this.createTime = createTime;
}
public String getLastUpdate() {
@@ -119,7 +119,7 @@ public class NsEntity implements Serializable {
nsEntity.setNsdId(JsonUtil.getJsonFieldStr(jsonObject, "nsdId"));
nsEntity.setDescription(JsonUtil.getJsonFieldStr(jsonObject, "description"));
nsEntity.setStatus(JsonUtil.getJsonFieldStr(jsonObject, "status"));
- nsEntity.setCteateTime(JsonUtil.getJsonFieldStr(jsonObject, "cteateTime"));
+ nsEntity.setCreateTime(JsonUtil.getJsonFieldStr(jsonObject, "createTime"));
nsEntity.setLastUpdate(JsonUtil.getJsonFieldStr(jsonObject, "lastUpdate"));
return nsEntity;
}
@@ -132,7 +132,7 @@ public class NsEntity implements Serializable {
nsResJson.put("nsdId", StringUtils.trimToEmpty(this.getNsdId()));
nsResJson.put("description", StringUtils.trimToEmpty(this.getDescription()));
nsResJson.put("status", StringUtils.trimToEmpty(this.getStatus()));
- nsResJson.put("cteateTime", StringUtils.trimToEmpty(this.getCteateTime()));
+ nsResJson.put("createTime", StringUtils.trimToEmpty(this.getCreateTime()));
nsResJson.put("lastUpdate", StringUtils.trimToEmpty(this.getLastUpdate()));
return nsResJson.toString();
}
diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/mapper/NsEntityMapper.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/mapper/NsEntityMapper.java
index 69db361..d90c586 100644
--- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/mapper/NsEntityMapper.java
+++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/mapper/NsEntityMapper.java
@@ -21,6 +21,14 @@ import java.util.Map;
import org.onap.vfc.nfvo.resmanagement.service.entity.NsEntity;
+/**
+ * <br>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version VFC 1.0 Sep 4, 2017
+ */
public interface NsEntityMapper {
int deleteByPrimaryKey(String id);
diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/NsEntityMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/NsEntityMapper.xml
index a792694..9d7fb40 100644
--- a/ResmanagementService/service/src/main/resources/mybatis/mysql/NsEntityMapper.xml
+++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/NsEntityMapper.xml
@@ -22,12 +22,12 @@
<result column="NSD_ID" property="nsdId" jdbcType="VARCHAR" />
<result column="DESCRIPTION" property="description" jdbcType="VARCHAR" />
<result column="STATUS" property="status" jdbcType="VARCHAR" />
- <result column="CTEATE_TIME" property="cteateTime" jdbcType="VARCHAR" />
+ <result column="CREATE_TIME" property="createTime" jdbcType="VARCHAR" />
<result column="LAST_UPDATE" property="lastUpdate" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
- ID, NAME, NSD_ID, DESCRIPTION, STATUS, CTEATE_TIME, LAST_UPDATE
+ ID, NAME, NSD_ID, DESCRIPTION, STATUS, CREATE_TIME, LAST_UPDATE
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
@@ -38,7 +38,7 @@
<select id="getAllNs" resultMap="BaseResultMap" parameterType="java.util.Map">
select
<include refid="Base_Column_List" />
- from vnf
+ from ns
<where>
<if test="id != null">
AND ID = #{id,jdbcType=VARCHAR}
@@ -51,10 +51,10 @@
</delete>
<insert id="insert" parameterType="org.onap.vfc.nfvo.resmanagement.service.entity.NsEntity" >
insert into ns (ID, NAME, NSD_ID,
- DESCRIPTION, STATUS, CTEATE_TIME,
+ DESCRIPTION, STATUS, CREATE_TIME,
LAST_UPDATE)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{nsdId,jdbcType=VARCHAR},
- #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{cteateTime,jdbcType=VARCHAR},
+ #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR},
#{lastUpdate,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="org.onap.vfc.nfvo.resmanagement.service.entity.NsEntity" >
@@ -75,8 +75,8 @@
<if test="status != null" >
STATUS,
</if>
- <if test="cteateTime != null" >
- CTEATE_TIME,
+ <if test="createTime != null" >
+ CREATE_TIME,
</if>
<if test="lastUpdate != null" >
LAST_UPDATE,
@@ -98,8 +98,8 @@
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
- <if test="cteateTime != null" >
- #{cteateTime,jdbcType=VARCHAR},
+ <if test="createTime != null" >
+ #{createTime,jdbcType=VARCHAR},
</if>
<if test="lastUpdate != null" >
#{lastUpdate,jdbcType=VARCHAR},
@@ -121,8 +121,8 @@
<if test="status != null" >
STATUS = #{status,jdbcType=VARCHAR},
</if>
- <if test="cteateTime != null" >
- CTEATE_TIME = #{cteateTime,jdbcType=VARCHAR},
+ <if test="createTime != null" >
+ CREATE_TIME = #{createTime,jdbcType=VARCHAR},
</if>
<if test="lastUpdate != null" >
LAST_UPDATE = #{lastUpdate,jdbcType=VARCHAR},
@@ -136,7 +136,7 @@
NSD_ID = #{nsdId,jdbcType=VARCHAR},
DESCRIPTION = #{description,jdbcType=VARCHAR},
STATUS = #{status,jdbcType=VARCHAR},
- CTEATE_TIME = #{cteateTime,jdbcType=VARCHAR},
+ CREATE_TIME = #{createTime,jdbcType=VARCHAR},
LAST_UPDATE = #{lastUpdate,jdbcType=VARCHAR}
where ID = #{id,jdbcType=VARCHAR}
</update>