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.Agency;
9   import com.hack23.cia.web.action.common.ControllerAction;
10  
11  /***
12   * The Class AgencyModelAndView.
13   */
14  public class AgencyModelAndView extends AbstractAgencyModelAndView {
15  
16      /***
17       * The Enum AgencyViewSpecification.
18       */
19      public enum AgencyViewSpecification {
20  
21          /*** The Configure agency view. */
22          ConfigureAgencyView
23      }
24  
25      /*** The Constant serialVersionUID. */
26      private static final long serialVersionUID = 1L;
27  
28      /*** The agency view specification. */
29      private final AgencyViewSpecification agencyViewSpecification;
30  
31      /***
32       * Instantiates a new agency model and view.
33       *
34       * @param userSessionDTO the user session dto
35       * @param controllerAction the controller action
36       * @param agencyViewSpecification the agency view specification
37       * @param agency the agency
38       */
39      public AgencyModelAndView(final UserSessionDTO userSessionDTO,
40              final ControllerAction controllerAction,
41              final AgencyViewSpecification agencyViewSpecification,
42              final Agency agency) {
43          super(userSessionDTO, controllerAction, agency);
44          this.agencyViewSpecification = agencyViewSpecification;
45      }
46  
47      /***
48       * Gets the agency view specification.
49       *
50       * @return the agency view specification
51       */
52      public final AgencyViewSpecification getAgencyViewSpecification() {
53          return agencyViewSpecification;
54      }
55  
56      /*
57       * (non-Javadoc)
58       * 
59       * @seecom.hack23.cia.web.viewfactory.api.common.AbstractModelAndView#
60       * getViewSpecificationDescription()
61       */
62      @Override
63      public final String getViewSpecificationDescription() {
64          return agencyViewSpecification.toString();
65      }
66  
67  }