portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggol...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletfactory JetspeedPortletFactoryService.java
Date Mon, 13 May 2002 00:57:16 GMT
ggolden     02/05/12 17:57:16

  Modified:    src/java/org/apache/jetspeed/services/portaltoolkit
                        JetspeedPortalToolkitService.java
               src/java/org/apache/jetspeed/services/portletfactory
                        JetspeedPortletFactoryService.java
  Log:
  PR: 8979
  Moved the portlet setID() call from the toolkit to the factory service
  to be sure that a portlet  from the portlet factory always has an ID set.
  
  Revision  Changes    Path
  1.20      +1 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/services/portaltoolkit/JetspeedPortalToolkitService.java
  
  Index: JetspeedPortalToolkitService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/portaltoolkit/JetspeedPortalToolkitService.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- JetspeedPortalToolkitService.java	9 May 2002 23:10:22 -0000	1.19
  +++ JetspeedPortalToolkitService.java	13 May 2002 00:57:16 -0000	1.20
  @@ -88,7 +88,7 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    *
  - * @version $Id: JetspeedPortalToolkitService.java,v 1.19 2002/05/09 23:10:22 taylor Exp
$
  + * @version $Id: JetspeedPortalToolkitService.java,v 1.20 2002/05/13 00:57:16 ggolden Exp
$
    */
   public class JetspeedPortalToolkitService extends TurbineBaseService
       implements PortalToolkitService
  @@ -425,8 +425,6 @@
                   {
                       Portlet p = PortletFactory.getPortlet( psmlEntry );
   
  -                    p.setID(psmlEntry.getId());
  -                    
                       if (p != null)
                       {
                           Map constraints = getParameters(psmlEntry.getLayout());
  
  
  
  1.9       +9 -4      jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletfactory/JetspeedPortletFactoryService.java
  
  Index: JetspeedPortletFactoryService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletfactory/JetspeedPortletFactoryService.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JetspeedPortletFactoryService.java	26 Mar 2002 09:06:54 -0000	1.8
  +++ JetspeedPortletFactoryService.java	13 May 2002 00:57:16 -0000	1.9
  @@ -90,7 +90,7 @@
    * Simple implementation of the PortalFactoryService.
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: JetspeedPortletFactoryService.java,v 1.8 2002/03/26 09:06:54 taylor Exp
$
  + * @version $Id: JetspeedPortletFactoryService.java,v 1.9 2002/05/13 00:57:16 ggolden Exp
$
    */
   public class JetspeedPortletFactoryService extends TurbineBaseService
       implements PortletFactoryService
  @@ -141,7 +141,7 @@
           
           pc.setPortletSkin( PortalToolkit.getSkin( entry.getSkin() ) );
           
  -        return getPortlet( regEntry.getClassname(), pc );
  +        return getPortlet( regEntry.getClassname(), pc, entry.getId() );
       }
   
       /**
  @@ -166,7 +166,7 @@
               
           PortletConfig pc = getPortletConfig(regEntry);
           
  -        return getPortlet( regEntry.getClassname(), pc );
  +        return getPortlet( regEntry.getClassname(), pc, null );
       }
       
       /** 
  @@ -175,9 +175,10 @@
        *
        * @param classname the classname of the portlet to instanciate
        * @param pc the PortletConfig object to be associated with this object
  +     * @param id The portlet's unique id (from the psml entry).
        * @return the Portlet created or retrieve from cache
        */
  -    protected Portlet getPortlet( String classname, PortletConfig pc )
  +    protected Portlet getPortlet( String classname, PortletConfig pc, String id )
           throws PortletException
       {
   
  @@ -271,6 +272,9 @@
                       
                   conf.setPortletSkin( pc.getPortletSkin() );
   
  +                // make sure the portlet has the id required
  +                portlet.setID( id );
  +
                   //FIXME: Notice here we are putting the portlet without wrapper
                   //in the cache, and we must wrap it on return.
                   //Security implications: the portletcache should not be
  @@ -304,6 +308,7 @@
           
           // init the portlet, it may override its PSML defined markup if
           // it doesn't check for it
  +        portlet.setID( id );
           portlet.setName( pc.getName() );
           portlet.setPortletConfig( pc );
           portlet.setCreationTime( System.currentTimeMillis() );
  
  
  

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


Mime
View raw message