summaryrefslogtreecommitdiffstats
path: root/portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java
diff options
context:
space:
mode:
Diffstat (limited to 'portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java')
-rw-r--r--portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java b/portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java
index 75cc9aa7..d43acc04 100644
--- a/portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java
+++ b/portal-BE/src/main/java/org/onap/portal/service/ep/EpWidgetCatalogParameterService.java
@@ -75,6 +75,10 @@ public class EpWidgetCatalogParameterService {
epMicroserviceParameterService.deleteMicroserviceParameterById(paramId));
}
+ public EpWidgetCatalogParameter getById(final Long id){
+ return epWidgetCatalogParameterDao.getOne(id);
+ }
+
@Transactional
public boolean deleteByParamId(final Long paramId) {
try {
@@ -90,8 +94,8 @@ public class EpWidgetCatalogParameterService {
EpWidgetCatalogParameter widgetParam = null;
List<EpWidgetCatalogParameter> list = epWidgetCatalogParameterDao
.getUserParamById(widgetId, userId, paramId)
- .orElse(new ArrayList<>());
- if (list.size() != 0) {
+ .orElse(null);
+ if (list != null && !list.isEmpty()) {
widgetParam = list.get(0);
}
logger.debug(EELFLoggerDelegate.debugLogger,
@@ -99,7 +103,6 @@ public class EpWidgetCatalogParameterService {
return widgetParam;
}
- @Transactional
public void saveUserParameter(final EpWidgetCatalogParameter newParameter) {
epWidgetCatalogParameterDao.save(newParameter);
}