portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r758987 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/ components/jetspeed-portal/src/main/java/org/apache...
Date Fri, 27 Mar 2009 02:31:04 GMT
Author: ate
Date: Fri Mar 27 02:31:03 2009
New Revision: 758987

URL: http://svn.apache.org/viewvc?rev=758987&view=rev
Log:
Improving and further implementing PortletContent handling

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletContentImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletContent.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java?rev=758987&r1=758986&r2=758987&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/TestContentCache.java
Fri Mar 27 02:31:03 2009
@@ -360,6 +360,34 @@
         {
             this.title = title;
         }
+
+
+        public String getContentType()
+        {
+            // TODO Auto-generated method stub
+            return null;
+        }
+
+
+        public void reset()
+        {
+            // TODO Auto-generated method stub
+            
+        }
+
+
+        public void resetBuffer()
+        {
+            // TODO Auto-generated method stub
+            
+        }
+
+
+        public void setContentType(String contentType)
+        {
+            // TODO Auto-generated method stub
+            
+        }
     }
         
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletContentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletContentImpl.java?rev=758987&r1=758986&r2=758987&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletContentImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletContentImpl.java
Fri Mar 27 02:31:03 2009
@@ -32,6 +32,7 @@
     private ContentCacheKey cacheKey;
     private int expiration = 0;
     private String title;
+    private String contentType;
     private PortletRenderer renderer = null;
     
     PortletContentImpl()
@@ -152,5 +153,32 @@
     {
         this.title = title;
     }
-        
+    
+    public String getContentType()
+    {
+        return contentType;
+    }
+    
+    public void setContentType(String contentType)
+    {
+        this.contentType = contentType;
+    }
+     
+    public void reset()
+    {
+        if (!complete)
+        {
+            resetBuffer();
+            // TODO: clear headers
+        }
+    }
+    
+    public void resetBuffer()
+    {
+        if (!complete)
+        {
+            writer.flush();
+            cw.reset();
+        }
+    }
 }
\ No newline at end of file

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java?rev=758987&r1=758986&r2=758987&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/RenderingJobImpl.java
Fri Mar 27 02:31:03 2009
@@ -185,7 +185,6 @@
         {
             if (log.isDebugEnabled()) log.debug("Rendering OID "+this.window.getId()+" "+
this.request +" "+this.response);
             container.doRender(this.window, this.request, this.response);               
-            this.response.flushBuffer();                           
         }
         catch (Throwable t)
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java?rev=758987&r1=758986&r2=758987&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
Fri Mar 27 02:31:03 2009
@@ -96,7 +96,7 @@
     {
         if (!isClosed())
         {
-            // TODO
+            portletContent.reset();
         }
     }
 
@@ -104,7 +104,7 @@
     {
         if (!isClosed())
         {
-            // TODO
+            portletContent.resetBuffer();
         }
     }
 
@@ -117,7 +117,7 @@
     {
         if (!isClosed())
         {
-            // TODO
+            portletContent.setContentType(contentType);
         }
     }
 

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletContent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletContent.java?rev=758987&r1=758986&r2=758987&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletContent.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletContent.java
Fri Mar 27 02:31:03 2009
@@ -90,9 +90,15 @@
      */
     void setTitle(String title);
     
+    String getContentType();
+    void setContentType(String contentType);
+    
+    void reset();
+    void resetBuffer();
+    
     /**
      * Release the buffers used by the portlet content cache. Note the actual release may
not occur until garbage collection. 
      *
      */
-    void release();                
+    void release();                    
 }
\ No newline at end of file



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