actually adding the files to the initial commit
[vid.git] / vid / src / main / java / org / openecomp / vid / controller / VidHomeController.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.vid.controller;
22
23
24 import javax.servlet.ServletContext;
25 import javax.servlet.http.HttpServletRequest;
26
27
28 import org.springframework.beans.factory.annotation.Autowired;
29
30 import org.springframework.web.bind.annotation.RequestMapping;
31 import org.springframework.web.bind.annotation.RequestMethod;
32 import org.springframework.web.bind.annotation.RestController;
33 import org.springframework.web.servlet.ModelAndView;
34
35 import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
36
37
38 /**
39  * The Class VidHomeController.
40  */
41 @RestController
42 public class VidHomeController extends RestrictedBaseController{
43         
44         /** The view name. */
45         String viewName;
46         
47         
48         /** The servlet context. */
49         private @Autowired ServletContext servletContext;
50         
51         /**
52          * Welcome.
53          *
54          * @param request the request
55          * @return the model and view
56          */
57         @RequestMapping(value = {"/vidhome" }, method = RequestMethod.GET)
58         public ModelAndView welcome(HttpServletRequest request) {
59                 
60           return new ModelAndView(getViewName());               
61         }
62         
63         /* (non-Javadoc)
64          * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#getViewName()
65          */
66         public String getViewName() {
67                 return viewName;
68         }
69         
70         /* (non-Javadoc)
71          * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#setViewName(java.lang.String)
72          */
73         public void setViewName(String viewName) {
74                 this.viewName = viewName;
75         }
76
77         
78
79 }