summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorEddy Hautot <eh552t@intl.att.com>2018-03-15 10:34:47 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-15 10:34:47 +0000
commit7fd612f95352a1dc75c782e89c399ae82acb67bf (patch)
tree992edaa3a17e1ab5246f1cc9ede7b0ba420e1430 /src/main
parent17b5881be20b37a8e6054ddf6002d9e29b761974 (diff)
parentb646d524270c8ca093974751b6696e0c0e0b3a08 (diff)
Merge changes from topic 'bugfix/nexus-iq'
* changes: Fix Checkstyle issues Update jackson-databind
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/clamp/clds/dao/CldsDao.java14
-rw-r--r--src/main/java/org/onap/clamp/clds/model/CldsDbServiceCache.java (renamed from src/main/java/org/onap/clamp/clds/model/CldsDBServiceCache.java)4
-rw-r--r--src/main/java/org/onap/clamp/clds/model/CldsMonitoringDetails.java (renamed from src/main/java/org/onap/clamp/clds/model/CLDSMonitoringDetails.java)2
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsService.java10
4 files changed, 15 insertions, 15 deletions
diff --git a/src/main/java/org/onap/clamp/clds/dao/CldsDao.java b/src/main/java/org/onap/clamp/clds/dao/CldsDao.java
index 5946416ad..143cb14bb 100644
--- a/src/main/java/org/onap/clamp/clds/dao/CldsDao.java
+++ b/src/main/java/org/onap/clamp/clds/dao/CldsDao.java
@@ -35,8 +35,8 @@ import java.util.Map;
import javax.sql.DataSource;
-import org.onap.clamp.clds.model.CLDSMonitoringDetails;
-import org.onap.clamp.clds.model.CldsDBServiceCache;
+import org.onap.clamp.clds.model.CldsMonitoringDetails;
+import org.onap.clamp.clds.model.CldsDbServiceCache;
import org.onap.clamp.clds.model.CldsEvent;
import org.onap.clamp.clds.model.CldsModel;
import org.onap.clamp.clds.model.CldsModelInstance;
@@ -381,7 +381,7 @@ public class CldsDao {
}
}
- public void setCldsServiceCache(CldsDBServiceCache cldsDBServiceCache) {
+ public void setCldsServiceCache(CldsDbServiceCache cldsDBServiceCache) {
if (cldsDBServiceCache != null && cldsDBServiceCache.getInvariantId() != null
&& cldsDBServiceCache.getServiceId() != null) {
String invariantUuid = cldsDBServiceCache.getInvariantId();
@@ -442,16 +442,16 @@ public class CldsDao {
* generate the ClosedLoop model. ACTION_CD | Current state of the
* ClosedLoop in CLDS application.
*/
- public List<CLDSMonitoringDetails> getCLDSMonitoringDetails() {
+ public List<CldsMonitoringDetails> getCLDSMonitoringDetails() {
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss");
- List<CLDSMonitoringDetails> cldsMonitoringDetailsList = new ArrayList<CLDSMonitoringDetails>();
+ List<CldsMonitoringDetails> cldsMonitoringDetailsList = new ArrayList<CldsMonitoringDetails>();
String modelsSql = "SELECT CONCAT(M.CONTROL_NAME_PREFIX, M.CONTROL_NAME_UUID) AS CLOSELOOP_NAME , M.MODEL_NAME, M.SERVICE_TYPE_ID, M.DEPLOYMENT_ID, T.TEMPLATE_NAME, E.ACTION_CD, E.USER_ID, E.TIMESTAMP "
+ "FROM MODEL M, TEMPLATE T, EVENT E "
+ "WHERE M.TEMPLATE_ID = T.TEMPLATE_ID AND M.EVENT_ID = E.EVENT_ID " + "ORDER BY ACTION_CD";
List<Map<String, Object>> rows = jdbcTemplateObject.queryForList(modelsSql);
- CLDSMonitoringDetails cldsMonitoringDetails = null;
+ CldsMonitoringDetails cldsMonitoringDetails = null;
for (Map<String, Object> row : rows) {
- cldsMonitoringDetails = new CLDSMonitoringDetails();
+ cldsMonitoringDetails = new CldsMonitoringDetails();
cldsMonitoringDetails.setCloseloopName((String) row.get("CLOSELOOP_NAME"));
cldsMonitoringDetails.setModelName((String) row.get("MODEL_NAME"));
cldsMonitoringDetails.setServiceTypeId((String) row.get("SERVICE_TYPE_ID"));
diff --git a/src/main/java/org/onap/clamp/clds/model/CldsDBServiceCache.java b/src/main/java/org/onap/clamp/clds/model/CldsDbServiceCache.java
index 80e8d8538..fe3088bc4 100644
--- a/src/main/java/org/onap/clamp/clds/model/CldsDBServiceCache.java
+++ b/src/main/java/org/onap/clamp/clds/model/CldsDbServiceCache.java
@@ -29,13 +29,13 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectOutputStream;
-public class CldsDBServiceCache {
+public class CldsDbServiceCache {
private String invariantId;
private String serviceId;
private InputStream cldsDataInstream;
- public CldsDBServiceCache(CldsServiceData cldsServiceData) throws IOException {
+ public CldsDbServiceCache(CldsServiceData cldsServiceData) throws IOException {
setCldsDataInstream(cldsServiceData);
setInvariantId(cldsServiceData.getServiceInvariantUUID());
setServiceId(cldsServiceData.getServiceUUID());
diff --git a/src/main/java/org/onap/clamp/clds/model/CLDSMonitoringDetails.java b/src/main/java/org/onap/clamp/clds/model/CldsMonitoringDetails.java
index be4f95096..a042ae4fb 100644
--- a/src/main/java/org/onap/clamp/clds/model/CLDSMonitoringDetails.java
+++ b/src/main/java/org/onap/clamp/clds/model/CldsMonitoringDetails.java
@@ -26,7 +26,7 @@ package org.onap.clamp.clds.model;
/**
* Maintains model and template details.
*/
-public class CLDSMonitoringDetails {
+public class CldsMonitoringDetails {
private String closeloopName;
private String modelName;
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index d22a5188b..675f3cfe5 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -68,8 +68,8 @@ import org.onap.clamp.clds.dao.CldsDao;
import org.onap.clamp.clds.exception.CldsConfigException;
import org.onap.clamp.clds.exception.policy.PolicyClientException;
import org.onap.clamp.clds.exception.sdc.SdcCommunicationException;
-import org.onap.clamp.clds.model.CLDSMonitoringDetails;
-import org.onap.clamp.clds.model.CldsDBServiceCache;
+import org.onap.clamp.clds.model.CldsMonitoringDetails;
+import org.onap.clamp.clds.model.CldsDbServiceCache;
import org.onap.clamp.clds.model.CldsEvent;
import org.onap.clamp.clds.model.CldsHealthCheck;
import org.onap.clamp.clds.model.CldsInfo;
@@ -157,10 +157,10 @@ public class CldsService extends SecureServiceBase {
@GET
@Path("/cldsDetails")
@Produces(MediaType.APPLICATION_JSON)
- public List<CLDSMonitoringDetails> getCLDSDetails() {
+ public List<CldsMonitoringDetails> getCLDSDetails() {
Date startTime = new Date();
LoggingUtils.setRequestContext("CldsService: GET model details", getPrincipalName());
- List<CLDSMonitoringDetails> cldsMonitoringDetailsList = new ArrayList<CLDSMonitoringDetails>();
+ List<CldsMonitoringDetails> cldsMonitoringDetailsList = new ArrayList<CldsMonitoringDetails>();
cldsMonitoringDetailsList = cldsDao.getCLDSMonitoringDetails();
// audit log
LoggingUtils.setTimeContext(startTime, new Date());
@@ -622,7 +622,7 @@ public class CldsService extends SecureServiceBase {
}
if (sdcCatalogServices.isCldsSdcCacheDataExpired(cldsServiceData)) {
cldsServiceData = sdcCatalogServices.getCldsServiceDataWithAlarmConditions(serviceInvariantUUID);
- cldsDao.setCldsServiceCache(new CldsDBServiceCache(cldsServiceData));
+ cldsDao.setCldsServiceCache(new CldsDbServiceCache(cldsServiceData));
}
// filter out VFs the user is not authorized for
cldsServiceData.filterVfs(this);