1
2
3
4
5 package com.hack23.cia.web.viewfactory.api.user;
6
7 import com.hack23.cia.model.application.dto.common.UserSessionDTO;
8 import com.hack23.cia.web.action.common.ControllerAction;
9
10 /***
11 * The Class UrlModelAndView.
12 */
13 public class UrlModelAndView extends AbstractUserModelAndView {
14
15 /***
16 * The Enum UrlViewSpecification.
17 */
18 public enum UrlViewSpecification {
19
20 /*** The Url view. */
21 UrlView
22 }
23
24 /*** The Constant serialVersionUID. */
25 private static final long serialVersionUID = 1L;
26
27 /*** The title. */
28 private final String title;
29
30 /*** The url. */
31 private final String url;
32
33 /*** The url view specification. */
34 private final UrlViewSpecification urlViewSpecification;
35
36 /***
37 * Instantiates a new url model and view.
38 *
39 * @param userSessionDTO the user session dto
40 * @param controllerAction the controller action
41 * @param urlViewSpecification the url view specification
42 * @param title the title
43 * @param url the url
44 */
45 public UrlModelAndView(final UserSessionDTO userSessionDTO,
46 final ControllerAction controllerAction,
47 final UrlViewSpecification urlViewSpecification,
48 final String title, final String url) {
49 super(userSessionDTO, controllerAction);
50 this.urlViewSpecification = urlViewSpecification;
51 this.title = title;
52 this.url = url;
53 }
54
55 /***
56 * Gets the title.
57 *
58 * @return the title
59 */
60 public final String getTitle() {
61 return title;
62 }
63
64 /***
65 * Gets the url.
66 *
67 * @return the url
68 */
69 public final String getUrl() {
70 return url;
71 }
72
73 /***
74 * Gets the url view specification.
75 *
76 * @return the url view specification
77 */
78 public final UrlViewSpecification getUrlViewSpecification() {
79 return urlViewSpecification;
80 }
81
82
83
84
85
86
87
88 @Override
89 public final String getViewSpecificationDescription() {
90 return urlViewSpecification.toString();
91 }
92
93 }