* ===================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ===================================================================
+ * Modifications Copyright (c) 2020 IBM
+ * ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
* under the Apache License, Version 2.0 (the "License");
* you may not use this software except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
private static final String SUCCESS = "success";
private static final String FAILURE = "FAILURE";
- @RequestMapping(value = {
- "/portalApi/getFunctionalMenuRole" }, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/portalApi/getFunctionalMenuRole" }, produces = "application/json")
public List<FunctionalMenuRole> getMenuIdRoleId(HttpServletRequest request, HttpServletResponse response) {
// EPUser user = EPUserUtils.getUserSession(request);
List<FunctionalMenuRole> menuRoleList = null;
return menuRoleList;
}
- @RequestMapping(value = {
- "/portalApi/getNotifications" }, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/portalApi/getNotifications" }, produces = "application/json")
public PortalRestResponse<List<EpNotificationItem>> getNotifications(HttpServletRequest request,
HttpServletResponse response) {
EPUser user = EPUserUtils.getUserSession(request);
return portalRestResponse;
}
- @RequestMapping(value = {
- "/portalApi/getAdminNotifications" }, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/portalApi/getAdminNotifications" }, produces = "application/json")
public List<EpNotificationItemVO> getAdminNotifications(HttpServletRequest request, HttpServletResponse response) {
List<EpNotificationItemVO> adminNotificationList = null;
EPUser user = EPUserUtils.getUserSession(request);
return adminNotificationList;
}
- @RequestMapping(value = "/portalApi/saveNotification", method = RequestMethod.POST, produces = "application/json")
+ @PostMapping(value = "/portalApi/saveNotification", produces = "application/json")
public PortalRestResponse<String> save(HttpServletRequest request, HttpServletResponse response,
@RequestBody EpNotificationItem notificationItem) {
return new PortalRestResponse<>(PortalRestStatusEnum.OK, "SUCCESS", "");
}
- @RequestMapping(value = {
- "/portalApi/notificationUpdateRate" }, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/portalApi/notificationUpdateRate" }, produces = "application/json")
public PortalRestResponse<Map<String, String>> getNotificationUpdateRate(HttpServletRequest request) {
try {
String updateRate = SystemProperties.getProperty(EPCommonSystemProperties.NOTIFICATION_UPDATE_RATE);
}
}
- @RequestMapping(value = {
- "/portalApi/notificationRead" }, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/portalApi/notificationRead" }, produces = "application/json")
public PortalRestResponse<Map<String, String>> notificationRead(
@RequestParam("notificationId") String notificationID, HttpServletRequest request) {
try {
}
}
- @RequestMapping(value = {
- "/portalApi/getNotificationHistory" }, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/portalApi/getNotificationHistory" }, produces = "application/json")
public List<EpNotificationItemVO> getNotificationHistory(HttpServletRequest request, HttpServletResponse response) {
EPUser user = EPUserUtils.getUserSession(request);
List<EpNotificationItemVO> notificationList = null;
return notificationList;
}
- @RequestMapping(value = { "/portalApi/notificationRole/{notificationId}/roles" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/notificationRole/{notificationId}/roles" }, produces = "application/json")
public List<Integer> testGetRoles(HttpServletRequest request, @PathVariable("notificationId") Long notificationId) {
List<EpRoleNotificationItem> notifRoles = userNotificationService.getNotificationRoles(notificationId);
ArrayList<Integer> rolesList = new ArrayList<>();
return rolesList;
}
- @RequestMapping(value = { "/portalApi/getNotificationAppRoles" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/getNotificationAppRoles" }, produces = "application/json")
public List<EcompAppRole> getNotificationAppRoles(HttpServletRequest request, HttpServletResponse response) {
List<EcompAppRole> epAppRoleList = null;
try {
return epAppRoleList;
}
- @RequestMapping(value = {
- "/portalApi/getMessageRecipients" }, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/portalApi/getMessageRecipients" }, produces = "application/json")
public List<String> getMessageRecipients(@RequestParam("notificationId") Long notificationID) {
// EPUser user = EPUserUtils.getUserSession(request);
List<String> messageUserRecipients = null;