WW-1353 Refactor MailReader to use namespaces and conventional, finely-grained actions with no aliases. (Refactoring for wildcards is next.)

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@428196 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ted Nathan Husted
2006-08-02 23:43:27 +00:00
parent d0726b1be2
commit b073963550
41 changed files with 1304 additions and 1169 deletions
@@ -1,16 +1,19 @@
package mailreader2;
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Action;
import java.util.Map;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
import org.apache.struts.apps.mailreader.dao.User;
public class AuthenticationInterceptor implements Interceptor {
import java.util.Map;
public void destroy () {}
public class AuthenticationInterceptor implements Interceptor {
public void init() {}
public void destroy() {
}
public void init() {
}
public String intercept(ActionInvocation actionInvocation) throws Exception {
@@ -18,12 +21,11 @@ public class AuthenticationInterceptor implements Interceptor {
User user = (User) session.get(Constants.USER_KEY);
boolean isAuthenticated = (null!=user) && (null!=user.getDatabase());
boolean isAuthenticated = (null != user) && (null != user.getDatabase());
if (!isAuthenticated) {
return Action.LOGIN;
}
else {
return Action.LOGIN;
} else {
return actionInvocation.invoke();
}