portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r328211 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
Date Tue, 25 Oct 2005 00:56:05 GMT
Author: taylor
Date: Mon Oct 24 17:56:02 2005
New Revision: 328211

URL: http://svn.apache.org/viewcvs?rev=328211&view=rev
Log:
allow for pipelines to be mapped from the servlet path:
/ajax -> ajax-pipeline
/portal -> jetspeed-pipeline (default)
/portlet -> portlet-pipeline

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java?rev=328211&r1=328210&r2=328211&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
Mon Oct 24 17:56:02 2005
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.text.DateFormat;
 import java.util.Date;
+import java.util.Map;
 import java.util.Properties;
 
 import javax.naming.NamingException;
@@ -69,6 +70,7 @@
     private final ComponentManager componentManager;
     private final Configuration configuration;
     private final String applicationRoot;
+    private Map pipelineMapper ; 
     
     protected static final Log log = LogFactory.getLog(JetspeedEngine.class);
     private static final Log console = LogFactory.getLog(CONSOLE_LOGGER);        
@@ -89,7 +91,7 @@
         
         // Make these availble as beans to Spring
         componentManager.addComponent("Engine", this);
-        componentManager.addComponent("PortalContext", context);
+        componentManager.addComponent("PortalContext", context);        
     }  
     
     
@@ -136,6 +138,8 @@
             
             //Start the ComponentManager
             componentManager.start();               
+            pipelineMapper = (Map)componentManager.getComponent("pipeline-map");
+            
         }
         catch (Throwable e)
         {
@@ -188,12 +192,21 @@
 
     public void service( RequestContext context ) throws JetspeedException
     {
-
+        
             String targetPipeline = context
                     .getRequestParameter(PortalReservedParameters.PIPELINE);
             if (null == targetPipeline)
             {                
-                targetPipeline = (String)context.getAttribute(PortalReservedParameters.PIPELINE);
               
+                targetPipeline = context.getRequest().getServletPath();
+                if (null == targetPipeline)
+                {
+                    targetPipeline = (String)context.getAttribute(PortalReservedParameters.PIPELINE);
+                }
+                else
+                {
+                    targetPipeline = (String)pipelineMapper.get(targetPipeline); 
+                    System.out.println("pipeline = " + targetPipeline);
+                }
             }
             // tlRequestContext.set(context);
             Pipeline pipeline = getPipeline();



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message