1 | package gov.va.med.edp.web.controller;
|
---|
2 |
|
---|
3 | import gov.va.med.edp.vistalink.locator.VistaLinkConnectorConfig;
|
---|
4 | import org.springframework.beans.factory.InitializingBean;
|
---|
5 | import org.springframework.util.Assert;
|
---|
6 | import org.springframework.web.servlet.ModelAndView;
|
---|
7 | import org.springframework.web.servlet.mvc.AbstractController;
|
---|
8 |
|
---|
9 | import javax.servlet.http.HttpServletRequest;
|
---|
10 | import javax.servlet.http.HttpServletResponse;
|
---|
11 | import java.util.Set;
|
---|
12 |
|
---|
13 | public class LoginController extends AbstractController implements InitializingBean {
|
---|
14 |
|
---|
15 | public static final String DEFAULT_VIEW_NAME = "login";
|
---|
16 |
|
---|
17 | private String viewName = DEFAULT_VIEW_NAME;
|
---|
18 |
|
---|
19 | private Set/*<VistaLinkConnectorConfig>*/ vistaAccounts;
|
---|
20 |
|
---|
21 | public void afterPropertiesSet() throws Exception {
|
---|
22 | Assert.notNull(viewName, "viewName must not be null");
|
---|
23 | }
|
---|
24 |
|
---|
25 | protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
---|
26 | return new ModelAndView(getViewName(), "vistaAccounts", vistaAccounts);
|
---|
27 | }
|
---|
28 |
|
---|
29 | public String getViewName() {
|
---|
30 | return viewName;
|
---|
31 | }
|
---|
32 |
|
---|
33 | public void setViewName(String viewName) {
|
---|
34 | this.viewName = viewName;
|
---|
35 | }
|
---|
36 |
|
---|
37 | public Set/*<VistaLinkConnectorConfig>*/ getVistaAccounts() {
|
---|
38 | return vistaAccounts;
|
---|
39 | }
|
---|
40 |
|
---|
41 | public void setVistaAccounts(Set/*<VistaLinkConnectorConfig>*/ vistaAccounts) {
|
---|
42 | this.vistaAccounts = vistaAccounts;
|
---|
43 | }
|
---|
44 | }
|
---|