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 protected ContainerWrapperBean containerWrapper;
38
39 /** The view name. */
40 private String viewName;
41
42 /**
43 * Gets the view name.
44 *
45 * @return the view name
46 */
47 public String getViewName() {
48 return viewName;
49 }
50
51 /**
52 * Sets the view name.
53 *
54 * @param viewName the new view name
55 */
56 public void setViewName(String viewName) {
57 this.viewName = viewName;
58 }
59 }