View Javadoc

1   /*
2   Copyright 2010 James Pether Sörling Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 
3   	$Id
4   */
5   package com.hack23.cia.web.viewfactory.api.admin;
6   
7   import com.hack23.cia.model.application.dto.common.UserSessionDTO;
8   import com.hack23.cia.model.application.impl.common.ImageContent;
9   import com.hack23.cia.web.action.common.ControllerAction;
10  
11  /***
12   * The Class MonitorModelAndView.
13   */
14  public class MonitorModelAndView extends AbstractAdminModelAndView {
15  
16      /***
17       * The Enum MonitorViewSpecification.
18       */
19      public enum MonitorViewSpecification {
20  
21          /*** The Recent actions view. */
22          RecentActionsView,
23  
24          /*** The Response time view. */
25          ResponseTimeView
26      }
27  
28      /*** The Constant serialVersionUID. */
29      private static final long serialVersionUID = 1L;
30  
31      /*** The graph file path. */
32      private final ImageContent graphFilePath;
33  
34      /*** The monitor view specification. */
35      private final MonitorViewSpecification monitorViewSpecification;
36  
37      /***
38       * Instantiates a new monitor model and view.
39       *
40       * @param userSessionDTO the user session dto
41       * @param controllerAction the controller action
42       * @param monitorViewSpecification the monitor view specification
43       * @param imageContent the image content
44       */
45      public MonitorModelAndView(final UserSessionDTO userSessionDTO,
46              final ControllerAction controllerAction,
47              final MonitorViewSpecification monitorViewSpecification,
48              final ImageContent imageContent) {
49          super(userSessionDTO, controllerAction);
50          this.monitorViewSpecification = monitorViewSpecification;
51          this.graphFilePath = imageContent;
52      }
53  
54      /***
55       * Gets the graph file path.
56       *
57       * @return the graph file path
58       */
59      public final ImageContent getGraphFilePath() {
60          return graphFilePath;
61      }
62  
63      /***
64       * Gets the monitor view specification.
65       *
66       * @return the monitor view specification
67       */
68      public final MonitorViewSpecification getMonitorViewSpecification() {
69          return monitorViewSpecification;
70      }
71  
72      /*
73       * (non-Javadoc)
74       * 
75       * @seecom.hack23.cia.web.viewfactory.api.common.AbstractModelAndView#
76       * getViewSpecificationDescription()
77       */
78      @Override
79      public final String getViewSpecificationDescription() {
80          return monitorViewSpecification.toString();
81      }
82  }