Author: mrdon
Date: Thu Jun 22 21:59:05 2006
New Revision: 416567

URL: http://svn.apache.org/viewvc?rev=416567&view=rev
Log:
Remove usage of AroundInterceptor as it has been removed from XWork 2.0

XW-1360

Modified:
    
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/CreateSessionInterceptor.java
    
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/FileUploadInterceptor.java
    
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ScopeInterceptor.java
    
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ServletConfigInterceptor.java

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/CreateSessionInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/CreateSessionInterceptor.java?rev=416567&r1=416566&r2=416567&view=diff
==============================================================================
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/CreateSessionInterceptor.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/CreateSessionInterceptor.java
 Thu Jun 22 21:59:05 2006
@@ -22,7 +22,7 @@
 
 import org.apache.struts.action2.ServletActionContext;
 import com.opensymphony.xwork.ActionInvocation;
-import com.opensymphony.xwork.interceptor.AroundInterceptor;
+import com.opensymphony.xwork.interceptor.AbstractInterceptor;
 
 /**
  * <!-- START SNIPPET: description -->
@@ -73,18 +73,17 @@
  * 
  * @version $Date$ $Id$
  */
-public class CreateSessionInterceptor extends AroundInterceptor {
+public class CreateSessionInterceptor extends AbstractInterceptor {
        
        private static final long serialVersionUID = -4590322556118858869L;
        
        private static final Log _log = 
LogFactory.getLog(CreateSessionInterceptor.class);
        
        
-       protected void before(ActionInvocation invocation) throws Exception {
+    public String intercept(ActionInvocation invocation) throws Exception {
                _log.debug("Creating HttpSession");
                ServletActionContext.getRequest().getSession(true);
+        return invocation.invoke();
        }
 
-       protected void after(ActionInvocation dispatcher, String result) throws 
Exception {
-       }
 }

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/FileUploadInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/FileUploadInterceptor.java?rev=416567&r1=416566&r2=416567&view=diff
==============================================================================
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/FileUploadInterceptor.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/FileUploadInterceptor.java
 Thu Jun 22 21:59:05 2006
@@ -23,6 +23,7 @@
 import com.opensymphony.xwork.ActionInvocation;
 import com.opensymphony.xwork.ActionProxy;
 import com.opensymphony.xwork.ValidationAware;
+import com.opensymphony.xwork.interceptor.AbstractInterceptor;
 import com.opensymphony.xwork.interceptor.Interceptor;
 import com.opensymphony.xwork.util.LocalizedTextUtil;
 import org.apache.commons.logging.Log;
@@ -145,7 +146,7 @@
  * <!-- END SNIPPET: example -->
  *
  */
-public class FileUploadInterceptor implements Interceptor {
+public class FileUploadInterceptor extends AbstractInterceptor {
        
        private static final long serialVersionUID = -4764627478894962478L;
        
@@ -166,12 +167,6 @@
 
     public void setMaximumSize(Long maximumSize) {
         this.maximumSize = maximumSize;
-    }
-
-    public void destroy() {
-    }
-
-    public void init() {
     }
 
     public String intercept(ActionInvocation invocation) throws Exception {

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ScopeInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ScopeInterceptor.java?rev=416567&r1=416566&r2=416567&view=diff
==============================================================================
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ScopeInterceptor.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ScopeInterceptor.java
 Thu Jun 22 21:59:05 2006
@@ -20,7 +20,7 @@
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.ActionInvocation;
 import com.opensymphony.xwork.ActionProxy;
-import com.opensymphony.xwork.interceptor.Interceptor;
+import com.opensymphony.xwork.interceptor.AbstractInterceptor;
 import com.opensymphony.xwork.interceptor.PreResultListener;
 import com.opensymphony.xwork.util.OgnlValueStack;
 import org.apache.struts.action2.dispatcher.SessionMap;
@@ -131,7 +131,7 @@
  * </pre>
  *
  */
-public class ScopeInterceptor implements Interceptor, PreResultListener {
+public class ScopeInterceptor extends AbstractInterceptor implements 
PreResultListener {
 
        private static final long serialVersionUID = 9120762699600054395L;
 
@@ -369,12 +369,6 @@
 
     public void setSessionReset(String sessionReset) {
         this.sessionReset = sessionReset;
-    }
-
-    public void destroy() {
-    }
-
-    public void init() {
     }
 
     public String intercept(ActionInvocation invocation) throws Exception {

Modified: 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ServletConfigInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ServletConfigInterceptor.java?rev=416567&r1=416566&r2=416567&view=diff
==============================================================================
--- 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ServletConfigInterceptor.java
 (original)
+++ 
struts/action2/trunk/core/src/main/java/org/apache/struts/action2/interceptor/ServletConfigInterceptor.java
 Thu Jun 22 21:59:05 2006
@@ -23,7 +23,7 @@
 import org.apache.struts.action2.util.ServletContextAware;
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.ActionInvocation;
-import com.opensymphony.xwork.interceptor.AroundInterceptor;
+import com.opensymphony.xwork.interceptor.AbstractInterceptor;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -103,13 +103,10 @@
  * @see ApplicationAware
  * @see PrincipalAware
  */
-public class ServletConfigInterceptor extends AroundInterceptor implements 
StrutsStatics {
+public class ServletConfigInterceptor extends AbstractInterceptor implements 
StrutsStatics {
        
        private static final long serialVersionUID = 605261777858676638L;
 
-       protected void after(ActionInvocation dispatcher, String result) throws 
Exception {
-    }
-
     /**
      * Sets action properties based on the interfaces an action implements. 
Things like application properties,
      * parameters, session attributes, etc are set based on the implementing 
interface.
@@ -117,7 +114,7 @@
      * @param invocation an encapsulation of the action execution state.
      * @throws Exception if an error occurs when setting action properties.
      */
-    protected void before(ActionInvocation invocation) throws Exception {
+    public String intercept(ActionInvocation invocation) throws Exception {
         final Object action = invocation.getAction();
         final ActionContext context = invocation.getInvocationContext();
 
@@ -155,5 +152,6 @@
             ServletContext servletContext = (ServletContext) 
context.get(SERVLET_CONTEXT);
             ((ServletContextAware) action).setServletContext(servletContext);
         }
+        return invocation.invoke();
     }
 }


Reply via email to