8748f29367fd9a34c5851663141485649c0a9b3a
[ui/dmaapbc.git] /
1 package org.openecomp.dcae.dmaapbc.dbcapp.controller;
2
3 import java.text.DateFormat;
4 import java.text.SimpleDateFormat;
5
6 import org.springframework.stereotype.Controller;
7 import org.springframework.web.bind.annotation.RequestMapping;
8 import org.springframework.web.bind.annotation.RequestMethod;
9 import org.springframework.web.servlet.ModelAndView;
10
11 /**
12  * This controller maps requests for the DMaaP-BC-App's landing page, which is
13  * an Angular single-page application.
14  */
15 @Controller
16 @RequestMapping("/")
17 public class DataBusHomeController extends DbcappRestrictedBaseController {
18
19         public static final String APP_NAME = "dmaap-bc-app";
20         public static final DateFormat logDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
21
22         /**
23          * At one time I published the landing page as simply "/dbc", but it can
24          * also be accessed with a default suffix; e.g., "/dbc.htm".
25          * 
26          * @return View name key, which is resolved to a file using an Apache tiles
27          *         "definitions.xml" file.
28          */
29         @RequestMapping(value = { "/dbc" }, method = RequestMethod.GET)
30         public ModelAndView dbcDefaultController() {
31                 // a model is only useful for JSP; this app is angular.
32                 return new ModelAndView("dbc_home_tdkey");
33         }
34
35 }