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 * Interface that defines a view in Tarsis MVC Framework.<br>
27 * <br>
28 * The command view is the piece of software responsible of presentation logic.
29 * A view is executed after when command action is finished.<br>
30 * Views are servlets, JSP pages, HTML pages and any other web artifact which we
31 * can forward, redirect or include.<br>
32 * <br>
33 * View type can be FORWARD, REDIRECT or INCLUDE depending on invokation's method.
34 * FORWARD view is invoked using <code>dispatch</code> method, REDIRECT view is
35 * invoked using <code>sendRedirect</code> method and INCLUDE using <code>include</code>
36 * method.
37 *
38 * @author Jose M. Palomar
39 * @version $Revision: 121 $
40 * @see org.talika.tarsis.command.Command
41 * @see org.talika.tarsis.command.action.Action
42 */
43 public interface View {
44
45
46 /**
47 * Forward view type.
48 */
49 int FORWARD = 0;
50
51 /**
52 * Redirect view type.
53 */
54 int REDIRECT = 1;
55
56 /**
57 * Include view type.
58 */
59 int INCLUDE = 2;
60
61 /**
62 * Default view name.
63 */
64 String DEFAULT_VIEW_NAME = "default";
65
66 /**
67 * Input view name.
68 */
69 String INPUT_VIEW_NAME = "input";
70
71
72 /**
73 * Returns view's type.
74 *
75 * @return int view's type.
76 */
77 int getType();
78
79 /**
80 * Returns name of view.
81 *
82 * @return String name of view.
83 */
84 String getName();
85
86 /**
87 * Returns path fo view.
88 *
89 * @return String path fo view.
90 */
91 String getPath();
92
93 }