X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fcontroller%2FExternalAppsRestfulController.java;h=d43d9f3e22a77c03599597e4854df05c99a51d0a;hb=e4fae46259c1d5b877e2ac6c394e2f43cea16d22;hp=d77475caf9a201942abe525a9e3f9a20bd8c9403;hpb=7daf56998811b4327e556c709905f9eb494226b5;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulController.java index d77475ca..d43d9f3e 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulController.java @@ -6,6 +6,8 @@ * =================================================================== * Modifications Copyright (c) 2019 Samsung * =================================================================== + * Modification Copyright © 2020 IBM. + * =================================================================== * * Unless otherwise specified, all software contained herein is licensed * under the Apache License, Version 2.0 (the "License"); @@ -82,7 +84,8 @@ import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ExceptionHandler; 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.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; @@ -114,7 +117,7 @@ public class ExternalAppsRestfulController extends EPRestrictedRESTfulBaseContro private EPRoleService epRoleService; @ApiOperation(value = "Creates a Portal user notification for roles identified in the content from an external application.", response = PortalAPIResponse.class) - @RequestMapping(value = { "/publishNotification" }, method = RequestMethod.POST, produces = "application/json") + @PostMapping(value = { "/publishNotification" }, produces = "application/json") @ResponseBody public PortalAPIResponse publishNotification(HttpServletRequest request, @RequestBody EpNotificationItem notificationItem) throws Exception { @@ -174,7 +177,7 @@ public class ExternalAppsRestfulController extends EPRestrictedRESTfulBaseContro } @ApiOperation(value = "Gets favorite items within the functional menu for the current user.", response = FavoritesFunctionalMenuItemJson.class, responseContainer="List") - @RequestMapping(value = { "/getFavorites" }, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = { "/getFavorites" }, produces = "application/json") public List getFavoritesForUser(HttpServletRequest request, HttpServletResponse response) throws Exception { String loginId = ""; @@ -203,8 +206,8 @@ public class ExternalAppsRestfulController extends EPRestrictedRESTfulBaseContro } @ApiOperation(value = "Gets functional menu items appropriate for the current user.", response = FunctionalMenuItem.class, responseContainer="List") - @RequestMapping(value = { - "/functionalMenuItemsForUser" }, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = { + "/functionalMenuItemsForUser" }, produces = "application/json") public List getFunctionalMenuItemsForUser(HttpServletRequest request, HttpServletResponse response) throws Exception { String loginId = ""; @@ -246,7 +249,7 @@ public class ExternalAppsRestfulController extends EPRestrictedRESTfulBaseContro } @EPAuditLog - @RequestMapping(value = { "/validateCookie" }, method = RequestMethod.POST) + @PostMapping(value = { "/validateCookie" }) public boolean validateCookie(@RequestBody EPServiceCookie epServiceCookie, HttpServletRequest request) throws Exception { Map epServiceCookieValueMap = epServiceCookie.getValue(); if(epServiceCookieValueMap!=null) {