Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WW-3714 Deprecate and repackage common APIs part 1 #1079

Merged
merged 3 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 5 additions & 65 deletions core/src/main/java/com/opensymphony/xwork2/Action.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,70 +19,10 @@
package com.opensymphony.xwork2;

/**
* All actions <b>may</b> implement this interface, which exposes the <code>execute()</code> method.
* <p>
* However, as of XWork 1.1, this is <b>not</b> required and is only here to assist users. You are free to create POJOs
* that honor the same contract defined by this interface without actually implementing the interface.
* </p>
* {@inheritDoc}
*
* @deprecated since 6.7.0, use {@link org.apache.struts2.Action} instead.
*/
public interface Action {

/**
* The action execution was successful. Show result
* view to the end user.
*/
public static final String SUCCESS = "success";

/**
* The action execution was successful but do not
* show a view. This is useful for actions that are
* handling the view in another fashion like redirect.
*/
public static final String NONE = "none";

/**
* The action execution was a failure.
* Show an error view, possibly asking the
* user to retry entering data.
*/
public static final String ERROR = "error";

/**
* <p>
* The action execution require more input
* in order to succeed.
* This result is typically used if a form
* handling action has been executed so as
* to provide defaults for a form. The
* form associated with the handler should be
* shown to the end user.
* </p>
*
* <p>
* This result is also used if the given input
* params are invalid, meaning the user
* should try providing input again.
* </p>
*/
public static final String INPUT = "input";

/**
* The action could not execute, since the
* user most was not logged in. The login view
* should be shown.
*/
public static final String LOGIN = "login";


/**
* Where the logic of the action is executed.
*
* @return a string representing the logical result of the execution.
* See constants in this interface for a list of standard result values.
* @throws Exception thrown if a system level exception occurs.
* <b>Note:</b> Application level exceptions should be handled by returning
* an error value, such as <code>Action.ERROR</code>.
*/
public String execute() throws Exception;

@Deprecated
public interface Action extends org.apache.struts2.Action {
}
Loading