beehive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: rev 46078 - in incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow: . interceptor internal
Date Wed, 15 Sep 2004 03:54:25 GMT
Author: rich
Date: Tue Sep 14 20:54:25 2004
New Revision: 46078

Removed:
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/RequestVariables.java
Modified:
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ForwardHandler.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/MultipartRequestUtils.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowConstants.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowController.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowPageFilter.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowStack.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/SharedFlowController.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/ActionInterceptorChain.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/CachedPageFlowInfo.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/ContextCache.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalConstants.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/RequestValues.java
Log:
Changed to make request and session attribute names much smaller.  Combined, they take up
a nontrivial amount of space.

DRT: netui (linux)
BB: self (WinXP)



Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java
Tue Sep 14 20:54:25 2004
@@ -65,6 +65,7 @@
 import org.apache.beehive.netui.util.logging.Logger;
 import org.apache.beehive.netui.pageflow.internal.ContextCache;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
+import org.apache.beehive.netui.pageflow.internal.RequestValues;
 import org.apache.beehive.netui.pageflow.handler.ForwardRedirectHandler;
 
 
@@ -560,7 +561,7 @@
                     StringBuilder sfActionURI = new StringBuilder( sf.getModulePath() );
                     sfActionURI.append( '/' );
                     sfActionURI.append( ServletUtils.getBaseName( uri ) );
-                    RequestVariables.get( request ).setOriginalRequestURI( uri );
+                    RequestValues.setOriginalRequestURI( request, uri );
                     ForwardRedirectHandler frh = ContextCache.get( servletContext ).getForwardRedirectHandler();
                     frh.forward( sfActionURI.toString(), request, response );
                     return;

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java
Tue Sep 14 20:54:25 2004
@@ -23,15 +23,11 @@
 import org.apache.beehive.netui.util.FileUtils;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
 import org.apache.beehive.netui.pageflow.internal.InternalExpressionUtils;
+import org.apache.beehive.netui.pageflow.internal.RequestValues;
 import org.apache.beehive.netui.pageflow.handler.LoginHandler;
 import org.apache.beehive.netui.pageflow.handler.ExceptionsHandler;
 import org.apache.beehive.netui.util.cache.ClassLevelCache;
 import org.apache.beehive.netui.util.logging.Logger;
-import org.apache.beehive.netui.script.common.ImplicitObjectBean;
-import org.apache.beehive.netui.script.common.ImplicitObjectUtil;
-import org.apache.beehive.netui.script.ExpressionEvaluatorFactory;
-import org.apache.beehive.netui.script.ExpressionEvaluator;
-import org.apache.beehive.netui.script.ExpressionEvaluationException;
 import org.apache.struts.Globals;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
@@ -339,7 +335,7 @@
             //
             // If a form was returned from nesting, use that.
             //
-            ActionForm returningForm = ( ActionForm ) request.getAttribute( RETURNING_FORM_ATTR_NAME
);
+            ActionForm returningForm = RequestValues.getReturningForm( request );
             
             if ( returningForm != null )
             {
@@ -349,7 +345,7 @@
                 }
                 
                 form = returningForm;
-                request.removeAttribute( RETURNING_FORM_ATTR_NAME );
+                RequestValues.removeReturningForm( request );
             }
             
             Object unwrappedForm = InternalUtils.unwrapFormBean( form );

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ForwardHandler.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ForwardHandler.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ForwardHandler.java
Tue Sep 14 20:54:25 2004
@@ -30,6 +30,8 @@
 import org.apache.beehive.netui.pageflow.interceptor.InterceptorForward;
 import org.apache.beehive.netui.pageflow.interceptor.ActionInterceptorChain;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
+import org.apache.beehive.netui.pageflow.internal.RequestValues;
+import org.apache.beehive.netui.pageflow.internal.InternalConstants;
 import org.apache.beehive.netui.util.logging.Logger;
 
 
@@ -464,11 +466,11 @@
                 
         if ( retForm != null )
         {
-            request.setAttribute( RETURNING_FORM_ATTR_NAME, retForm );
+            RequestValues.setReturningForm( request, retForm );
         }
                 
         // @TODO 9.0 - delete this deprecated feature (following line)
