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