portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r759947 - /portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
Date Mon, 30 Mar 2009 12:44:35 GMT
Author: woonsan
Date: Mon Mar 30 12:44:34 2009
New Revision: 759947

URL: http://svn.apache.org/viewvc?rev=759947&view=rev
Log:
PLUTO-543: PortletRequestImpl needs to decide its contextPath on demand.
Moves the decision logic to the getter method.

Modified:
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java?rev=759947&r1=759946&r2=759947&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
(original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
Mon Mar 30 12:44:34 2009
@@ -100,16 +100,15 @@
     
     private Profile ccppProfile = null;
     
-    private final String lifecyclePhase;
+    private String contextPath;
     
-    private final String contextPath;
+    private final String lifecyclePhase;
     
     public PortletRequestImpl(PortletRequestContext requestContext, PortletResponseContext
responseContext, String lifecyclePhase) 
     {
         this.requestContext = requestContext;
         this.responseContext = responseContext;
         this.lifecyclePhase = lifecyclePhase;
-        this.contextPath = requestContext.getPortletWindow().getPortletEntity().getPortletDefinition().getApplication().getContextPath();
         this.portalContext = getPortletContainer().getRequiredContainerServices().getPortalContext();
     }
     
@@ -317,6 +316,11 @@
 
     public String getContextPath() 
     {
+        if (contextPath == null)
+        {
+            contextPath = requestContext.getPortletWindow().getPortletEntity().getPortletDefinition().getApplication().getContextPath();
+        }
+
         return contextPath;
     }
 



Mime
View raw message