portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raph...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/entity PortletEntityAccess.java
Date Sat, 29 Nov 2003 23:00:01 GMT
raphael     2003/11/29 15:00:01

  Modified:    portal/src/java/org/apache/jetspeed/aggregator Tag:
                        aggregation_1-branch PortletWindowFactory.java
               portal/src/java/org/apache/jetspeed/request Tag:
                        aggregation_1-branch RequestContext.java
               portal/src/java/org/apache/jetspeed/services/entity Tag:
                        aggregation_1-branch PortletEntityAccess.java
  Added:       portal/src/java/org/apache/jetspeed/aggregator Tag:
                        aggregation_1-branch ContentDispatcher.java
                        PortletRenderer.java
               portal/src/java/org/apache/jetspeed/aggregator/impl Tag:
                        aggregation_1-branch ContentDispatcherImpl.java
                        PortletRendererImpl.java QueueMonitor.java
                        RenderingJob.java Worker.java WorkerMonitor.java
  Log:
  First classes for aggregation engine. Does not cleanly compile yet
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.8.2.1   +18 -2     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/PortletWindowFactory.java
  
  Index: PortletWindowFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/PortletWindowFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- PortletWindowFactory.java	17 Oct 2003 19:37:00 -0000	1.8
  +++ PortletWindowFactory.java	29 Nov 2003 23:00:01 -0000	1.8.2.1
  @@ -55,6 +55,7 @@
   
   import org.apache.jetspeed.om.window.impl.PortletWindowImpl;
   import org.apache.jetspeed.services.entity.PortletEntityAccess;
  +import org.apache.pluto.om.common.ObjectID;
   import org.apache.pluto.om.entity.PortletEntity;
   import org.apache.pluto.om.portlet.PortletDefinition;
   import org.apache.pluto.om.window.PortletWindow;
  @@ -74,7 +75,7 @@
       {
           PortletEntity portletEntity = PortletEntityAccess.getEntity(portletDefinition,
portletName);
   
  -       
  +
           // TODO: This needs to be changed to support multiple windows per entity
           PortletWindow portletWindow = portletEntity.getPortletWindowList().get(portletEntity.getId());
   
  @@ -83,6 +84,21 @@
               portletWindow = new PortletWindowImpl(portletEntity.getId());
               ((PortletWindowCtrl) portletWindow).setPortletEntity(portletEntity);
               PortletWindowList windowList = portletEntity.getPortletWindowList();
  +            ((PortletWindowListCtrl) windowList).add(portletWindow);
  +        }
  +
  +        return portletWindow;
  +    }
  +
  +    public static PortletWindow getWindow(PortletEntity entity, ObjectID windowID)
  +    {
  +        PortletWindow portletWindow = entity.getPortletWindowList().get(windowID);
  +
  +        if (portletWindow == null)
  +        {
  +            portletWindow = new PortletWindowImpl(windowID);
  +            ((PortletWindowCtrl) portletWindow).setPortletEntity(entity);
  +            PortletWindowList windowList = entity.getPortletWindowList();
               ((PortletWindowListCtrl) windowList).add(portletWindow);
           }
   
  
  
  
  No                   revision
  
  Index: PortletWindowFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/PortletWindowFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- PortletWindowFactory.java	17 Oct 2003 19:37:00 -0000	1.8
  +++ PortletWindowFactory.java	29 Nov 2003 23:00:01 -0000	1.8.2.1
  @@ -55,6 +55,7 @@
   
   import org.apache.jetspeed.om.window.impl.PortletWindowImpl;
   import org.apache.jetspeed.services.entity.PortletEntityAccess;
  +import org.apache.pluto.om.common.ObjectID;
   import org.apache.pluto.om.entity.PortletEntity;
   import org.apache.pluto.om.portlet.PortletDefinition;
   import org.apache.pluto.om.window.PortletWindow;
  @@ -74,7 +75,7 @@
       {
           PortletEntity portletEntity = PortletEntityAccess.getEntity(portletDefinition,
portletName);
   
  -       
  +
           // TODO: This needs to be changed to support multiple windows per entity
           PortletWindow portletWindow = portletEntity.getPortletWindowList().get(portletEntity.getId());
   
  @@ -83,6 +84,21 @@
               portletWindow = new PortletWindowImpl(portletEntity.getId());
               ((PortletWindowCtrl) portletWindow).setPortletEntity(portletEntity);
               PortletWindowList windowList = portletEntity.getPortletWindowList();
  +            ((PortletWindowListCtrl) windowList).add(portletWindow);
  +        }
  +
  +        return portletWindow;
  +    }
  +
  +    public static PortletWindow getWindow(PortletEntity entity, ObjectID windowID)
  +    {
  +        PortletWindow portletWindow = entity.getPortletWindowList().get(windowID);
  +
  +        if (portletWindow == null)
  +        {
  +            portletWindow = new PortletWindowImpl(windowID);
  +            ((PortletWindowCtrl) portletWindow).setPortletEntity(entity);
  +            PortletWindowList windowList = entity.getPortletWindowList();
               ((PortletWindowListCtrl) windowList).add(portletWindow);
           }
   
  
  
  
  No                   revision
  
  Index: PortletWindowFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/PortletWindowFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- PortletWindowFactory.java	17 Oct 2003 19:37:00 -0000	1.8
  +++ PortletWindowFactory.java	29 Nov 2003 23:00:01 -0000	1.8.2.1
  @@ -55,6 +55,7 @@
   
   import org.apache.jetspeed.om.window.impl.PortletWindowImpl;
   import org.apache.jetspeed.services.entity.PortletEntityAccess;
  +import org.apache.pluto.om.common.ObjectID;
   import org.apache.pluto.om.entity.PortletEntity;
   import org.apache.pluto.om.portlet.PortletDefinition;
   import org.apache.pluto.om.window.PortletWindow;
  @@ -74,7 +75,7 @@
       {
           PortletEntity portletEntity = PortletEntityAccess.getEntity(portletDefinition,
portletName);
   
  -       
  +
           // TODO: This needs to be changed to support multiple windows per entity
           PortletWindow portletWindow = portletEntity.getPortletWindowList().get(portletEntity.getId());
   
  @@ -83,6 +84,21 @@
               portletWindow = new PortletWindowImpl(portletEntity.getId());
               ((PortletWindowCtrl) portletWindow).setPortletEntity(portletEntity);
               PortletWindowList windowList = portletEntity.getPortletWindowList();
  +            ((PortletWindowListCtrl) windowList).add(portletWindow);
  +        }
  +
  +        return portletWindow;
  +    }
  +
  +    public static PortletWindow getWindow(PortletEntity entity, ObjectID windowID)
  +    {
  +        PortletWindow portletWindow = entity.getPortletWindowList().get(windowID);
  +
  +        if (portletWindow == null)
  +        {
  +            portletWindow = new PortletWindowImpl(windowID);
  +            ((PortletWindowCtrl) portletWindow).setPortletEntity(entity);
  +            PortletWindowList windowList = entity.getPortletWindowList();
               ((PortletWindowListCtrl) windowList).add(portletWindow);
           }
   
  
  
  
  1.1.2.1   +76 -0     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/ContentDispatcher.java
  
  
  
  
  1.1.2.1   +91 -0     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/PortletRenderer.java
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +79 -0     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/ContentDispatcherImpl.java
  
  
  
  
  1.1.2.1   +183 -0    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/PortletRendererImpl.java
  
  
  
  
  1.1.2.1   +125 -0    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/QueueMonitor.java
  
  
  
  
  1.1.2.1   +159 -0    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/RenderingJob.java
  
  
  
  
  1.1.2.1   +171 -0    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/Worker.java
  
  
  
  
  1.1.2.1   +202 -0    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/WorkerMonitor.java
  
  
  
  
  No                   revision
  No                   revision
  1.3.2.1   +61 -60    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/RequestContext.java
  
  Index: RequestContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/RequestContext.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- RequestContext.java	20 Oct 2003 03:52:53 -0000	1.3
  +++ RequestContext.java	29 Nov 2003 23:00:01 -0000	1.3.2.1
  @@ -63,8 +63,9 @@
   import org.apache.jetspeed.engine.core.PortalURL;
   import org.apache.jetspeed.om.profile.Profile;
   import org.apache.pluto.om.window.PortletWindow;
  +
   /**
  - * Portal Request Context is associated with each request 
  + * Portal Request Context is associated with each request
    *
    * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
    * @version $Id$
  @@ -72,104 +73,104 @@
   public interface RequestContext
   {
       /**
  -     * Gets the HTTP Servlet Request.  This is the Servlet 
  +     * Gets the HTTP Servlet Request.  This is the Servlet
        * containers raw request object.  This request should
        * be wrapped using <code>getPortletRequestForWindow()</code> before
  -     * being processed by the portlet container. 
  -     * 
  -     * @return HttpServletRequest 
  +     * being processed by the portlet container.
  +     *
  +     * @return HttpServletRequest
        */
       public HttpServletRequest getRequest();
   
       /**
  -     * Gets the HTTP Servlet Response.  This is the Servlet 
  +     * Gets the HTTP Servlet Response.  This is the Servlet
        * containers raw response object.  This response should
        * be wrapped using <code>getPortletResponseForWindow()</code> before
  -     * being processed by the portlet container. 
  +     * being processed by the portlet container.
        * @return HttpServletResponse
        */
       public HttpServletResponse getResponse();
   
       /**
  -     * Gets the HTTP Servlet Config 
  -     * 
  +     * Gets the HTTP Servlet Config
  +     *
        * @return ServletConfig
        */
       public ServletConfig getConfig();
   
       /**
  -     * Gets the Jetspeed Portal Context 
  -     * 
  +     * Gets the Jetspeed Portal Context
  +     *
        * @return HttpServletRequest
        */
       public PortalContext getPortalContext();
   
       /**
  -     * Gets the target page profile for this request 
  -     * 
  +     * Gets the target page profile for this request
  +     *
        * @return Profile
        */
       public Profile getProfile();
   
       /**
  -     * Sets the target page profile for this request 
  -     * 
  +     * Sets the target page profile for this request
  +     *
        * @param profile The target profile
        */
       public void setProfile(Profile profile);
  -    
  -    /** 
  +
  +    /**
        * Set the capabilityMap. Used by the CapabilityValve
  -     * 
  -     * @param capabilityMap 
  +     *
  +     * @param capabilityMap
        */
       public void setCapabilityMap(CapabilityMap map);
  -    
  -    /** 
  +
  +    /**
        * Get the Capability Map
  -     * 
  +     *
        */
       public CapabilityMap getCapabilityMap();
   
  -    /** 
  +    /**
        * Set the Mimetype. Set by the CapabilityValve
  -     * 
  -     * @param mimeType 
  +     *
  +     * @param mimeType
        */
       public void setMimeType(String mimeType);
   
  -    /** 
  +    /**
        * Get the mimeType for the request
  -     * 
  +     *
        */
       public String getMimeType();
  -        
  -    /** 
  +
  +    /**
        * Set the mediaType. Set by the CapabilityValve
  -     * 
  -     * @param mediaType 
  +     *
  +     * @param mediaType
        */
       public void setMediaType(String mediaType);
  -    
  -    /** 
  -     * get the Media Type 
  -     * 
  +
  +    /**
  +     * get the Media Type
  +     *
        */
       public String getMediaType();
   
       /**
        * Get the requested Portlet URL for this request
  -     * 
  +     *
        * @return PortletURL the requested Portlet URL
  -     */    
  +     */
       public PortalURL getRequestedPortalURL();
   
       /**
  -     * Change the Portlet URL to a new portal URL 
  -     * 
  +     * Change the Portlet URL to a new portal URL
  +     *
        * @param url
        * @param control
  -     */    
  +     */
       public void changeRequestedPortalURL(PortalURL url, PortalControlParameter control);
   
       /**
  @@ -178,38 +179,38 @@
        * @return PortletWindow The target portlet action window
        */
       public PortletWindow getActionWindow();
  -    
  +
       /**
        * Sets the target Portlet Window
  -     * 
  +     *
        * @param window
        */
       public void setActionWindow(PortletWindow window);
  -    
  +
       /**
        * get the character encoding
  -     * 
  -     * 
  +     *
  +     *
        */
       public String getCharacterEncoding();
  -    
  +
       /**
        * set character encoding
  -     * 
  -     * @param enc 
  +     *
  +     * @param enc
        */
       public void setCharacterEncoding(String enc);
  -    
  +
       /**
  -     * 
  +     *
        * <p>
        * getRequestForWindow
        * </p>
  -     * 
  +     *
        * Takes a PortletWindow and generates a HttpServletRequest that
        * accurately represents that PortletWindow's request parameters
  -     *  
  -     * 
  +     *
  +     *
        * @param window PortetlWindow that we are build a request for
        * @return HttpServletRequest that wraps the existing servlet
        * container's request that can interpret encoded portlet information
  @@ -217,17 +218,17 @@
        *
        */
       HttpServletRequest getRequestForWindow(PortletWindow window);
  -    
  +
       /**
  -     * 
  +     *
        * <p>
        * getResponseForWindow
        * </p>
  -     * 
  +     *
        * Takes a PortletWindow and generates a HttpServletResponse that
        * accurately represents that PortletWindow's request parameters.
  -     *  
  -     * 
  +     *
  +     *
        * @param window PortetlWindow that we are build a response for
        * @return HttpServletRequest that wraps the existing servlet
        * container's request that can interpret encoded portlet information
  @@ -236,5 +237,5 @@
        *
        */
       HttpServletResponse getResponseForWindow(PortletWindow window);
  -    
  +
   }
  
  
  
  No                   revision
  No                   revision
  1.6.2.1   +8 -2      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/entity/PortletEntityAccess.java
  
  Index: PortletEntityAccess.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/entity/PortletEntityAccess.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- PortletEntityAccess.java	26 Nov 2003 20:55:34 -0000	1.6
  +++ PortletEntityAccess.java	29 Nov 2003 23:00:01 -0000	1.6.2.1
  @@ -54,6 +54,7 @@
   package org.apache.jetspeed.services.entity;
   
   import org.apache.jetspeed.cps.CommonPortletServices;
  +import org.apache.pluto.om.common.ObjectID;
   import org.apache.pluto.om.entity.PortletEntity;
   import org.apache.pluto.om.portlet.PortletDefinition;
   
  @@ -61,13 +62,18 @@
    * <p>
    * PortletEntityAccess
    * </p>
  - * 
  + *
    * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
    * @version $Id$
    *
    */
   public class PortletEntityAccess
   {
  +
  +    public static PortletEntity getEntity(ObjectID oid)
  +    {
  +        return getService().getPortletEntity(oid);
  +    }
   
       public static PortletEntity getEntity(PortletDefinition def, String entityName)
       {
  
  
  

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


Mime
View raw message