X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fcontroller%2FWebAnalyticsExtAppController.java;h=a8eb1d63b93960db58a4e77c06c0176716f2971e;hb=cc6ee26dd12723032eb026e79f71a0fdd35dde03;hp=92449a3a4415b8c454a4336a134dfbcfe99ca7e1;hpb=21e503048d2d083e532064de6aab0fcb7ae0dea1;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppController.java index 92449a3a..a8eb1d63 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppController.java @@ -4,6 +4,8 @@ * =================================================================== * Copyright (C) 2019 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"); @@ -77,6 +79,8 @@ import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.SuccessCallback; 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.ResponseBody; import org.springframework.web.bind.annotation.RestController; @@ -117,7 +121,7 @@ public class WebAnalyticsExtAppController extends EPRestrictedRESTfulBaseControl * @return String */ @ApiOperation(value = "Gets javascript with functions that support gathering and reporting web analytics.", response = String.class) - @RequestMapping(value = { "/analytics" }, method = RequestMethod.GET, produces = "application/javascript") + @GetMapping(value = { "/analytics" }, produces = "application/javascript") public String getAnalyticsScript(HttpServletRequest request) { String responseText = ""; EPApp app = null; @@ -162,7 +166,7 @@ public class WebAnalyticsExtAppController extends EPRestrictedRESTfulBaseControl * Analytics * @return PortalAPIResponse */ - @RequestMapping(value = { "/storeAnalytics" }, method = RequestMethod.POST, produces = "application/json") + @PostMapping(value = { "/storeAnalytics" }, produces = "application/json") @ResponseBody @ApiOperation(value = "Accepts data from partner applications with web analytics data.", response = PortalAPIResponse.class) public PortalAPIResponse storeAnalyticsScript(HttpServletRequest request, @RequestBody Analytics analyticsMap) {