struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnenn...@apache.org
Subject [1/4] struts git commit: Make it easier to extend to use own ActionInvocation
Date Mon, 12 Oct 2015 10:55:42 GMT
Repository: struts
Updated Branches:
  refs/heads/master 41dd070ed -> da6b03a0a


Make it easier to extend to use own ActionInvocation

I needed to extend DefaultActionProxyFactory to return my own ActionInvocation, but I had
to override all of createActionProxy() to do so.  Seems like a safe change to break out the
ActionInvocation creation to make it easier to just override that piece.

Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/79a2022b
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/79a2022b
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/79a2022b

Branch: refs/heads/master
Commit: 79a2022b55e48fb65e23f5be8d775c8006ce83e8
Parents: 41dd070
Author: Jasper <jasper_rosenberg@yahoo.com>
Authored: Fri Oct 9 07:34:31 2015 -0400
Committer: Jasper <jasper_rosenberg@yahoo.com>
Committed: Fri Oct 9 07:34:31 2015 -0400

----------------------------------------------------------------------
 .../com/opensymphony/xwork2/DefaultActionProxyFactory.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/79a2022b/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java b/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java
index 5c7db7a..a66774b 100644
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java
+++ b/core/src/main/java/com/opensymphony/xwork2/DefaultActionProxyFactory.java
@@ -53,11 +53,15 @@ public class DefaultActionProxyFactory implements ActionProxyFactory {
 
     public ActionProxy createActionProxy(String namespace, String actionName, String methodName,
Map<String, Object> extraContext, boolean executeResult, boolean cleanupContext) {
         
-        ActionInvocation inv = new DefaultActionInvocation(extraContext, true);
+        ActionInvocation inv = createActionInvocation(extraContext, true);
         container.inject(inv);
         return createActionProxy(inv, namespace, actionName, methodName, executeResult, cleanupContext);
     }
     
+    protected ActionInvocation createActionInvocation(Map<String, Object> extraContext,
boolean pushAction) {
+        return DefaultActionInvocation(extraContext, pushAction);
+    }
+    
     public ActionProxy createActionProxy(ActionInvocation inv, String namespace, String actionName,
boolean executeResult, boolean cleanupContext) {
         
         return createActionProxy(inv, namespace, actionName, null, executeResult, cleanupContext);


Mime
View raw message