summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java12
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java2
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java5
3 files changed, 11 insertions, 8 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java
index 63573715..84e07b3f 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java
@@ -17,6 +17,7 @@ package org.onap.vnfsdk.marketplace.db.resource;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.onap.vnfsdk.marketplace.db.common.Parameters;
@@ -64,10 +65,10 @@ public class PackageManager {
* @return package data list
* @throws MarketplaceResourceException e
*/
- public ArrayList<PackageData> queryPackageByCsarId(String csarId)
+ public List<PackageData> queryPackageByCsarId(String csarId)
throws MarketplaceResourceException {
LOGGER.info("start query package info by csarid." + csarId);
- ArrayList<PackageData> data = handler.queryByID(csarId);
+ List<PackageData> data = handler.queryByID(csarId);
LOGGER.info("query package info end.size:" + data.size() + "detail:"
+ MarketplaceDbUtil.objectToString(data));
return data;
@@ -83,11 +84,11 @@ public class PackageManager {
* @return package data list
* @throws MarketplaceResourceException e
*/
- public ArrayList<PackageData> queryPackage(String name, String provider, String version,
+ public List<PackageData> queryPackage(String name, String provider, String version,
String deletionPending, String type) throws MarketplaceResourceException {
LOGGER.info("start query package info.name:" + name + " provider:" + provider + " version:"
+ version + " type:" + type);
- Map<String, String> queryParam = new HashMap<String, String>();
+ Map<String, String> queryParam = new HashMap<>();
if (MarketplaceDbUtil.isNotEmpty(name)) {
queryParam.put(Parameters.name.name(), name);
}
@@ -103,7 +104,7 @@ public class PackageManager {
if (MarketplaceDbUtil.isNotEmpty(provider)) {
queryParam.put(Parameters.provider.name(), provider);
}
- ArrayList<PackageData> data = handler.query(queryParam);
+ List<PackageData> data = handler.query(queryParam);
LOGGER.info("query package info end.size:" + data.size() + "detail:"
+ MarketplaceDbUtil.objectToString(data));
return data;
@@ -149,3 +150,4 @@ public class PackageManager {
LOGGER.info("Download count updated to :" + idownloadcount);
}
}
+
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java
index 518d2060..97b96b88 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java
@@ -135,7 +135,7 @@ public class PackageWrapper {
*/
public Response queryPackageListByCond(String name, String provider, String version,
String deletionPending, String type) {
- ArrayList<PackageData> dbresult = new ArrayList<>();
+ List<PackageData> dbresult = new ArrayList<>();
List<PackageMeta> result = new ArrayList<>();
LOG.info("query package info.name:" + name + " provider:" + provider + " version" + version
+ " deletionPending" + deletionPending + " type:" + type);
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java
index c55019d5..cddb4c4e 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java
@@ -106,7 +106,7 @@ public class PackageWrapperUtil {
*/
public static PackageData getPackageInfoById(String csarId) {
PackageData result = new PackageData();
- ArrayList<PackageData> packageDataList = new ArrayList<>();
+ List<PackageData> packageDataList = new ArrayList<>();
try {
packageDataList = PackageManager.getInstance().queryPackageByCsarId(csarId);
if (packageDataList != null && ! packageDataList.isEmpty()) {
@@ -165,7 +165,7 @@ public class PackageWrapperUtil {
* @return download uri
*/
public static String getPackagePath(String csarId) {
- ArrayList<PackageData> packageList = new ArrayList<>();
+ List<PackageData> packageList = new ArrayList<>();
String downloadUri = null;
try {
packageList = PackageManager.getInstance().queryPackageByCsarId(csarId);
@@ -354,3 +354,4 @@ public class PackageWrapperUtil {
}
}
}
+