[jboss-svn-commits] JBoss Portal SVN: r5418 - in trunk: core/src/main/org/jboss/portal/core/aspects/controller core/src/main/org/jboss/portal/core/controller core/src/main/org/jboss/portal/core/controller/command core/src/main/org/jboss/portal/core/controller/command/response portlet/src/main/org/jboss/portal/portlet/invocation/response/cache

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Oct 11 11:07:41 EDT 2006


Author: julien at jboss.com
Date: 2006-10-11 11:07:29 -0400 (Wed, 11 Oct 2006)
New Revision: 5418

Added:
   trunk/core/src/main/org/jboss/portal/core/controller/command/response/PortletResponse.java
Removed:
   trunk/core/src/main/org/jboss/portal/core/controller/command/response/PortletInvocationResponse.java
Modified:
   trunk/core/src/main/org/jboss/portal/core/aspects/controller/WindowCacheInterceptor.java
   trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java
   trunk/core/src/main/org/jboss/portal/core/controller/command/InvokeWindowActionCommand.java
   trunk/core/src/main/org/jboss/portal/core/controller/command/RenderPageCommand.java
   trunk/core/src/main/org/jboss/portal/core/controller/command/RenderWindowCommand.java
   trunk/portlet/src/main/org/jboss/portal/portlet/invocation/response/cache/SoftTimedContent.java
Log:
rename PortletInvocationResponse to PortletResponse in the core to avoid confusion with the PortletInvocationResponse in the portlet container, also that name is more appropriate

Modified: trunk/core/src/main/org/jboss/portal/core/aspects/controller/WindowCacheInterceptor.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/aspects/controller/WindowCacheInterceptor.java	2006-10-11 14:57:28 UTC (rev 5417)
+++ trunk/core/src/main/org/jboss/portal/core/aspects/controller/WindowCacheInterceptor.java	2006-10-11 15:07:29 UTC (rev 5418)
@@ -84,7 +84,7 @@
                cmd.invokeNext();
 
                // Get result
-               PortletInvocationResponse response = ((org.jboss.portal.core.controller.command.response.PortletInvocationResponse)rwc.getResponse()).getResult();
+               PortletInvocationResponse response = ((org.jboss.portal.core.controller.command.response.PortletResponse)rwc.getResponse()).getResult();
 
                // Try to cache any fragment result
                if (response instanceof FragmentResponse)
@@ -113,7 +113,7 @@
             else
             {
                // Use the cached fragment
-               rwc.setResponse(new org.jboss.portal.core.controller.command.response.PortletInvocationResponse(rwc.getTargetId(), fragment));
+               rwc.setResponse(new org.jboss.portal.core.controller.command.response.PortletResponse(rwc.getTargetId(), fragment));
             }
          }
          else if (cmd instanceof InvokeWindowCommand)

Modified: trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java	2006-10-11 14:57:28 UTC (rev 5417)
+++ trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java	2006-10-11 15:07:29 UTC (rev 5418)
@@ -29,6 +29,7 @@
 import org.jboss.portal.core.controller.command.response.StreamContentResponse;
 import org.jboss.portal.core.controller.command.response.UpdateViewResponse;
 import org.jboss.portal.core.controller.command.response.UpdateWindowMarkupResponse;
+import org.jboss.portal.core.controller.command.response.PortletResponse;
 import org.jboss.portal.core.controller.command.info.CommandInfo;
 import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
 import org.jboss.portal.core.controller.command.mapper.CommandFactory;
@@ -51,6 +52,7 @@
 import org.jboss.portal.portlet.invocation.response.InsufficientTransportGuaranteeResponse;
 import org.jboss.portal.portlet.invocation.response.InsufficientPrivilegesResponse;
 import org.jboss.portal.portlet.invocation.response.ErrorResponse;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
 import org.jboss.portal.portlet.StateString;
 import org.jboss.portal.WindowState;
 import org.jboss.portal.Mode;
