diff options
Diffstat (limited to 'artifactbroker/model/src/main/java/org')
-rw-r--r-- | artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java | 14 | ||||
-rw-r--r-- | artifactbroker/model/src/main/java/org/onap/policy/distribution/model/GsonUtil.java | 6 |
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; } } |