portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r389983 - in /portals/jetspeed-2/trunk: components/portal/src/java/org/apache/jetspeed/engine/ components/portal/src/java/org/apache/jetspeed/login/ components/portal/src/java/org/apache/jetspeed/pipeline/ components/portal/src/java/org/apa...
Date Thu, 30 Mar 2006 03:54:17 GMT
Author: taylor
Date: Wed Mar 29 19:54:15 2006
New Revision: 389983

URL: http://svn.apache.org/viewcvs?rev=389983&view=rev
Log:
move Pipeline, Valve, ValveContext to API
support login/logout in desktop

Added:
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/Pipeline.java
      - copied, changed from r389682, portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/pipeline/Pipeline.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/PipelineException.java
      - copied unchanged from r389682, portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/pipeline/PipelineException.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/Valve.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/ValveContext.java
Removed:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/pipeline/Pipeline.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/pipeline/PipelineException.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/pipeline/valve/Valve.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/pipeline/valve/ValveContext.java
Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/LogoutServlet.java
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/request/JetspeedRequestContext.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
    portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.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=389983&r1=389982&r2=389983&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
Wed Mar 29 19:54:15 2006
@@ -210,6 +210,7 @@
         else
             pipeline = getPipeline();
         
+        context.setPipeline(pipeline);
         pipeline.invoke(context);
    
         long end = System.currentTimeMillis();

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/LogoutServlet.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/LogoutServlet.java?rev=389983&r1=389982&r2=389983&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/LogoutServlet.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/LogoutServlet.java
Wed Mar 29 19:54:15 2006
@@ -34,7 +34,12 @@
     public void doGet(HttpServletRequest request,
             HttpServletResponse response) throws IOException, ServletException
     {
+        String destination = request.getParameter(LoginConstants.DESTINATION);
         request.getSession(true).invalidate();
-        response.sendRedirect(response.encodeURL(request.getContextPath()));
+        if (destination == null)
+        {
+            destination = request.getContextPath(); 
+        }
+        response.sendRedirect(response.encodeURL(destination));
     }
 }

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/request/JetspeedRequestContext.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/request/JetspeedRequestContext.java?rev=389983&r1=389982&r2=389983&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/request/JetspeedRequestContext.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/request/JetspeedRequestContext.java
Wed Mar 29 19:54:15 2006
@@ -38,6 +38,7 @@
 import org.apache.jetspeed.om.common.MutableLanguage;
 import org.apache.jetspeed.om.impl.LanguageImpl;
 import org.apache.jetspeed.om.page.ContentPage;
+import org.apache.jetspeed.pipeline.Pipeline;
 import org.apache.jetspeed.userinfo.UserInfoManager;
 import org.apache.pluto.om.common.Language;
 import org.apache.pluto.om.common.LanguageSet;
@@ -66,6 +67,7 @@
     private Subject subject;
     private Locale locale;
     private ContentDispatcher dispatcher;
+    private Pipeline pipeline;
 
     private CapabilityMap capabilityMap;
     private String mimeType;
@@ -576,7 +578,26 @@
     {
         setSessionAttribute(ACTION_ERROR_ATTR + window.getId(),
                 actionFailure);
-
+    }
+    
+    /**
+     * Get the current executing pipeline
+     * 
+     * @return Pipeline
+     */
+    public Pipeline getPipeline()
+    {
+        return pipeline;
+    }
+    
+    
+    /**
+     * Set the current pipeline
+     * @param pipeline
+     */
+    public void setPipeline(Pipeline pipeline)
+    {
+        this.pipeline = pipeline;
     }
     
 

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java?rev=389983&r1=389982&r2=389983&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/mockobjects/request/MockRequestContext.java
Wed Mar 29 19:54:15 2006
@@ -30,6 +30,7 @@
 import org.apache.jetspeed.container.url.PortalURL;
 import org.apache.jetspeed.mockobjects.MockHttpServletRequest;
 import org.apache.jetspeed.om.page.ContentPage;
+import org.apache.jetspeed.pipeline.Pipeline;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.pluto.om.common.Language;
 import org.apache.pluto.om.common.ObjectID;
@@ -60,6 +61,8 @@
     private HttpServletRequest request;
     private HttpServletResponse response;
     private Object session;
+    private Pipeline pipeline;
+    
     /* (non-Javadoc)
      * @see org.apache.jetspeed.request.RequestContext#getUserInfoMap(org.apache.pluto.om.common.ObjectID)
      */
@@ -503,4 +506,25 @@
         // TODO Auto-generated method stub
         
     }
