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