View Javadoc
1   /*
2    * Licensed under the GPL License. You may not use this file except in compliance with the License.
3    * You may obtain a copy of the License at
4    *
5    *   https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6    *
7    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
8    * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
9    * PURPOSE.
10   */
11  package psiprobe.controllers;
12  
13  import jakarta.inject.Inject;
14  
15  import org.slf4j.Logger;
16  import org.slf4j.LoggerFactory;
17  import org.springframework.web.servlet.mvc.AbstractController;
18  
19  import psiprobe.beans.ContainerWrapperBean;
20  
21  /**
22   * Base class for controllers requiring access to ContainerWrapperBean.
23   */
24  public abstract class AbstractTomcatContainerController extends AbstractController {
25  
26    /**
27     * The logger.
28     * <p>
29     * Direct usage of slf4j rather than spring usage of commons logging located her to protect
30     * downstream usage.
31     */
32    @SuppressWarnings("HidingField")
33    protected final Logger logger = LoggerFactory.getLogger(getClass());
34  
35    /** The container wrapper. */
36    @Inject
37    private ContainerWrapperBean containerWrapper;
38  
39    /** The view name. */
40    private String viewName;
41  
42    /**
43     * Gets the container wrapper.
44     *
45     * @return the container wrapper
46     */
47    public ContainerWrapperBean getContainerWrapper() {
48      return containerWrapper;
49    }
50  
51    /**
52     * Sets the container wrapper.
53     *
54     * @param containerWrapper the new container wrapper
55     */
56    public void setContainerWrapper(ContainerWrapperBean containerWrapper) {
57      this.containerWrapper = containerWrapper;
58    }
59  
60    /**
61     * Gets the view name.
62     *
63     * @return the view name
64     */
65    public String getViewName() {
66      return viewName;
67    }
68  
69    /**
70     * Sets the view name.
71     *
72     * @param viewName the new view name
73     */
74    public void setViewName(String viewName) {
75      this.viewName = viewName;
76    }
77  }