-        request.setAttribute( RETURNING_FROM_NESTING_ATTR_NAME, Boolean.TRUE );
+        request.setAttribute( InternalConstants.RETURNING_FROM_NESTING_ATTR, Boolean.TRUE
);
         
         //
         // Forward to the rerturn-action on the nestig page flow.

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/MultipartRequestUtils.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/MultipartRequestUtils.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/MultipartRequestUtils.java
Tue Sep 14 20:54:25 2004
@@ -32,6 +32,7 @@
 import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
 import org.apache.beehive.netui.pageflow.scoping.ScopedRequest;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
+import org.apache.beehive.netui.pageflow.internal.InternalConstants;
 
 // external imports
 import org.apache.struts.Globals;
@@ -54,8 +55,7 @@
 {
     private static final Logger _log = Logger.getInstance(MultipartRequestUtils.class);
     
-    private static final String PREHANDLED_MULTIPART_REQUEST_ATTR = MultipartRequestUtils.class.getName()
-                                                                    + "_prehandledMultipart";
+    private static final String PREHANDLED_MULTIPART_REQUEST_ATTR = InternalConstants.ATTR_PREFIX
+ "handledMultipart";
     
     /**
      * <p>

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
Tue Sep 14 20:54:25 2004
@@ -17,6 +17,8 @@
  */
 package org.apache.beehive.netui.pageflow;
 
+import org.apache.beehive.netui.pageflow.internal.InternalConstants;
+
 import javax.servlet.ServletException;
 import javax.servlet.ServletConfig;
 import java.io.Serializable;
@@ -91,7 +93,7 @@
     {
         protected String getGenDir()
         {
-            return PageFlowConstants.WEBINF_DIR;
+            return InternalConstants.WEBINF_DIR;
         }
     }
 

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowConstants.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowConstants.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowConstants.java
Tue Sep 14 20:54:25 2004
@@ -17,6 +17,8 @@
  */
 package org.apache.beehive.netui.pageflow;
 
+import org.apache.beehive.netui.pageflow.internal.InternalConstants;
+
 /**
  * Constants related to Page Flows.
  */ 
@@ -103,22 +105,10 @@
      */ 
     public static final String SECURE_FORWARDS_PARAM = "jpf-secure-forwards";
     
-    static final String INTERNAL_VAR_PREFIX = "_netui:";
-    static final int    ACTION_EXTENSION_LEN = ACTION_EXTENSION.length();
-    static final String GLOBALAPP_MODULE_CONTEXT_PATH = "/-global";
-    static final String GLOBALAPP_MEMBER_NAME = "globalApp";
-    static final String WEBINF_DIR = "/WEB-INF";
-    static final String BEGIN_ACTION_PATH = "/" + BEGIN_ACTION_NAME;
-    static final String RETURNING_FORM_ATTR_NAME = FlowController.class.getName() + "_returningForm";
-    static final String RETURNING_FROM_NESTING_ATTR_NAME = FlowController.class.getName()
+ "_nestedReturning";
-    static final String CURRENT_JPF_ATTR = PageFlowUtils.class.getName() + "_currentPageFlow";
-    static final String CURRENT_SINGLETON_ATTR = PageFlowUtils.class.getName() + "_currentSingletonModule";
-    static final String SHARED_FLOW_ATTR_PREFIX = PageFlowUtils.class.getName() + "_sharedFlow:";
-
     /**
      * The webapp-relative directory for Struts module configuration files generated by the
      * page flow compiler.
      */ 
-    public static final String JPF_MODULE_CONFIG_GEN_DIR = WEBINF_DIR + "/.pageflow-struts-generated";
+    public static final String JPF_MODULE_CONFIG_GEN_DIR = InternalConstants.WEBINF_DIR +
"/.pageflow-struts-generated";
     
 }

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowController.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowController.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowController.java
Tue Sep 14 20:54:25 2004
@@ -34,8 +34,11 @@
 import org.apache.beehive.netui.pageflow.config.PageFlowControllerConfig;
 import org.apache.beehive.netui.pageflow.internal.CachedPageFlowInfo;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
+import org.apache.beehive.netui.pageflow.internal.InternalConstants;
 import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
 
