From 7f535078ef80a7b7efa3e3325bfccb994fbd00e8 Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Thu, 31 Aug 2017 15:16:38 -0400 Subject: Rename packages to org.onap in 1.4.0-SNAPSHOT 19 - remove openecomp 72 - remediate Sonar scan issues 79 - removed unwanted left menu under Report 90 - apply approved license text Issue: PORTAL-19, PORTAL-72, PORTAL-79, PORTAL-90 Change-Id: I41a0ef5fba623d2242574bd15f2d9fb8029a496c Signed-off-by: Christopher Lott (cl778h) --- .../sample/AngularSinglePageController.java | 49 ------- .../controller/sample/BroadcastController.java | 131 ------------------- .../controller/sample/BroadcastListController.java | 143 --------------------- .../controller/sample/CallflowController.java | 45 ------- .../sample/CamundaCockpitController.java | 60 --------- .../sample/CollaborateListController.java | 85 ------------ .../controller/sample/CollaborationController.java | 55 -------- .../controller/sample/DS2SampleController.java | 54 -------- .../controller/sample/ElasticSearchController.java | 128 ------------------ .../controller/sample/ElementModelController.java | 87 ------------- .../controller/sample/LeafletMapContoller.java | 43 ------- .../controller/sample/NetMapController.java | 57 -------- .../controller/sample/PostDroolsController.java | 122 ------------------ .../sample/ReportDashboardController.java | 46 ------- .../controller/sample/SamplePageController.java | 50 ------- .../portalapp/controller/sample/package-info.java | 5 - 16 files changed, 1160 deletions(-) delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java delete mode 100644 ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java (limited to 'ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample') diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java deleted file mode 100644 index efcd4291..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; - -/** - * Controller for a single-page application sample. The view is restricted to - * authenticated users. The named view resolves to page singlePageSample.html, - * which uses Angular. - */ -@Controller -@RequestMapping("/") -public class AngularSinglePageController extends RestrictedBaseController { - - @RequestMapping(value = { "/singlePageSample" }, method = RequestMethod.GET) - public ModelAndView view(HttpServletRequest request) { - Map model = new HashMap(); - return new ModelAndView("single_page_sample", "model", model); - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java deleted file mode 100644 index 9c04ce89..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java +++ /dev/null @@ -1,131 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.io.PrintWriter; -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.BroadcastMessage; -import org.openecomp.portalsdk.core.service.BroadcastService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - -@Controller -@RequestMapping("/") -public class BroadcastController extends RestrictedBaseController { - - @Autowired - private BroadcastService broadcastService; - - @RequestMapping(value = { "/broadcast" }, method = RequestMethod.GET) - public ModelAndView broadcast(HttpServletRequest request) { - Map model = new HashMap(); - ObjectMapper mapper = new ObjectMapper(); - - try { - model.put("broadcastMessage", mapper.writeValueAsString(broadcastService.getBroadcastMessage(request))); - model.put("broadcastSites", mapper.writeValueAsString(referenceData(request).get("broadcastSites"))); - } catch (Exception e) { - e.printStackTrace(); - } - return new ModelAndView(getViewName(), model); - } - - @RequestMapping(value = { "/get_broadcast" }, method = RequestMethod.GET) - public void getBroadcast(HttpServletRequest request, HttpServletResponse response) { - Map model = new HashMap(); - ObjectMapper mapper = new ObjectMapper(); - - try { - - model.put("broadcastMessage", mapper.writeValueAsString(broadcastService.getBroadcastMessage(request))); - model.put("broadcastSites", mapper.writeValueAsString(referenceData(request).get("broadcastSites"))); - JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model)); - JSONObject j = new JSONObject(msg); - response.getWriter().write(j.toString()); - - } catch (Exception e) { - e.printStackTrace(); - } - - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - protected Map referenceData(HttpServletRequest request) { - Map lookupData = new HashMap(); - - if ("true".equals(SystemProperties.getProperty(SystemProperties.CLUSTERED))) { - lookupData.put("broadcastSites", AppUtils.getLookupList("fn_lu_broadcast_site", "broadcast_site_cd", - "broadcast_site_descr", "", "broadcast_site_descr")); - } - - return lookupData; - } - - @RequestMapping(value = { "/broadcast/save" }, method = RequestMethod.POST) - public ModelAndView save(HttpServletRequest request, HttpServletResponse response) throws Exception { - - try { - - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - JsonNode root = mapper.readTree(request.getReader()); - BroadcastMessage broadcastMessage = mapper.readValue(root.get("broadcastMessage").toString(), - BroadcastMessage.class); - - broadcastService.saveBroadcastMessage(broadcastMessage); - - response.setCharacterEncoding("UTF-8"); - response.setContentType("application / json"); - request.setCharacterEncoding("UTF-8"); - - PrintWriter out = response.getWriter(); - String responseString = mapper.writeValueAsString(broadcastMessage); - JSONObject j = new JSONObject("{broadcastMessage: " + responseString + "}"); - - out.write(j.toString()); - - return null; - } catch (Exception e) { - response.setCharacterEncoding("UTF-8"); - request.setCharacterEncoding("UTF-8"); - PrintWriter out = response.getWriter(); - out.write(e.getMessage()); - return null; - } - - } -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java deleted file mode 100644 index 41603460..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java +++ /dev/null @@ -1,143 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.io.PrintWriter; -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.BroadcastMessage; -import org.openecomp.portalsdk.core.service.BroadcastService; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - -@Controller -@RequestMapping("/") -public class BroadcastListController extends RestrictedBaseController { - - @Autowired - private BroadcastService broadcastService; - - @RequestMapping(value = { "/broadcast_list" }, method = RequestMethod.GET) - public ModelAndView broadcastList(HttpServletRequest request) { - Map model = new HashMap(); - - model.put("model", broadcastService.getBcModel(request)); - return new ModelAndView(getViewName(), model); - } - - @RequestMapping(value = { "/get_broadcast_list" }, method = RequestMethod.GET) - public void getBroadcast(HttpServletRequest request, HttpServletResponse response) { - Map model = new HashMap(); - ObjectMapper mapper = new ObjectMapper(); - try { - model.put("model", broadcastService.getBcModel(request)); - model.put("messagesList", broadcastService.getBcModel(request).get("messagesList")); - model.put("messageLocations", broadcastService.getBcModel(request).get("messageLocations")); - JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model)); - JSONObject j = new JSONObject(msg); - response.getWriter().write(j.toString()); - } catch (Exception e) { - e.printStackTrace(); - } - - } - - @RequestMapping(value = { "/broadcast_list/remove" }, method = RequestMethod.POST) - public ModelAndView remove(HttpServletRequest request, HttpServletResponse response) throws Exception { - - try { - - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - JsonNode root = mapper.readTree(request.getReader()); - BroadcastMessage broadcastMessage = mapper.readValue(root.get("broadcastMessage").toString(), - BroadcastMessage.class); - - broadcastService.removeBroadcastMessage(broadcastMessage); - - response.setCharacterEncoding("UTF-8"); - response.setContentType("application / json"); - request.setCharacterEncoding("UTF-8"); - - PrintWriter out = response.getWriter(); - String responseString = mapper.writeValueAsString(broadcastMessage); - JSONObject j = new JSONObject("{broadcastMessage: " + responseString + "}"); - - out.write(j.toString()); - - return null; - } catch (Exception e) { - response.setCharacterEncoding("UTF-8"); - request.setCharacterEncoding("UTF-8"); - PrintWriter out = response.getWriter(); - out.write(e.getMessage()); - return null; - } - - } - - @RequestMapping(value = { "/broadcast_list/toggleActive" }, method = RequestMethod.POST) - public ModelAndView toggleActive(HttpServletRequest request, HttpServletResponse response) throws Exception { - - try { - - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - JsonNode root = mapper.readTree(request.getReader()); - BroadcastMessage broadcastMessage = mapper.readValue(root.get("broadcastMessage").toString(), - BroadcastMessage.class); - - broadcastService.saveBroadcastMessage(broadcastMessage); - - response.setCharacterEncoding("UTF-8"); - response.setContentType("application / json"); - request.setCharacterEncoding("UTF-8"); - - PrintWriter out = response.getWriter(); - String responseString = mapper.writeValueAsString(broadcastMessage); - JSONObject j = new JSONObject("{broadcastMessage: " + responseString + "}"); - - out.write(j.toString()); - - return null; - } catch (Exception e) { - response.setCharacterEncoding("UTF-8"); - request.setCharacterEncoding("UTF-8"); - PrintWriter out = response.getWriter(); - out.write(e.getMessage()); - return null; - } - - } -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java deleted file mode 100644 index b25cbef4..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - - -/** - * Controller for a message sequence chart view. The view is restricted to - * authenticated users. The view name defaults to the request name with no - * suffix, "callflow", which resolves to page details.jsp. That page is an - * iframe around page details.html. - */ -@Controller -@RequestMapping("/") -public class CallflowController extends RestrictedBaseController { - - @RequestMapping(value = { "/callflow" }, method = RequestMethod.GET) - public ModelAndView plot() { - final String defaultViewName = null; - return new ModelAndView(defaultViewName); - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java deleted file mode 100644 index e5cfb3f2..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java +++ /dev/null @@ -1,60 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - - - -/** - * @author chris zeng - * - */ - -@Controller -@RequestMapping("/") -public class CamundaCockpitController extends RestrictedBaseController { - @SuppressWarnings("rawtypes") - @RequestMapping(value = {"/get_camunda_cockpit_link" }, method = RequestMethod.GET, produces = "application/json") - @ResponseBody - public Map getCamundaCockpitLink(HttpServletRequest request,HttpServletResponse response) { - Map map = new HashMap(); - String camundaCockpitUrl = ""; - String camundaCockpitlinkDefined = "false"; - if (SystemProperties.containsProperty("camunda_cockpit_link")){ - camundaCockpitUrl = SystemProperties.getProperty("camunda_cockpit_link"); - camundaCockpitlinkDefined = "true"; - }; - map.put("link_defined", camundaCockpitlinkDefined); - map.put("camunda_cockpit_link", camundaCockpitUrl); - return map; - }; -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java deleted file mode 100644 index 03aaab5f..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java +++ /dev/null @@ -1,85 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.UserProfileService; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -import com.fasterxml.jackson.databind.ObjectMapper; - -@Controller -@RequestMapping("/") -public class CollaborateListController extends RestrictedBaseController{ - @Autowired - UserProfileService service; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CollaborateListController.class); - - @RequestMapping(value = {"/collaborate_list" }, method = RequestMethod.GET) - public ModelAndView ProfileSearch(HttpServletRequest request) { - Map model = new HashMap(); - ObjectMapper mapper = new ObjectMapper(); - User user = UserUtils.getUserSession(request); - - List profileList =null; - try { - profileList = service.findAllUserWithOnOffline(user.getOrgUserId()); - model.put("profileList", mapper.writeValueAsString(profileList)); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "Error happened during collaborate list search" + e.getMessage()); - - } - return new ModelAndView(getViewName(),"model", model); - } - - @RequestMapping(value = {"/get_collaborate_list" }, method = RequestMethod.GET) - public void getCollaborateList(HttpServletRequest request,HttpServletResponse response) { - - ObjectMapper mapper = new ObjectMapper(); - User user = UserUtils.getUserSession(request); - - List profileList =null; - try { - profileList = service.findAllUserWithOnOffline(user.getOrgUserId()); - JsonMessage msg = new JsonMessage(mapper.writeValueAsString(profileList)); - JSONObject j = new JSONObject(msg); - response.getWriter().write(j.toString()); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "Error happened during get collaborate list" + e.getMessage()); - - } - } -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java deleted file mode 100644 index 55920bb8..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.web.support.UserUtils; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -@Controller -@RequestMapping("/") -public class CollaborationController extends RestrictedBaseController{ - - @RequestMapping(value = {"/collaboration" }, method = RequestMethod.GET) - public ModelAndView view(HttpServletRequest request) { - Map model = new HashMap(); - User user = UserUtils.getUserSession(request); - - model.put("name",(user.getFirstName() + " " + (user.getLastName() != null? user.getLastName().substring(0,1): "" ))); - return new ModelAndView(getViewName(),"model", model); - } - @RequestMapping(value = {"/openCollaboration" }, method = RequestMethod.GET) - public ModelAndView openCollaboration(HttpServletRequest request) { - Map model = new HashMap(); - User user = UserUtils.getUserSession(request); - - model.put("name",(user.getFirstName() + " " + (user.getLastName() != null? user.getLastName().substring(0,1): "" ))); - return new ModelAndView("openCollaboration","model", model); - } -} \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java deleted file mode 100644 index 17f33c77..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.service.ProfileService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - - -/** - * Controller for user profile view. The view is restricted to authenticated - * users. The view name resolves to page user_profile.jsp which uses Angular. - */ - -@Controller -@RequestMapping("/") -public class DS2SampleController extends UnRestrictedBaseController { - - @Autowired - ProfileService service; - - @RequestMapping(value = { "/ds2_sample" }, method = RequestMethod.GET) - public ModelAndView ProfileSearch(HttpServletRequest request) { - Map model = new HashMap(); - return new ModelAndView("ds2_sample", "model", model); - } - -} \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java deleted file mode 100644 index 69e5051f..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java +++ /dev/null @@ -1,128 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.io.IOException; - -import org.json.JSONObject; -import org.openecomp.portalapp.model.Result; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; - -import io.searchbox.client.JestClient; -import io.searchbox.client.JestClientFactory; -import io.searchbox.client.config.HttpClientConfig; -import io.searchbox.core.Search; -import io.searchbox.core.SearchResult; -import io.searchbox.core.Suggest; -import io.searchbox.core.SuggestResult; -import io.searchbox.params.Parameters; - -/** - * Controller for views that demonstrate Elastic Search features. - */ -@RestController -public class ElasticSearchController extends RestrictedBaseController{ - - @RequestMapping(value = {"/es_search_demo" }, method = RequestMethod.GET) - public ModelAndView search() { - return new ModelAndView("es_search_demo"); - } - - @RequestMapping(value = {"/es_suggest_demo" }, method = RequestMethod.GET) - public ModelAndView suggest() { - return new ModelAndView("es_suggest_demo"); - } - - @RequestMapping(value="/es_suggest/{task}",method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity doSuggest(@PathVariable("task") String task) throws IOException { - JSONObject obj = new JSONObject(task); - String searchTerm = obj.getString("data"); - String searchSize = obj.getString("size"); - String searchFuzzy = obj.getString("fuzzy"); - String resultName = obj.getString("resultname"); - - JestClientFactory factory = new JestClientFactory(); - factory.setHttpClientConfig(new HttpClientConfig - .Builder("http://todo_elastic_search_server") - .multiThreaded(true) - .build()); - JestClient client = factory.getObject(); - - - Suggest suggest = new Suggest.Builder("{\n" - +"\"" + resultName +"\" : {\n" - +"\"text\" : \""+ searchTerm +"\",\n" - +"\"completion\" : {\n" - +"\"field\" : \"suggest\",\n" - +"\"size\" : " + searchSize + ",\n" - +"\"fuzzy\" : \"" + searchFuzzy + "\"\n" - +"}\n" - +"}\n" - +"}").addIndex("customer").build(); - - SuggestResult result = client.execute(suggest); - System.err.println(result.getJsonObject().toString()); - return new ResponseEntity(new Result(result.getJsonObject().toString()),HttpStatus.OK); - } - - @RequestMapping(value="/es_search/{task}",method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity doSearch(@PathVariable("task") String task) throws IOException { - JSONObject obj = new JSONObject(task); - String searchTerm = obj.getString("data"); - String searchSize = obj.getString("size"); - // String searchFuzzy = obj.getString("fuzzy"); - - JestClientFactory factory = new JestClientFactory(); - factory.setHttpClientConfig(new HttpClientConfig - .Builder("http://todo_elastic_search_server") - .multiThreaded(true) - .build()); - JestClient client = factory.getObject(); - - Search search = new Search.Builder("{\n" - +"\"query\" : {\n" - +"\"query_string\" : {\n" - +"\"query\" : \"name:"+ searchTerm +"\"\n" - +"}\n" - +"}\n" - +"}").addIndex("customer").setParameter(Parameters.SIZE,Integer.valueOf(searchSize)).build(); - - SearchResult result = client.execute(search); - System.err.println(result.getJsonObject().toString()); - return new ResponseEntity(new Result(result.getJsonObject().toString()),HttpStatus.OK); - } - - public ResponseEntity sendResult(Result result) { - return new ResponseEntity(result, HttpStatus.OK); - } - - @Override - public boolean isRESTfulCall() { - return true; - } -} \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java deleted file mode 100644 index e36458fd..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java +++ /dev/null @@ -1,87 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.ElementLinkService; -import org.openecomp.portalsdk.core.service.ElementMapService; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/") -public class ElementModelController extends RestrictedBaseController { - - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ElementModelController.class); - - @RequestMapping(value = { "/elementMapLayout" }, method = RequestMethod.GET, produces = "text/plain") - public String layout(HttpServletRequest request, HttpServletResponse response) throws Exception { - - String collapseDomains = request.getParameter("collapsedDomains"); - String expandDomains = request.getParameter("expandedDomains"); - - String contentFileName = request.getParameter("contentFileName"); - String layoutFileName = request.getParameter("layoutFileName"); - - final String realPath = request.getServletContext().getRealPath("/"); - logger.debug(EELFLoggerDelegate.debugLogger, "layout: servlet context real path: {}", realPath); - - ElementMapService eltMapSvc = new ElementMapService(); - String yamlString = eltMapSvc.buildElementMapYaml( - new String[] { collapseDomains, expandDomains, realPath, contentFileName, layoutFileName }); - - return yamlString; - } - - @RequestMapping(value = { "/elementMapLink" }, method = RequestMethod.GET, produces = "text/plain") - public String callflow(HttpServletRequest request, HttpServletResponse response) throws Exception { - - String callFlowName = request.getParameter("callFlowName"); - String callFlowStep = request.getParameter("callFlowStep"); - - final String realPath = request.getServletContext().getRealPath("/"); - logger.debug(EELFLoggerDelegate.debugLogger, "callflow: servlet context real path: {}", realPath); - - ElementLinkService eltLinkSvc = new ElementLinkService(); - String yamlString = eltLinkSvc.buildElementLinkYaml(new String[] { realPath, callFlowName, callFlowStep }); - - return yamlString; - } - - /* - public ModelAndView callflowAdditional(HttpServletRequest request, HttpServletResponse response) throws Exception { - - Map model = new HashMap(); - String callFlowName = request.getParameter("callFlowName"); - String callFlowStep = request.getParameter("callFlowStep"); - - ElementLinkService main = new ElementLinkService(); - String yamlString = main.main2(new String[] { callFlowName, callFlowStep }); - model.put("output_string", yamlString); - return new ModelAndView("data_out", "model", model); - } - */ - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java deleted file mode 100644 index bda3c0aa..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -/** - * Controller for geographic map view. The view is restricted to authenticated - * users. The view name defaults to the request name with no suffix, - * "leafletMap", which resolves to page leafletMap.jsp. - */ -@Controller -@RequestMapping("/") -public class LeafletMapContoller extends RestrictedBaseController { - - @RequestMapping(value = { "/leafletMap" }, method = RequestMethod.GET) - public ModelAndView plot() { - final String defaultViewName = null; - return new ModelAndView(defaultViewName); - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java deleted file mode 100644 index 1961edf8..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -/** - * Controller for a network map view that uses iframes. The view is restricted - * to authenticated users. - */ -@Controller -@RequestMapping("/") -public class NetMapController extends RestrictedBaseController { - - @RequestMapping(value = { "/net_map" }, method = RequestMethod.GET) - public ModelAndView plot(HttpServletRequest request) { - Map model = new HashMap(); - model.put("frame_int", "net_map_int"); - // This view resolves to page frame_insert.jsp - return new ModelAndView("frame_insert", model); - } - - @RequestMapping(value = { "/net_map_int" }, method = RequestMethod.GET) - public ModelAndView plot2() { - // The view name defaults to the request without any suffix. - final String defaultViewName = null; - // This view resolves to page net_map.jsp - return new ModelAndView(defaultViewName); - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java deleted file mode 100644 index 5a0719ee..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java +++ /dev/null @@ -1,122 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.io.PrintWriter; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.json.JSONObject; -import org.openecomp.portalsdk.core.command.PostDroolsBean; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.PostDroolsService; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - -@Controller -@RequestMapping("/") -public class PostDroolsController extends RestrictedBaseController { - - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostDroolsController.class); - - @Autowired - private PostDroolsService postDroolsService; - - @RequestMapping(value = { "/drools" }, method = RequestMethod.GET) - public ModelAndView drools(HttpServletRequest request) { - return new ModelAndView(getViewName()); - } - - @RequestMapping(value = { "/getDrools" }, method = RequestMethod.GET) - public void getDrools(HttpServletRequest request, HttpServletResponse response) { - // Map model = new HashMap(); - - ObjectMapper mapper = new ObjectMapper(); - try { - List beanList = postDroolsService.fetchDroolBeans(); - JsonMessage msg = new JsonMessage(mapper.writeValueAsString(beanList)); - JSONObject j = new JSONObject(msg); - response.getWriter().write(j.toString()); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "getDrools failed", e); - } - } - - @RequestMapping(value = { "/getDroolDetails" }, method = RequestMethod.GET) - public void getDroolDetails(HttpServletRequest request, HttpServletResponse response) { - - ObjectMapper mapper = new ObjectMapper(); - try { - - PostDroolsBean postDroolsBean = new PostDroolsBean(); - String selectedFile = request.getParameter("selectedFile"); - postDroolsBean.setDroolsFile(selectedFile);// sample populated - // postDroolsBean.setSelectedRules("[\"NJ\",\"NY\",\"KY\"]"); - postDroolsBean.setClassName(postDroolsService.retrieveClass(selectedFile)); - - JsonMessage msg = new JsonMessage(mapper.writeValueAsString(postDroolsBean)); - JSONObject j = new JSONObject(msg); - response.getWriter().write(j.toString()); - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "getDroolDetails failed", e); - } - } - - @RequestMapping(value = { "/post_drools/execute" }, method = RequestMethod.POST) - public ModelAndView search(HttpServletRequest request, HttpServletResponse response) throws Exception { - try { - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - JsonNode root = mapper.readTree(request.getReader()); - PostDroolsBean postDroolsBean = mapper.readValue(root.get("postDroolsBean").toString(), - PostDroolsBean.class); - - String resultsString = postDroolsService.execute(postDroolsBean.getDroolsFile(), - postDroolsBean.getClassName(), postDroolsBean.getSelectedRules()); - - response.setCharacterEncoding("UTF-8"); - response.setContentType("application / json"); - request.setCharacterEncoding("UTF-8"); - - PrintWriter out = response.getWriter(); - // String responseString = mapper.writeValueAsString(resultsString); - JSONObject j = new JSONObject("{resultsString: " + resultsString + "}"); - - out.write(j.toString()); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "search failed", e); - } - - return null; - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java deleted file mode 100644 index 9cc44c86..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -/** - * Report dashboard - * - */ - -@Controller -@RequestMapping("/") -public class ReportDashboardController extends RestrictedBaseController { - @RequestMapping(value = {"/report_dashboard" }, method = RequestMethod.GET) - public ModelAndView adminView(HttpServletRequest request) { - Map model = new HashMap(); - return new ModelAndView(getViewName(),"model", model); - } -} \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java deleted file mode 100644 index e01bb8c3..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * 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.controller.sample; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -/** - * Controller for a network map view that uses iframes. The view is restricted - * to authenticated users. - */ -@Controller -@RequestMapping("/") -public class SamplePageController extends RestrictedBaseController { - - @RequestMapping(value = { "/samplePage" }, method = RequestMethod.GET) - public ModelAndView plot(HttpServletRequest request) { - Map model = new HashMap(); - /*model.put("frame_int", "net_map_int"); - // This view resolves to page frame_insert.jsp - return new ModelAndView("frame_insert", model);*/ - return new ModelAndView("samplePage", "model", model); - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java deleted file mode 100644 index 8c04d60f..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.openecomp.portalapp.controller.sample; - -/** - * Provides controllers for EPSDK application sample pages such as call flow etc. - */ -- cgit 1.2.3-korg