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.action;
24
25 import org.talika.tarsis.command.Request;
26 import org.talika.tarsis.command.Response;
27
28 /**
29 * Default implementation of <code>Action</code> interface.<br>
30 * <br>
31 * Defines all methods of action interface. The implementation of <code>validate</code>
32 * and <code>execute</code> are empty and do nothing.
33 *
34 * @author Jose M. Palomar
35 * @version $Revision: 113 $
36 */
37 public class DefaultAction extends AbstractAction {
38
39 /**
40 * Constructs a new <code>DefaultAction</code> object.
41 */
42 public DefaultAction() {
43 }
44
45 /**
46 * Called by Tarsis MVC Framework to validate request everytime command is
47 * invoked.<br>
48 * <br>
49 * This method is called only if command is validable.<br>
50 * <br>
51 * This implementation do nothing.
52 *
53 * @param request Request object representing client's request.
54 * @throws ActionException if an exception has occurred that interferes with the
55 * action's normal operation.
56 * @see org.talika.tarsis.command.action.Action#validate(Request)
57 */
58 public void validate(Request request) throws ActionException {
59 }
60
61 /**
62 * Called by Tarsis MVC Framework to handle request everytime command is
63 * invoked.<br>
64 * This implementation do nothing and returns <code>null</code>.
65 *
66 * @param request Request object representing client's request.
67 * @param response Response object representing client's reponse.
68 * @return String the name of view to be forwarded or <code>null</code> for
69 * default view.
70 * @throws ActionException if an exception has occurred that interferes with the
71 * action's normal operation.
72 * @see org.talika.tarsis.command.action.Action#execute(Request, Response)
73 */
74 public String execute(Request request, Response response) throws ActionException {
75 return null;
76 }
77
78 }