2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.vid.controller;
\r
24 import java.io.File;
\r
25 import java.text.DateFormat;
\r
26 import java.util.HashMap;
\r
27 import java.util.Map;
\r
32 import javax.servlet.ServletContext;
\r
33 import javax.servlet.http.HttpServletRequest;
\r
35 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
\r
36 import org.springframework.beans.factory.annotation.Autowired;
\r
37 import org.springframework.web.bind.annotation.PathVariable;
\r
38 import org.springframework.web.bind.annotation.RequestMapping;
\r
39 import org.springframework.web.bind.annotation.RequestMethod;
\r
40 import org.springframework.web.bind.annotation.RestController;
\r
41 import org.springframework.web.servlet.ModelAndView;
\r
43 import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
\r
47 * The Class ViewEditSubController.
\r
50 public class ViewEditSubController extends RestrictedBaseController{
\r
52 /** The view name. */
\r
56 EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ViewEditSubController.class);
\r
59 private Map<String, Object> model = new HashMap<String, Object>();
\r
61 /** The servlet context. */
\r
62 private @Autowired ServletContext servletContext;
\r
67 * @param request the request
\r
68 * @return the model and view
\r
70 @RequestMapping(value = {"/vieweditsub" }, method = RequestMethod.GET)
\r
71 public ModelAndView welcome(HttpServletRequest request) {
\r
72 return new ModelAndView("vieweditsub","model", model);
\r
73 // return new ModelAndView(getViewName());
\r
79 * @param request the request
\r
81 @RequestMapping(value="/vieweditsub/subedit", method = RequestMethod.POST)
\r
82 public void PostSubscriber(HttpServletRequest request) {
\r
84 String subID = request.getParameter("subscriberID");
\r
85 model.put("subInfo", subID);
\r
90 * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#getViewName()
\r
92 public String getViewName() {
\r
97 * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#setViewName(java.lang.String)
\r
99 public void setViewName(String viewName) {
\r
100 this.viewName = viewName;
\r