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.apps;
12  
13  import javax.inject.Inject;
14  
15  import org.springframework.stereotype.Controller;
16  
17  import psiprobe.beans.stats.collectors.AppStatsCollectorBean;
18  
19  /**
20   * The Class ResetAppStatsController.
21   */
22  // TODO 12/11/2016 JWL - This controller was not even setup...review it's need
23  @Controller
24  public class ResetAppStatsController extends AbstractNoSelfContextHandlerController {
25  
26    /** The stats collector. */
27    @Inject
28    private AppStatsCollectorBean statsCollector;
29  
30    /**
31     * Gets the stats collector.
32     *
33     * @return the stats collector
34     */
35    public AppStatsCollectorBean getStatsCollector() {
36      return statsCollector;
37    }
38  
39    /**
40     * Sets the stats collector.
41     *
42     * @param statsCollector the new stats collector
43     */
44    public void setStatsCollector(AppStatsCollectorBean statsCollector) {
45      this.statsCollector = statsCollector;
46    }
47  
48    @Override
49    protected void executeAction(String contextName) throws Exception {
50      statsCollector.reset(contextName);
51    }
52  
53  }