summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash')
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/controller/KpiDashboardController.java268
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiApiStats.java74
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiServiceSupported.java60
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiUserStoryStats.java107
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpidashProperties.java33
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardService.java56
-rw-r--r--ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardServiceImpl.java180
7 files changed, 0 insertions, 778 deletions
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/controller/KpiDashboardController.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/controller/KpiDashboardController.java
deleted file mode 100644
index b3a4f0cb..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/controller/KpiDashboardController.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*-
- * ================================================================================
- * eCOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-package org.openecomp.portalapp.kpidash.controller;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;
-import org.openecomp.portalapp.kpidash.model.KpiApiStats;
-import org.openecomp.portalapp.kpidash.model.KpiServiceSupported;
-import org.openecomp.portalapp.kpidash.model.KpiUserStoryStats;
-import org.openecomp.portalapp.kpidash.service.KpiDashboardService;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.util.EPUserUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-//@RequestMapping("/")
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPAuditLog
-//public class KpiDashboardController extends EPUnRestrictedBaseController {
-public class KpiDashboardController extends EPRestrictedBaseController {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(KpiDashboardController.class);
-
- @Autowired
- KpiDashboardService service;
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_user_stories_stats" }, method = RequestMethod.GET, produces = "application/json")
- public List<KpiUserStoryStats> getUserStories(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<KpiUserStoryStats> userStories = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- userStories = (List<KpiUserStoryStats>) service.getUserStories();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_user_stories_stats", "GET result =", userStories);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getUserApps operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return userStories;
- }
-
- @RequestMapping(value = { "/portalApi/save_user_stories_stats" }, method = RequestMethod.GET, produces = "application/json")
- public void saveUserStories(@RequestBody KpiUserStoryStats kpiUserStoryStats) {
- service.saveUserStories(kpiUserStoryStats);
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/update_user_stories_stats" }, method = RequestMethod.POST)
- public List<KpiUserStoryStats> updateUserStories(@RequestBody KpiUserStoryStats kpiUserStoryStats) {
- service.updateUserStories(kpiUserStoryStats);
- return (List<KpiUserStoryStats>) service.getUserStories();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_user_api_stats" }, method = RequestMethod.GET, produces = "application/json")
- public List<KpiApiStats> getUserApis(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<KpiApiStats> apiStats = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- apiStats = (List<KpiApiStats>) service.getUserApis();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_user_api_stats", "GET result =", apiStats);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getUserApps operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return apiStats;
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_kpi_service_supported" }, method = RequestMethod.GET, produces = "application/json")
- public List<KpiServiceSupported> getKpiServiceSupported(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<KpiServiceSupported> kpiServiceSupported = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- kpiServiceSupported = (List<KpiServiceSupported>) service.getKpiServiceSupported();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_kpi_service_supported", "GET result =", kpiServiceSupported);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getUserApps operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return kpiServiceSupported;
-// return (List<KpiServiceSupported>) service.getKpiServiceSupported();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/update_user_api_stats" }, method = RequestMethod.POST)
- public List<KpiApiStats> updateUserApis(@RequestBody KpiApiStats kpiApiStats) {
- service.updateUserApis(kpiApiStats);
- return (List<KpiApiStats>) service.getUserApis();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/execute_get_published_delivered" }, method = RequestMethod.GET, produces = "application/json")
- public List<String> getPublishedDelivered(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<String> publishedDelivered = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- publishedDelivered = service.executeGetBytesPublishedDelivered();
- EcompPortalUtils.logAndSerializeObject("/portalApi/execute_get_published_delivered", "GET result =", publishedDelivered);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getLOCStatsCat operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return publishedDelivered;
- // return service.executeGetBytesPublishedDelivered();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/execute_get_feed_stats" }, method = RequestMethod.GET, produces = "application/json")
- public List<Long> getFeedStats(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<Long> feedStats= null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- feedStats = service.executeGetFeedStats();
- EcompPortalUtils.logAndSerializeObject("/portalApi/execute_get_feed_stats", "GET result =", feedStats);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getLOCStatsCat operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return feedStats;
-// return service.executeGetFeedStats();
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_loc_stats_cat" }, method = RequestMethod.GET, produces = "application/json")
- public List<String> getLOCStatsCat(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<String> LOCStatsCat = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- LOCStatsCat = service.getLOCStatsCat();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_loc_stats_cat", "GET result =", LOCStatsCat);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getLOCStatsCat operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return LOCStatsCat;
- }
-
- @SuppressWarnings("unchecked")
- @RequestMapping(value = { "/portalApi/get_loc_stats" }, method = RequestMethod.GET, produces = "application/json")
- public List<Long> getLOCStats(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- List<Long> LOCStats = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- LOCStats = service.getLOCStats();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_loc_stats", "GET result =", LOCStats);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getLOCStats operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
- return LOCStats;
- }
-
- @RequestMapping(value = { "/portalApi/get_geo_map_url" }, method = RequestMethod.GET, produces = "text/plain")
- public String getGeoMapUrl(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- String geoMapUrl = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- geoMapUrl = service.getGeoMapUrl();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_geo_map_url", "GET result =", geoMapUrl);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getGeoMapUrl operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- return geoMapUrl;
- }
-
- @RequestMapping(value = { "/portalApi/get_rcloud_a_url" }, method = RequestMethod.GET, produces = "text/plain")
- public String getRCloudAUrl(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- String rcloudUrl = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- rcloudUrl = service.getRCloudAUrl();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_rcloud_a_url", "GET result =", rcloudUrl);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getGeoMapUrl operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- return rcloudUrl;
- }
-
- @RequestMapping(value = { "/portalApi/get_geo_map_api_url" }, method = RequestMethod.GET, produces = "text/plain")
- public String getGeoMapApiUrl(HttpServletRequest request, HttpServletResponse response) {
- EPUser user = EPUserUtils.getUserSession(request);
- String geoMapApiUrl = null;
-
- try {
- if (user == null) {
- EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
- } else {
- geoMapApiUrl = service.getGeoMapApiUrl();
- EcompPortalUtils.logAndSerializeObject("/portalApi/get_geo_map_api_url", "GET result =", geoMapApiUrl);
- }
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing getGeoMapApiUrl operation, Details: " + EcompPortalUtils.getStackTrace(e));
- }
-
- return geoMapApiUrl;
- }
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiApiStats.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiApiStats.java
deleted file mode 100644
index fb646ef5..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiApiStats.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ================================================================================
- * eCOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-package org.openecomp.portalapp.kpidash.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.openecomp.portalsdk.core.domain.support.DomainVo;
-
-@Entity
-@Table(name = "kpi_api_stats")
-public class KpiApiStats extends DomainVo {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name = "api_type")
- private String apiType;
-
- @Column(name = "total_api")
- private Long totalApi;
-
- @Column(name = "comment")
- private String comment;
-
- public KpiApiStats() {
- }
-
- public String getApiType() {
- return apiType;
- }
-
- public void setApiType(String apiType) {
- this.apiType = apiType;
- }
-
- public Long getTotalApi() {
- return totalApi;
- }
-
- public void setTotalApi(Long totalApi) {
- this.totalApi = totalApi;
- }
-
- public String getComment() {
- return comment;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiServiceSupported.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiServiceSupported.java
deleted file mode 100644
index 1e768390..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiServiceSupported.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * ================================================================================
- * eCOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-package org.openecomp.portalapp.kpidash.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.openecomp.portalsdk.core.domain.support.DomainVo;
-
-@Entity
-@Table(name = "kpi_service_supported")
-public class KpiServiceSupported extends DomainVo {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name = "service_type")
- private String serviceType;
-
- @Column(name = "total_count")
- private Long totalCount;
-
- public String getServiceType() {
- return serviceType;
- }
-
- public void setServiceType(String serviceType) {
- this.serviceType = serviceType;
- }
-
- public Long getTotalCount() {
- return totalCount;
- }
-
- public void setTotalCount(Long totalCount) {
- this.totalCount = totalCount;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiUserStoryStats.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiUserStoryStats.java
deleted file mode 100644
index e4337cca..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpiUserStoryStats.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*-
- * ================================================================================
- * eCOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-package org.openecomp.portalapp.kpidash.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.openecomp.portalsdk.core.domain.support.DomainVo;
-
-@Entity
-@Table(name = "kpi_user_story_stats1")
-public class KpiUserStoryStats extends DomainVo {
- /**
- *
- */
- private static final long serialVersionUID = -1193197465342848502L;
-
- @Id
- @Column(name = "release_key")
- private String releaseKey;
-
- @Column(name = "delivered")
- private Long delivered;
-
- @Column(name = "in_progress")
- private Long inProgress;
-
- @Column(name = "IST_progress_readiness")
- private String ISTProgressReadiness;
-
- @Column(name = "E2E_progress_readiness")
- private String E2EProgressReadiness;
-
- @Column(name = "Key_Highlights")
- private String KeyHighlights;
-
- public KpiUserStoryStats() {
- }
-
- public String getReleaseKey() {
- return releaseKey;
- }
-
- public void setReleaseKey(String releaseKey) {
- this.releaseKey = releaseKey;
- }
-
- public Long getDelivered() {
- return delivered;
- }
-
- public void setDelivered(Long delivered) {
- this.delivered = delivered;
- }
-
- public Long getInProgress() {
- return inProgress;
- }
-
- public void setInProgress(Long inProgress) {
- this.inProgress = inProgress;
- }
-
- public String getISTProgressReadiness() {
- return ISTProgressReadiness;
- }
-
- public void setISTProgressReadiness(String iSTProgressReadiness) {
- ISTProgressReadiness = iSTProgressReadiness;
- }
-
- public String getE2EProgressReadiness() {
- return E2EProgressReadiness;
- }
-
- public void setE2EProgressReadiness(String e2eProgressReadiness) {
- E2EProgressReadiness = e2eProgressReadiness;
- }
-
- public String getKeyHighlights() {
- return KeyHighlights;
- }
-
- public void setKeyHighlights(String keyHighlights) {
- KeyHighlights = keyHighlights;
- }
-
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpidashProperties.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpidashProperties.java
deleted file mode 100644
index a6f81f4f..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/model/KpidashProperties.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*-
- * ================================================================================
- * eCOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-package org.openecomp.portalapp.kpidash.model;
-
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
-
-@Configuration
-@PropertySource(value = { "${container.classpath:}/WEB-INF/conf/kpidash.properties" })
-
-public class KpidashProperties extends SystemProperties {
- public static final String GEO_MAP_URL = "url.sectiona";
- public static final String RCLOUD_A_URL = "url.sectionb";
- public static final String GEO_API_URL = "url.geomapapiurl";
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardService.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardService.java
deleted file mode 100644
index 14892f67..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * ================================================================================
- * eCOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-package org.openecomp.portalapp.kpidash.service;
-
-import java.util.List;
-
-import org.openecomp.portalapp.kpidash.model.KpiApiStats;
-import org.openecomp.portalapp.kpidash.model.KpiUserStoryStats;
-
-@SuppressWarnings("rawtypes")
-public interface KpiDashboardService {
- public List getUserStories();
-
- public void saveUserStories(KpiUserStoryStats kpiUserStoryStats);
-
- public void updateUserStories(KpiUserStoryStats kpiUserStoryStats);
-
- public List getUserApis();
-
- public void saveUserApis(KpiApiStats kpiApiStats);
-
- public void updateUserApis(KpiApiStats kpiApiStats);
-
- public List getKpiServiceSupported();
-
- public List executeGetBytesPublishedDelivered();
-
- public List executeGetFeedStats();
-
- public List getLOCStatsCat();
-
- public List getLOCStats();
-
- public String getGeoMapUrl();
-
- public String getRCloudAUrl();
-
- public String getGeoMapApiUrl();
-}
diff --git a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardServiceImpl.java b/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardServiceImpl.java
deleted file mode 100644
index edbc54af..00000000
--- a/ecomp-portal-BE/src/main/java/org/openecomp/portalapp/kpidash/service/KpiDashboardServiceImpl.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*-
- * ================================================================================
- * eCOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-package org.openecomp.portalapp.kpidash.service;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.openecomp.portalapp.kpidash.model.KpiApiStats;
-import org.openecomp.portalapp.kpidash.model.KpiServiceSupported;
-import org.openecomp.portalapp.kpidash.model.KpiUserStoryStats;
-import org.openecomp.portalapp.kpidash.model.KpidashProperties;
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@SuppressWarnings("rawtypes")
-@Service("kpiDashboardService")
-@Transactional
-@org.springframework.context.annotation.Configuration
-@EnableAspectJAutoProxy
-@EPMetricsLog
-public class KpiDashboardServiceImpl implements KpiDashboardService {
-
- EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(KpiDashboardServiceImpl.class);
-
- @Autowired
- private DataAccessService dataAccessService;
-
- @Override
- public void saveUserStories(KpiUserStoryStats kpiUserStoryStats) {
- dataAccessService.saveDomainObject(kpiUserStoryStats, null);
- }
-
- @Override
- public void updateUserStories(KpiUserStoryStats kpiUserStoryStats) {
- dataAccessService.saveDomainObject(kpiUserStoryStats, null);
- }
-
- @Override
- public List getUserStories() {
- return dataAccessService.getList(KpiUserStoryStats.class, null);
- }
-
- @Override
- public List getUserApis() {
- return dataAccessService.getList(KpiApiStats.class, null);
- }
-
- @Override
- public void saveUserApis(KpiApiStats kpiApiStats) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void updateUserApis(KpiApiStats kpiApiStats) {
- dataAccessService.saveDomainObject(kpiApiStats, null);
- }
-
- @Override
- public List getKpiServiceSupported() {
- return dataAccessService.getList(KpiServiceSupported.class, null);
- }
-
- @Override
- public List<String> executeGetBytesPublishedDelivered() {
- List list = dataAccessService.executeNamedQuery("getBytesPublishedDelivered", null, null);
- List<String> newStringList = new ArrayList<String>();
- if (list != null && list.size() > 0) {
- Object[] retunVals = (Object[]) list.get(0); // current entry in
- // VSPEntAdmin table
- newStringList.add((String) retunVals[0]);
- newStringList.add((String) retunVals[1]);
- }
- return newStringList;
- }
-
- @Override
- public List<Long> executeGetFeedStats() {
- List list = dataAccessService.executeNamedQuery("getDataRouterFeedStats", null, null);
- List<Long> newLongList = new ArrayList<Long>();
- if (list != null && list.size() > 0) {
- Object[] retunVals = (Object[]) list.get(0); // current entry in
- // VSPEntAdmin table
- newLongList.add((Long) retunVals[0]);
- newLongList.add((Long) retunVals[1]);
- newLongList.add((Long) retunVals[2]);
- }
- return newLongList;
- }
-
- @Override
- public List<String> getLOCStatsCat() {
- List list = dataAccessService.executeNamedQuery("getLOCStatsCat", null, null);
- List<String> newStringList = new ArrayList<String>();
- if (list != null && list.size() > 0) {
- for (int i = 0; i < list.size(); i++) {
- /* Object[] retunVals = (Object[]) list.get(i); */// current
- // entry in
- // VSPEntAdmin
- // table
- newStringList.add((String) list.get(i));
- }
- }
- return newStringList;
- };
-
- @Override
- public List<Long> getLOCStats() {
- List list = dataAccessService.executeNamedQuery("getLOCStats", null, null);
- List<Long> newLongList = new ArrayList<Long>();
- if (list != null && list.size() > 0) {
- for (int i = 0; i < list.size(); i++) {
- /* Object[] retunVals = (Object[]) list.get(i); */// current
- // entry in
- // VSPEntAdmin
- // table
- newLongList.add(((BigDecimal) list.get(i)).longValue());
- }
- }
- return newLongList;
- };
-
- @Override
- public String getGeoMapUrl() {
- String newURL = "";
- try {
- newURL = KpidashProperties.getProperty(KpidashProperties.GEO_MAP_URL);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- return newURL;
- }
-
- @Override
- public String getRCloudAUrl() {
- String newURL = "";
- try {
- newURL = KpidashProperties.getProperty(KpidashProperties.RCLOUD_A_URL);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- return newURL;
- }
-
- @Override
- public String getGeoMapApiUrl() {
- String newURL = "";
- try {
- newURL = KpidashProperties.getProperty(KpidashProperties.GEO_API_URL);
- } catch (Exception e) {
- logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
- }
- return newURL;
- }
-
-}