+
+    /**
+     * Get the current executing pipeline
+     * 
+     * @return Pipeline
+     */
+    public Pipeline getPipeline()
+    {
+        return pipeline;
+    }
+    
+    
+    /**
+     * Set the current pipeline
+     * @param pipeline
+     */
+    public void setPipeline(Pipeline pipeline)
+    {
+        this.pipeline = pipeline;
+    }
+    
 }

Copied: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/Pipeline.java
(from r389682, portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/pipeline/Pipeline.java)
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/Pipeline.java?p2=portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/Pipeline.java&p1=portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/pipeline/Pipeline.java&r1=389682&r2=389983&rev=389983&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/pipeline/Pipeline.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/Pipeline.java
Wed Mar 29 19:54:15 2006
@@ -21,8 +21,7 @@
 import org.apache.jetspeed.request.RequestContext;
 
 /**
- *
- * NOTE: This class will be deprecated once we merge with Summit
+ * Jetspeed Pipeline
  *
  * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
  * @version $Id$
@@ -74,5 +73,12 @@
      * @param valve Valve to be removed.
      */
     void removeValve(Valve valve);
+    
+    /**
+     * Get the name of the pipeine
+     * 
+     * @return name of the pipeline
+     */
+    String getName();
 
 }

Added: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/Valve.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/Valve.java?rev=389983&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/Valve.java
(added)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/Valve.java
Wed Mar 29 19:54:15 2006
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.pipeline.valve;
+
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.jetspeed.pipeline.PipelineException;
+
+/**
+ * NOTE: This class will be deprecated once we merge with Summit
+ *
+ * General valve interface.  The actual valve interface(s) should be 
+ * extended by the implementing class.
+ *
+ * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
+ * @version $Id: Valve.java 186726 2004-06-05 05:13:09Z taylor $
+ *
+ * @see org.apache.jetspeed.pipeline.JetspeedPipeline
+ * @see org.apache.jetspeed.pipeline.Pipeline
+ */
+public interface Valve
+{
+    public void invoke(RequestContext request, ValveContext context)
+        throws PipelineException;
+
+    /**
+     * Initialize the valve before using in a pipeline.
+     */
+    public void initialize()
+        throws PipelineException;
+
+}
\ No newline at end of file

Added: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/ValveContext.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/ValveContext.java?rev=389983&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/ValveContext.java
(added)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/pipeline/valve/ValveContext.java
Wed Mar 29 19:54:15 2006
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jetspeed.pipeline.valve;
+
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.jetspeed.pipeline.PipelineException;
+
+/**
+ * NOTE: This class will be deprecated once we merge with Summit
+ *
+ *
+ * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
+ * @version $Id: ValveContext.java 186726 2004-06-05 05:13:09Z taylor $
+ */
+public interface ValveContext
+{
+    /**
+     * <p>Cause the <code>invoke()</code> method of the next Valve
+     * that is part of the Pipeline currently being processed (if any)
+     * to be executed, passing on the specified request and response
+     * objects plus this <code>ValveContext</code> instance.
+     * Exceptions thrown by a subsequently executed Valve will be
+     * passed on to our caller.</p>
+     *
+     * <p>If there are no more Valves to be executed, execution of
+     * this method will result in a no op.</p>
+     *
+     * @param data The run-time information, including the servlet
+     * request and response we are processing.
+     *
+     * @exception IOException Thrown by a subsequent Valve.
+     * @exception SummitException Thrown by a subsequent Valve.
+     * @exception SummitException No further Valves configured in the
+     * Pipeline currently being processed.
+     */
+    public void invokeNext(RequestContext request)
+        throws PipelineException;
+}

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.java?rev=389983&r1=389982&r2=389983&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.java
(original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/request/RequestContext.java
Wed Mar 29 19:54:15 2006
@@ -29,6 +29,7 @@
 import org.apache.jetspeed.capabilities.CapabilityMap;
 import org.apache.jetspeed.container.url.PortalURL;
 import org.apache.jetspeed.om.page.ContentPage;
+import org.apache.jetspeed.pipeline.Pipeline;
 import org.apache.pluto.om.common.Language;
 import org.apache.pluto.om.common.ObjectID;
 import org.apache.pluto.om.portlet.PortletDefinition;
@@ -389,5 +390,18 @@
      */
     void setActionFailure(PortletWindow window, Throwable actionFailure);
         
+    /**
+     * Get the current executing pipeline
+     * 
+     * @return Pipeline
+     */
+    Pipeline getPipeline();
+    
+    /**
+     * Set the current pipeline
+     * @param pipeline
+     */
+    void setPipeline(Pipeline pipeline);
+    
 }
 



---------------------------------------------------------------------
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