+import static org.apache.beehive.netui.pageflow.internal.InternalConstants.*;
+
 
 /**
  * Base class for user-defined state and controller logic associated with a particular web
@@ -76,7 +79,7 @@
     
     private boolean _isOnNestingStack = false;
     
-    private static final String DELETING_PAGEFLOW_ATTR = PageFlowController.class.getName()
+ "_deleting";
+    private static final String DELETING_PAGEFLOW_ATTR = InternalConstants.ATTR_PREFIX +
"deletingPageFlow";
     private static final String CACHED_INFO_KEY = "cachedInfo";
     private static final Logger _log = Logger.getInstance( PageFlowController.class );
   
@@ -404,7 +407,7 @@
     
     final PreviousPageInfo getPreviousPageInfoLegacy( PageFlowController curJpf, HttpServletRequest
request )
     {
-        if ( request.getAttribute( RETURNING_FROM_NESTING_ATTR_NAME ) != null )
+        if ( request.getAttribute( RETURNING_FROM_NESTING_ATTR ) != null )
         {
             return getCurrentPageInfo();
         }

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowPageFilter.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowPageFilter.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowPageFilter.java
Tue Sep 14 20:54:25 2004
@@ -40,6 +40,7 @@
 import org.apache.beehive.netui.util.ServletUtils;
 import org.apache.beehive.netui.pageflow.internal.JavaControlUtils;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
+import org.apache.beehive.netui.pageflow.internal.InternalConstants;
 
 
 /**
@@ -51,7 +52,7 @@
     
     private static final Logger _log = Logger.getInstance( PageFlowPageFilter.class );
     
-    private static final String PREVENT_CACHE_ATTR = PageFlowPageFilter.class.getName() +
"_preventCache";
+    private static final String PREVENT_CACHE_ATTR = InternalConstants.ATTR_PREFIX + "preventCache";
     
     
     public void init( FilterConfig filterConfig ) throws ServletException

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
Tue Sep 14 20:54:25 2004
@@ -66,6 +66,8 @@
 import org.apache.beehive.netui.pageflow.scoping.ScopedRequest;
 import org.apache.beehive.netui.pageflow.handler.ForwardRedirectHandler;
 
+import static org.apache.beehive.netui.pageflow.internal.InternalConstants.*;
+import static org.apache.beehive.netui.pageflow.PageFlowConstants.*;
 
 /**
  * The Page Flow extension of the Struts RequestProcessor, which contains callbacks that
are invoked
@@ -74,25 +76,24 @@
  */
 public class PageFlowRequestProcessor
         extends RequestProcessor