@@ -181,7 +183,7 @@
       {
          while (true)
          {
-            Forward forward = null;
+            Forward forward;
 
             //
             try
@@ -274,43 +276,43 @@
          rendition.render(invocation);
          return null;
       }
-      else if (response instanceof org.jboss.portal.core.controller.command.response.PortletInvocationResponse)
+      else if (response instanceof org.jboss.portal.core.controller.command.response.PortletResponse)
       {
-         org.jboss.portal.core.controller.command.response.PortletInvocationResponse pir = (org.jboss.portal.core.controller.command.response.PortletInvocationResponse)response;
-         org.jboss.portal.portlet.invocation.response.PortletInvocationResponse pir2 = pir.getResult();
-         if (pir2 instanceof RenderResponse)
+         PortletResponse pr = (PortletResponse)response;
+         PortletInvocationResponse pir = pr.getResult();
+         if (pir instanceof RenderResponse)
          {
-            RenderResponse renderResult = (RenderResponse)pir2;
+            RenderResponse renderResult = (RenderResponse)pir;
             StateString portletNavState = renderResult.getNavigationalState();
             WindowState windowState = renderResult.getWindowState();
             Mode mode = renderResult.getMode();
             InvokeWindowRenderCommand iwrc = new InvokeWindowRenderCommand(
-               pir.getWindowId(),
+               pr.getWindowId(),
                mode,
                windowState,
                portletNavState);
             return new Forward(iwrc, null);
          }
-         else if (pir2 instanceof HTTPRedirectionResponse)
+         else if (pir instanceof HTTPRedirectionResponse)
          {
-            HTTPRedirectionResponse redirectionResult = (HTTPRedirectionResponse)pir2;
+            HTTPRedirectionResponse redirectionResult = (HTTPRedirectionResponse)pir;
             String url = redirectionResult.getLocation();
             sendRedirect(invocation, url);
             return null;
          }
-         else if (pir2 instanceof InsufficientTransportGuaranteeResponse)
+         else if (pir instanceof InsufficientTransportGuaranteeResponse)
          {
             boolean authenticated = invocation.getServerContext().getURLContext().isAuthenticated();
             return new Forward(cmd, URLContext.newInstance(true, authenticated));
          }
-         else if (pir2 instanceof InsufficientPrivilegesResponse)
+         else if (pir instanceof InsufficientPrivilegesResponse)
          {
             boolean authenticated = invocation.getServerContext().getURLContext().isAuthenticated();
             return new Forward(cmd, URLContext.newInstance(true, authenticated));
          }
-         else if (pir2 instanceof SignOutResponse)
+         else if (pir instanceof SignOutResponse)
          {
-            SignOutResponse signOut = (SignOutResponse)pir2;
+            SignOutResponse signOut = (SignOutResponse)pir;
 
             // Indicate that we want a sign out to be done
             invocation.getResponse().setWantSignOut(true);
@@ -335,9 +337,9 @@
                return null;
             }
          }
-         else if (pir2 instanceof ErrorResponse)
+         else if (pir instanceof ErrorResponse)
          {
-            ErrorResponse error = (ErrorResponse)pir2;
+            ErrorResponse error = (ErrorResponse)pir;
             error.logErrorTo(log, "An portlet exception occured in portlet");
             sendStatusCode(invocation, HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
             return null;

Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/InvokeWindowActionCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/InvokeWindowActionCommand.java	2006-10-11 14:57:28 UTC (rev 5417)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/InvokeWindowActionCommand.java	2006-10-11 15:07:29 UTC (rev 5418)
@@ -25,7 +25,7 @@
 import org.jboss.portal.Mode;
 import org.jboss.portal.WindowState;
 import org.jboss.portal.core.controller.portlet.ControllerActionContext;
-import org.jboss.portal.core.controller.command.response.PortletInvocationResponse;
+import org.jboss.portal.core.controller.command.response.PortletResponse;
 import org.jboss.portal.core.controller.command.info.CommandInfo;
 import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
 import org.jboss.portal.core.controller.ControllerException;
@@ -118,7 +118,7 @@
          instance.invoke(invocation);
 
          //
-         return new PortletInvocationResponse(targetId, invocation.getResponse());
+         return new PortletResponse(targetId, invocation.getResponse());
       }
       catch (PortletInvokerException e)
       {

Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/RenderPageCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/RenderPageCommand.java	2006-10-11 14:57:28 UTC (rev 5417)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/RenderPageCommand.java	2006-10-11 15:07:29 UTC (rev 5418)
@@ -38,6 +38,7 @@
 import org.jboss.portal.core.controller.ResourceAccessDeniedException;
 import org.jboss.portal.core.controller.command.info.CommandInfo;
 import org.jboss.portal.core.controller.command.info.ViewCommandInfo;
+import org.jboss.portal.core.controller.command.response.PortletResponse;
 import org.jboss.portal.server.config.ServerConfig;
 import org.jboss.portal.server.ServerInvocation;
 import org.jboss.portal.server.ServerInvocationContext;
@@ -69,6 +70,7 @@
 import org.jboss.portal.portlet.invocation.response.ErrorResponse;
 import org.jboss.portal.portlet.invocation.response.UnavailableResponse;
 import org.jboss.portal.portlet.invocation.response.InsufficientPrivilegesResponse;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
 import org.jboss.portal.WindowState;
 import org.jboss.portal.Mode;
 
@@ -395,10 +397,10 @@
          context.execute(renderCmd);
 
          //
-         org.jboss.portal.core.controller.command.response.PortletInvocationResponse response = (org.jboss.portal.core.controller.command.response.PortletInvocationResponse)renderCmd.getResponse();
+         PortletResponse pr = (PortletResponse)renderCmd.getResponse();
 
          //
-         org.jboss.portal.portlet.invocation.response.PortletInvocationResponse pir = response.getResult();
+         PortletInvocationResponse pir = pr.getResult();
 
          //
          if (pir instanceof InsufficientTransportGuaranteeResponse)

Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/RenderWindowCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/RenderWindowCommand.java	2006-10-11 14:57:28 UTC (rev 5417)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/RenderWindowCommand.java	2006-10-11 15:07:29 UTC (rev 5418)
@@ -24,7 +24,7 @@
 import org.jboss.portal.core.controller.portlet.ControllerRenderContext;
 import org.jboss.portal.core.controller.command.info.CommandInfo;
 import org.jboss.portal.core.controller.command.info.ViewCommandInfo;
-import org.jboss.portal.core.controller.command.response.PortletInvocationResponse;
+import org.jboss.portal.core.controller.command.response.PortletResponse;
 import org.jboss.portal.core.controller.ControllerException;
 import org.jboss.portal.core.controller.ControllerCommand;
 import org.jboss.portal.core.controller.ControllerContext;
@@ -93,7 +93,7 @@
          instance.invoke(invocation);
 
          //
-         return new PortletInvocationResponse(targetId, invocation.getResponse());
+         return new PortletResponse(targetId, invocation.getResponse());
       }
       catch (PortletInvokerException e)
       {

Deleted: trunk/core/src/main/org/jboss/portal/core/controller/command/response/PortletInvocationResponse.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/response/PortletInvocationResponse.java	2006-10-11 14:57:28 UTC (rev 5417)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/response/PortletInvocationResponse.java	2006-10-11 15:07:29 UTC (rev 5418)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.portal.core.controller.command.response;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class PortletInvocationResponse
-{
-
-   /** . */
-   private String windowId;
-
-   /** . */
-   private org.jboss.portal.portlet.invocation.response.PortletInvocationResponse response;
-
-   public PortletInvocationResponse(String windowId, org.jboss.portal.portlet.invocation.response.PortletInvocationResponse response)
-   {
-      if (windowId == null)
-      {
-         throw new IllegalArgumentException();
-      }
-      if (response == null)
-      {
-         throw new IllegalArgumentException();
-      }
-      this.windowId = windowId;
-      this.response = response;
-   }
-
-   public String getWindowId()
-   {
-      return windowId;
-   }
-
-   public org.jboss.portal.portlet.invocation.response.PortletInvocationResponse getResult()
-   {
-      return response;
-   }
-}

Copied: trunk/core/src/main/org/jboss/portal/core/controller/command/response/PortletResponse.java (from rev 5417, trunk/core/src/main/org/jboss/portal/core/controller/command/response/PortletInvocationResponse.java)
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/response/PortletInvocationResponse.java	2006-10-11 14:57:28 UTC (rev 5417)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/response/PortletResponse.java	2006-10-11 15:07:29 UTC (rev 5418)
@@ -0,0 +1,62 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.portal.core.controller.command.response;
+
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletResponse
+{
+
+   /** . */
+   private String windowId;
+
+   /** . */
+   private PortletInvocationResponse response;
+
+   public PortletResponse(String windowId, PortletInvocationResponse response)
+   {
+      if (windowId == null)
+      {
+         throw new IllegalArgumentException();
+      }
+      if (response == null)
+      {
+         throw new IllegalArgumentException();
+      }
+      this.windowId = windowId;
+      this.response = response;
+   }
+
+   public String getWindowId()
+   {
+      return windowId;
+   }
+
+   public PortletInvocationResponse getResult()
+   {
+      return response;
+   }
+}

Modified: trunk/portlet/src/main/org/jboss/portal/portlet/invocation/response/cache/SoftTimedContent.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/invocation/response/cache/SoftTimedContent.java	2006-10-11 14:57:28 UTC (rev 5417)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/invocation/response/cache/SoftTimedContent.java	2006-10-11 15:07:29 UTC (rev 5418)
@@ -29,13 +29,14 @@
  * Use soft reference.
  *
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision$
+ * @version $Revision:5417 $
  */
 public class SoftTimedContent extends TimedContent
 {
 
    /** The serialVersionUID */
    private static final long serialVersionUID = -8166044526732362286L;
+   
    /** The content. */
    private transient WeakReference content;
 




More information about the jboss-svn-commits mailing list