lower code smells
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / controller / sessionmgt / SessionCommunicationController.java
index e17c67c..1553991 100644 (file)
@@ -3,6 +3,8 @@
  * ONAP Portal
  * ===================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2019 IBM.
  * ===================================================================
  *
  * Unless otherwise specified, all software contained herein is licensed
@@ -33,7 +35,7 @@
  *
  * ============LICENSE_END============================================
  *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * 
  */
 package org.onap.portalapp.controller.sessionmgt;
 
@@ -49,9 +51,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 
 import io.swagger.annotations.ApiOperation;
 
@@ -73,15 +76,15 @@ public class SessionCommunicationController  extends EPRestrictedRESTfulBaseCont
        
        @ApiOperation(value = "Gets session slot-check interval, a duration in milliseconds.",
     response = Integer.class)
-       @RequestMapping(value={"/getSessionSlotCheckInterval"}, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value={"/getSessionSlotCheckInterval"}, produces = "application/json")
        public Integer getSessionSlotCheckInterval(HttpServletRequest request, HttpServletResponse response) throws Exception {
                return manageService.fetchSessionSlotCheckInterval();
        }
        
        @ApiOperation(value = "Extends session timeout values for all on-boarded applications.",
     response = Boolean.class)
-       @RequestMapping(value={"/extendSessionTimeOuts"}, method = RequestMethod.POST)
-       public Boolean extendSessionTimeOuts(HttpServletRequest request, HttpServletResponse response, @RequestParam String sessionMap) throws Exception {
+       @PostMapping(value={"/extendSessionTimeOuts"})
+       public Boolean extendSessionTimeOuts(HttpServletRequest request, HttpServletResponse response, @RequestParam String sessionMap) {
                manageService.extendSessionTimeOuts(sessionMap);
                
                return true;