struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r798341 - in /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter: StrutsExecuteFilter.java StrutsPrepareAndExecuteFilter.java StrutsPrepareFilter.java
Date Tue, 28 Jul 2009 00:12:12 GMT
Author: musachy
Date: Tue Jul 28 00:12:12 2009
New Revision: 798341

URL: http://svn.apache.org/viewvc?rev=798341&view=rev
Log:
WW-3196 Add post init hook, and change fields visibility to protected

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsExecuteFilter.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareAndExecuteFilter.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareFilter.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsExecuteFilter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsExecuteFilter.java?rev=798341&r1=798340&r2=798341&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsExecuteFilter.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsExecuteFilter.java
Tue Jul 28 00:12:12 2009
@@ -37,10 +37,10 @@
  * been executed in the current chain.
  */
 public class StrutsExecuteFilter implements StrutsStatics, Filter {
-    private PrepareOperations prepare;
-    private ExecuteOperations execute;
+    protected PrepareOperations prepare;
+    protected ExecuteOperations execute;
 
-    private FilterConfig filterConfig;
+    protected FilterConfig filterConfig;
 
     public void init(FilterConfig filterConfig) throws ServletException {
         this.filterConfig = filterConfig;

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareAndExecuteFilter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareAndExecuteFilter.java?rev=798341&r1=798340&r2=798341&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareAndExecuteFilter.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareAndExecuteFilter.java
Tue Jul 28 00:12:12 2009
@@ -39,8 +39,8 @@
  * when you don't have another filter that needs access to action context information, such
as Sitemesh.
  */
 public class StrutsPrepareAndExecuteFilter implements StrutsStatics, Filter {
-    private PrepareOperations prepare;
-    private ExecuteOperations execute;
+    protected PrepareOperations prepare;
+    protected ExecuteOperations execute;
 	protected List<Pattern> excludedPatterns = null;
 
     public void init(FilterConfig filterConfig) throws ServletException {
@@ -54,12 +54,20 @@
             prepare = new PrepareOperations(filterConfig.getServletContext(), dispatcher);
             execute = new ExecuteOperations(filterConfig.getServletContext(), dispatcher);
 			this.excludedPatterns = init.buildExcludedPatternsList(dispatcher);
+
+            postInit(dispatcher, filterConfig);
         } finally {
             init.cleanup();
         }
 
     }
 
+    /**
+     * Callback for post initialization
+     */
+    protected void postInit(Dispatcher dispatcher, FilterConfig filterConfig) {
+    }
+
     public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws
IOException, ServletException {
 
         HttpServletRequest request = (HttpServletRequest) req;

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareFilter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareFilter.java?rev=798341&r1=798340&r2=798341&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareFilter.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareFilter.java
Tue Jul 28 00:12:12 2009
@@ -39,8 +39,8 @@
 
 	protected static final String REQUEST_EXCLUDED_FROM_ACTION_MAPPING = StrutsPrepareFilter.class.getName()
+ ".REQUEST_EXCLUDED_FROM_ACTION_MAPPING";
 
-    private PrepareOperations prepare;
-	private List<Pattern> excludedPatterns = null;
+    protected PrepareOperations prepare;
+	protected List<Pattern> excludedPatterns = null;
 
 	public void init(FilterConfig filterConfig) throws ServletException {
         InitOperations init = new InitOperations();
@@ -51,10 +51,17 @@
 
             prepare = new PrepareOperations(filterConfig.getServletContext(), dispatcher);
 			this.excludedPatterns = init.buildExcludedPatternsList(dispatcher);
+
+            postInit(dispatcher, filterConfig);
         } finally {
             init.cleanup();
         }
+    }
 
+    /**
+     * Callback for post initialization
+     */
+    protected void postInit(Dispatcher dispatcher, FilterConfig filterConfig) {
     }
 
     public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws
IOException, ServletException {



Mime
View raw message