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