1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts2;
22
23 /***
24 * Default action interface. Provided purely for user convenience. Struts does not require actions to implement any
25 * interfaces. Actions need only implement a public, no argument method which returns {@code String}. If a user does
26 * not specify a method name, Struts defaults to {@code execute()}.
27 *
28 * <p>For example:
29 *
30 * <pre>
31 * static import ResultNames.*;
32 *
33 * public class MyAction <b>implements Action</b> {
34 *
35 * public String execute() {
36 * return SUCCESS;
37 * }
38 * }
39 * </pre>
40 *
41 * <p>is equivalent to:
42 *
43 * <pre>
44 * static import ResultNames.*;
45 *
46 * public class MyAction {
47 *
48 * public String execute() {
49 * return SUCCESS;
50 * }
51 * }
52 * </pre>
53 *
54 * @author crazybob@google.com (Bob Lee)
55 */
56 public interface Action {
57
58 /***
59 * Executes this action.
60 *
61 * @return result name which matches a result name from the action mapping in the configuration file. See {@link
62 * ResultNames} for common suggestions.
63 */
64 String execute();
65 }