1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.talika.tarsis.command.view;
24
25 /**
26 * Default implementation of <code>View</code> interface.<br>
27 *
28 * @author Jose M. Palomar
29 * @version $Revision: 113 $
30 */
31 public class ViewImpl implements View {
32
33
34 /**
35 * Name of view.
36 */
37 private final String name;
38
39 /**
40 * Path of view.
41 */
42 private final String path;
43
44 /**
45 * Type of view.
46 */
47 private final int type;
48
49 /**
50 * Constructs a new <code>ViewImpl</code> object for given name, path and type.
51 *
52 * @param name String name of view.
53 * @param path String path fo view.
54 * @param type int type of view.
55 */
56 public ViewImpl(String name, String path, int type) {
57 this.name = name;
58 this.path = path;
59 this.type = type;
60 }
61
62 /**
63 * Returns name of view.
64 *
65 * @return String name of view.
66 * @see org.talika.tarsis.command.view.View#getName()
67 */
68 public final String getName() {
69 return name;
70 }
71
72 /**
73 * Returns path fo view.
74 *
75 * @return String path fo view.
76 * @see org.talika.tarsis.command.view.View#getPath()
77 */
78 public final String getPath() {
79 return path;
80 }
81
82 /**
83 * Returns view's type. View's can be FORWARD, REDIRECT or INCLUDE.
84 *
85 * @return int view's type.
86 * @see org.talika.tarsis.command.view.View#getType()
87 */
88 public final int getType() {
89 return type;
90 }
91
92 }