-        implements Serializable, PageFlowConstants
+        implements Serializable
 {
     private static int requestCount = 0;
 
     private static final Logger _log = Logger.getInstance( PageFlowRequestProcessor.class
);
     
-    private static final String PREFIX = PageFlowRequestProcessor.class.getName() + ':';
     private static final String ACTION_OVERRIDE_PARAM_PREFIX = "actionOverride:";
     private static final int    ACTION_OVERRIDE_PARAM_PREFIX_LEN = ACTION_OVERRIDE_PARAM_PREFIX.length();
     private static final String SCHEME_UNSECURE = "http";
     private static final String SCHEME_SECURE = "https";
-    private static final String REDIRECT_REQUEST_ATTRS_PREFIX = PREFIX + "requestAttrs:";
+    private static final String REDIRECT_REQUEST_ATTRS_PREFIX = ATTR_PREFIX + "requestAttrs:";
     private static final String REDIRECT_REQUEST_ATTRS_PARAM = "forceRedirect";
-    private static final String FORWARDED_BY_BUTTON_OVERRIDE_ATTR = PREFIX + "buttonForward";
-    private static final String PROCESS_POPULATE_ALREADY_CALLED_ATTR = PREFIX + "processPopulateCalled";
-    private static final String ALREADY_GOT_ACTION_ATTR = PREFIX + "prefetchedAction";
-    private static final String MULTIPART_REQUEST_WRAPPER_ATTR = PREFIX + "multipartWrapper";
-    private static final String PAGEFLOW_SCOPED_FORM_NAME_ATTR = PREFIX + "pageFlowScopedFormName";
-    private static final String PROCESS_ROLES_FAILED_ATTR = PREFIX + "processRolesFailed";
+    private static final String FORWARDED_BY_BUTTON_OVERRIDE_ATTR = ATTR_PREFIX + "buttonForward";
+    private static final String PROCESS_POPULATE_ALREADY_CALLED_ATTR = ATTR_PREFIX + "processPopulateCalled";
+    private static final String ALREADY_GOT_ACTION_ATTR = ATTR_PREFIX + "prefetchedAction";
+    private static final String MULTIPART_REQUEST_WRAPPER_ATTR = ATTR_PREFIX + "multipartWrapper";
+    private static final String PAGEFLOW_SCOPED_FORM_NAME_ATTR = ATTR_PREFIX + "pageFlowScopedFormName";
+    private static final String PROCESS_ROLES_FAILED_ATTR = ATTR_PREFIX + "processRolesFailed";
     private static final String FLOW_CONTROLLER_ACTION_CLASSNAME = FlowControllerAction.class.getName();
     
 
@@ -877,7 +878,7 @@
         // Look for a form-specific action path.  This is used when there are two actions
with the same
         // name, but different forms (in nesting).
         //
-        ActionForm returningForm = ( ActionForm ) request.getAttribute( FlowController.RETURNING_FORM_ATTR_NAME
);
+        ActionForm returningForm = RequestValues.getReturningForm( request );
         
         if ( returningForm != null )
         {
@@ -958,7 +959,7 @@
         //
         
         // originalRequestURI is the request URI we had before trying to forward to an action
in Global.app.
-        String originalRequestURI = RequestVariables.get( request ).getOriginalRequestURI();
+        String originalRequestURI = RequestValues.getOriginalRequestURI( request );
         
         if ( originalRequestURI != null )
         {
@@ -990,7 +991,7 @@
             // Save the original request URI, so if the action fails on the shared flow,
too, then we can
             // give an error message that includes *this* URI, not the shared flow URI.
             //
-            RequestVariables.get( request ).setOriginalRequestURI( InternalUtils.decodeURI(
request ) );
+            RequestValues.setOriginalRequestURI( request, InternalUtils.decodeURI( request
) );
             
             //
             // Construct a URI that is [shared flow module path] + [base action path] + [action-extension
(.do)]

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowStack.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowStack.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowStack.java
Tue Sep 14 20:54:25 2004
@@ -23,6 +23,7 @@
 import org.apache.beehive.netui.pageflow.interceptor.ActionInterceptorChain;
 import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
+import org.apache.beehive.netui.pageflow.internal.InternalConstants;
 
 import javax.servlet.http.HttpSessionBindingListener;
 import javax.servlet.http.HttpSessionBindingEvent;
@@ -39,7 +40,7 @@
         implements HttpSessionBindingListener, Serializable
 {
     private static final Logger _log = Logger.getInstance( PageFlowStack.class );
-    private static final String JPF_STACK_ATTR = PageFlowStack.class.getName() + "_stack";
+    private static final String JPF_STACK_ATTR = InternalConstants.ATTR_PREFIX  + "nestingStack";
     
     private Stack _stack = new Stack();
     

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
Tue Sep 14 20:54:25 2004
@@ -44,16 +44,18 @@
 import java.util.Stack;
 import java.util.concurrent.ConcurrentHashMap;
 
+import static org.apache.beehive.netui.pageflow.internal.InternalConstants.*;
+import static org.apache.beehive.netui.pageflow.PageFlowConstants.*;
+
 
 /**
  * Utility methods related to Page Flow.
  */ 
 public class PageFlowUtils
-        implements PageFlowConstants
 {
     private static final Logger _log = Logger.getInstance( PageFlowUtils.class );
 
-    private static final String ACTION_URI_ATTR = PageFlowUtils.class.getName() + "_actionURI";
+    private static final String ACTION_URI_ATTR = ATTR_PREFIX + "_actionURI";
     private static final int    JPF_EXTENSION_LEN = JPF_EXTENSION.length();
     private static final String DEFAULT_AUTORESOLVE_EXTENSIONS[] = new String[]{ ACTION_EXTENSION,
JPF_EXTENSION };
     

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/SharedFlowController.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/SharedFlowController.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/SharedFlowController.java
Tue Sep 14 20:54:25 2004
@@ -26,7 +26,7 @@
 import javax.servlet.ServletContext;
 
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
-import org.apache.beehive.netui.pageflow.internal.InternalConstants;
+import static org.apache.beehive.netui.pageflow.internal.InternalConstants.*;
 
 
 // TODO: javadoc

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/ActionInterceptorChain.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/ActionInterceptorChain.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/ActionInterceptorChain.java
Tue Sep 14 20:54:25 2004
@@ -28,6 +28,9 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.io.Serializable;
 
+import static org.apache.beehive.netui.pageflow.internal.InternalConstants.ATTR_PREFIX;
+import static org.apache.beehive.netui.pageflow.internal.InternalConstants.WEBINF_DIR;
+
 
 /**
  * Class for managing the chain of action interceptors at runtime.
@@ -39,13 +42,13 @@
 {
     private ActionInterceptor[] _actionInterceptors;
     
-    public static final String CONFIG_FILE = "/WEB-INF/pageflow-action-interceptor.xml";
-    private static final String CONFIG_ATTR = ActionInterceptorChain.class.getName() + "_config";
-    private static final String BEFOREACTION_CACHE_ATTR = ActionInterceptorChain.class.getName()
+ "_beforeActionChain";
-    private static final String AFTERACTION_CACHE_ATTR = ActionInterceptorChain.class.getName()
+ "_afterActionChain";
-    private static final String ACTIVE_INTERCEPTOR_ATTR = ActionInterceptorChain.class.getName()
+ "_activeInterceptor";
-    private static final String INTERCEPTED_FWD_ATTR = ActionInterceptorChain.class.getName()
+ "_interceptedForward";
-    private static final String IS_RETURNING_ATTR = ActionInterceptorChain.class.getName()
+ "_returningFromIntercept";
+    public static final String CONFIG_FILE = WEBINF_DIR + "/pageflow-action-interceptor.xml";
+    private static final String CONFIG_ATTR = ATTR_PREFIX + "actionInterceptorConfig";
+    private static final String BEFOREACTION_CACHE_ATTR = ATTR_PREFIX + "beforeActionChain";
+    private static final String AFTERACTION_CACHE_ATTR = ATTR_PREFIX + "afterActionChain";
+    private static final String ACTIVE_INTERCEPTOR_ATTR = ATTR_PREFIX + "activeInterceptor";
+    private static final String INTERCEPTED_FWD_ATTR = ATTR_PREFIX + "interceptedFwd";
+    private static final String IS_RETURNING_ATTR = ATTR_PREFIX + "returningFromIntercept";
     
     private static final Logger _log = Logger.getInstance( ActionInterceptorChain.class );
     private static final ActionInterceptorChain NULL_CHAIN = new NullActionInterceptorChain();

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/CachedPageFlowInfo.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/CachedPageFlowInfo.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/CachedPageFlowInfo.java
Tue Sep 14 20:54:25 2004
@@ -56,7 +56,7 @@
             
             // TODO: auto-upgrade to get rid of legacy "globalApp" field
             if ( field.getAnnotation( Jpf.SharedFlowField.class ) != null
-                 || field.getName().equals( PageFlowConstants.GLOBALAPP_MEMBER_NAME ) )
+                 || field.getName().equals( InternalConstants.GLOBALAPP_MEMBER_NAME ) )
             {
                 _sharedFlowMemberField = field;
                 _sharedFlowMemberField.setAccessible( true );

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/ContextCache.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/ContextCache.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/ContextCache.java
Tue Sep 14 20:54:25 2004
@@ -41,7 +41,7 @@
 {
     private static final Logger _log = Logger.getInstance( ContextCache.class );
     
-    private static final String CACHE_ATTR = ContextCache.class.getName() + "_cache";
+    private static final String CACHE_ATTR = InternalConstants.ATTR_PREFIX + "_cache";
     private static final String DEFAULT_LOGIN_HANDLER_CLASS = DefaultLoginHandler.class.getName();
     private static final String DEFAULT_FWD_REDIRECT_HANDLER_CLASS = DefaultForwardRedirectHandler.class.getName();
     private static final String DEFAULT_RELOADABLE_CLASS_HANDLER_CLASS = DefaultReloadableClassHandler.class.getName();

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalConstants.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalConstants.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalConstants.java
Tue Sep 14 20:54:25 2004
@@ -17,6 +17,9 @@
  */
 package org.apache.beehive.netui.pageflow.internal;
 
+import org.apache.beehive.netui.pageflow.FlowController;
+import org.apache.beehive.netui.pageflow.PageFlowConstants;
+
 public class InternalConstants
 {
     /**
@@ -26,19 +29,30 @@
     public static final String MESSAGE_IS_EXPRESSION_PREFIX = "NETUI-EXPRESSION:";
     public static final int MESSAGE_IS_EXPRESSION_PREFIX_LENGTH = MESSAGE_IS_EXPRESSION_PREFIX.length();
     
-    public static final String FACES_BACKING_ATTR = InternalUtils.class.getName() + "_facesBacking";
-    public static final String BACKING_CLASS_IMPLICIT_OBJECT = "backing";
-    public static final String PAGE_FLOW_IMPLICIT_OBJECT = "pageFlow";
-    public static final String SHARED_FLOW_IMPLICIT_OBJECT = "sharedFlow";
-    public static final String PAGE_INPUT_IMPLICIT_OBJECT = "pageInput";
+    public static final String ATTR_PREFIX = "_netui:";
     
+    public static final String FACES_BACKING_ATTR = ATTR_PREFIX + "facesBacking";
+    public static final String BACKING_CLASS_IMPLICIT_OBJECT = "backing";
+
     public static final String SHARED_FLOW_MODULE_PREFIX = "/-";
     public static final String SHARED_FLOW_ROOT_MODULE = "/-webappRoot";
     
-    public static final String ATTR_PREFIX = "_netui:";
-    
     public static final String FACES_EXTENSION = "faces";
     public static final String JSF_EXTENSION = "jsf";
     public static final String FACES_EXTENSION_DOT = '.' + FACES_EXTENSION;
     public static final String JSF_EXTENSION_DOT = '.' + JSF_EXTENSION;
+    
+    public static final String INTERNAL_VAR_PREFIX = "_netui:";
+    public static final int    ACTION_EXTENSION_LEN = PageFlowConstants.ACTION_EXTENSION.length();
+    public static final String GLOBALAPP_MODULE_CONTEXT_PATH = "/-global";
+    public static final String GLOBALAPP_MEMBER_NAME = "globalApp";
+    public static final String WEBINF_DIR = "/WEB-INF";
+    public static final String BEGIN_ACTION_PATH = "/" + PageFlowConstants.BEGIN_ACTION_NAME;
+    public static final String RETURNING_FORM_ATTR = ATTR_PREFIX + "returningForm";
+    public static final String RETURNING_FROM_NESTING_ATTR = ATTR_PREFIX + "nestedReturning";
+    public static final String CURRENT_JPF_ATTR = ATTR_PREFIX + "curPageFlow";
+    public static final String CURRENT_SINGLETON_ATTR = ATTR_PREFIX + "curSingletonModule";
+    public static final String SHARED_FLOW_ATTR_PREFIX = ATTR_PREFIX + "sharedFlow:";
+
+    
 }

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/RequestValues.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/RequestValues.java
(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/RequestValues.java
Tue Sep 14 20:54:25 2004
@@ -17,17 +17,22 @@
  */
 package org.apache.beehive.netui.pageflow.internal;
 
+import org.apache.struts.action.ActionForm;
+
 import javax.servlet.http.HttpServletRequest;
 
+import static org.apache.beehive.netui.pageflow.internal.InternalConstants.ATTR_PREFIX;
+
 
 /**
  * Methods for setting/getting page flow-related values in the request.
  */
 public class RequestValues
 {
-    private static final String PREFIX = "_netui:";
-    private static final String FORWARDED_REQUEST_COUNT_ATTR = PREFIX + "forwardedRequestCount";
-    private static final String AVOID_DIRECT_RESPONSE_OUTPUT_ATTR = PREFIX + "_avoidDirectResponseOutput";
+    private static final String FORWARDED_REQUEST_COUNT_ATTR = ATTR_PREFIX + "forwardedRequestCount";
+    private static final String AVOID_DIRECT_RESPONSE_OUTPUT_ATTR = ATTR_PREFIX + "_avoidDirectResponseOutput";
+    private static final String ORIGINAL_REQUEST_URI_ATTR = ATTR_PREFIX + "origRequestURI";
+    private static final String RETURNING_FORM_ATTR = ATTR_PREFIX + "returningForm";
     
     
     public static boolean isForwardedRequest( HttpServletRequest request )
@@ -63,5 +68,30 @@
     public static void setAvoidDirectResponseOutput( HttpServletRequest request )
     {
         request.setAttribute( AVOID_DIRECT_RESPONSE_OUTPUT_ATTR, Boolean.TRUE );
+    }
+    
+    public static void setOriginalRequestURI( HttpServletRequest request, String uri )
+    {
+        request.setAttribute( ORIGINAL_REQUEST_URI_ATTR, uri );
+    }
+    
+    public static String getOriginalRequestURI( HttpServletRequest request )
+    {
+        return ( String ) request.getAttribute( ORIGINAL_REQUEST_URI_ATTR );
+    }
+    
+    public static void setReturningForm( HttpServletRequest request, ActionForm form )
+    {
+        request.setAttribute( RETURNING_FORM_ATTR, form );
+    }
+    
+    public static ActionForm getReturningForm( HttpServletRequest request )
+    {
+        return ( ActionForm ) request.getAttribute( RETURNING_FORM_ATTR );
+    }
+    
+    public static void removeReturningForm( HttpServletRequest request )
+    {
+        request.removeAttribute( RETURNING_FORM_ATTR );
     }
 }

Mime
View raw message