summaryrefslogtreecommitdiffstats
path: root/artifactbroker/model/src
diff options
context:
space:
mode:
authorliboNet <libo.zhu@intel.com>2019-04-05 08:59:41 +0800
committerliboNet <libo.zhu@intel.com>2019-04-05 08:59:41 +0800
commit999748a64e72b9a7975ddac3406eb95a0b9aeaff (patch)
treeb0691008cb8e05836dc99247191e5894e2a4db89 /artifactbroker/model/src
parentde2f1e42e37b975454af53aeb81a2ae2e7627e99 (diff)
add subplug for k8s to invoke Artifact forward support
. add forward plugin to forward Artifact . add test case to cover basic httpPost action . fix the misuse of List and ArrayList to avoid Null Pointer Change-Id: I18ead2ba6251a93fddff4657f3945d635a450276 Issue-ID: MULTICLOUD-514 Signed-off-by: liboNet <libo.zhu@intel.com>
Diffstat (limited to 'artifactbroker/model/src')
-rw-r--r--artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java14
-rw-r--r--artifactbroker/model/src/main/java/org/onap/policy/distribution/model/GsonUtil.java6
2 files changed, 10 insertions, 10 deletions
diff --git a/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java b/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java
index 834bbcf..8a7943a 100644
--- a/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java
+++ b/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java
@@ -20,8 +20,8 @@
package org.onap.policy.distribution.model;
-import java.util.List;
-import java.util.Map;
+import java.util.ArrayList;
+import java.util.HashMap;
import org.onap.sdc.api.notification.IArtifactInfo;
@@ -30,10 +30,10 @@ import org.onap.sdc.api.notification.IArtifactInfo;
*/
public class CloudArtifact implements PolicyInput {
- List<VfModuleModel> vfModulePayload;
- Map<String, IArtifactInfo> artifactMap;
+ ArrayList<VfModuleModel> vfModulePayload;
+ HashMap<String, IArtifactInfo> artifactMap;
- public CloudArtifact(List<VfModuleModel> vfModulePayload, Map<String, IArtifactInfo> artifactMap) {
+ public CloudArtifact(ArrayList<VfModuleModel> vfModulePayload, HashMap<String, IArtifactInfo> artifactMap) {
this.vfModulePayload = vfModulePayload;
this.artifactMap = artifactMap;
}
@@ -43,7 +43,7 @@ public class CloudArtifact implements PolicyInput {
*
* @return the path of the TOSCA file
*/
- public List<VfModuleModel> getVfModulePayload() {
+ public ArrayList<VfModuleModel> getVfModulePayload() {
return vfModulePayload;
}
@@ -52,7 +52,7 @@ public class CloudArtifact implements PolicyInput {
*
* @return the path of the TOSCA file
*/
- public Map<String, IArtifactInfo> getArtifactTypeMap() {
+ public HashMap<String, IArtifactInfo> getArtifactTypeMap() {
return artifactMap;
}
diff --git a/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/GsonUtil.java b/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/GsonUtil.java
index 077c753..46f2735 100644
--- a/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/GsonUtil.java
+++ b/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/GsonUtil.java
@@ -22,7 +22,7 @@ package org.onap.policy.distribution.model;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
-import java.util.List;
+import java.util.ArrayList;
/**
* A GsonUtil created by a {@link GsonUtil}.
*/
@@ -36,10 +36,10 @@ public class GsonUtil {
}
// 将Json数组解析成相应的映射对象列表
- public static <T> List<T> parseJsonArrayWithGson(String jsonData,
+ public static <T> ArrayList<T> parseJsonArrayWithGson(String jsonData,
Class<T> type) {
Gson gson = new Gson();
- List<T> result = gson.fromJson(jsonData, new TypeToken<List<T>>() {}.getType());
+ ArrayList<T> result = gson.fromJson(jsonData, new TypeToken<ArrayList<T>>() {}.getType());
return result;
}
}