portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/layout-portlets/src/webapp/WEB-INF jetspeed-portlet.xml
Date Thu, 02 Jun 2005 06:23:26 GMT
taylor      2005/06/01 23:23:26

  Modified:    layout-portlets/src/java/org/apache/jetspeed/portlets/layout
                        LayoutPortlet.java
               layout-portlets/src/webapp/WEB-INF jetspeed-portlet.xml
  Log:
  http://issues.apache.org/jira/browse/JS2-270
  Made JPT configurable again
  Added JPT interface and default impl
  
  Revision  Changes    Path
  1.13      +8 -1      jakarta-jetspeed-2/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/LayoutPortlet.java
  
  Index: LayoutPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/LayoutPortlet.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- LayoutPortlet.java	1 Jun 2005 19:09:17 -0000	1.12
  +++ LayoutPortlet.java	2 Jun 2005 06:23:26 -0000	1.13
  @@ -38,6 +38,7 @@
   import org.apache.jetspeed.page.PageManager;
   import org.apache.jetspeed.request.RequestContext;
   import org.apache.jetspeed.velocity.JetspeedPowerTool;
  +import org.apache.jetspeed.velocity.JetspeedPowerToolFactory;
   import org.apache.pluto.om.window.PortletWindow;
   
   /**
  @@ -50,6 +51,7 @@
       protected PortletRegistry registry;
       protected PageManager pageManager;
       protected IdGenerator generator;
  +    protected JetspeedPowerToolFactory jptFactory;
       
       public void init( PortletConfig config ) throws PortletException
       {
  @@ -70,6 +72,11 @@
           {
               throw new PortletException("Failed to find the ID Generator on portlet initialization");
           }        
  +        jptFactory = (JetspeedPowerToolFactory)getPortletContext().getAttribute(CommonPortletServices.CPS_JETSPEED_POWERTOOL_FACTORY);
  +        if (null == jptFactory)
  +        {
  +            throw new PortletException("Failed to find the JPT Factory on portlet initialization");
  +        }        
           
       }
   
  @@ -291,7 +298,7 @@
                                       + "the HttpServletRequest.");
                   }
   
  -                tool = new JetspeedPowerTool(requestContext);
  +                tool = this.jptFactory.getJetspeedPowerTool(requestContext);
                   request.setAttribute(PortalReservedParameters.JETSPEED_POWER_TOOL_REQ_ATTRIBUTE,
tool);
               }
   
  
  
  
  1.2       +1 -0      jakarta-jetspeed-2/layout-portlets/src/webapp/WEB-INF/jetspeed-portlet.xml
  
  Index: jetspeed-portlet.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/layout-portlets/src/webapp/WEB-INF/jetspeed-portlet.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jetspeed-portlet.xml	26 Apr 2005 23:31:22 -0000	1.1
  +++ jetspeed-portlet.xml	2 Jun 2005 06:23:26 -0000	1.2
  @@ -28,6 +28,7 @@
   	    <js:service name='IdGenerator'/>
   		<js:service name='PortletRegistryComponent'/>
   		<js:service name='PageManager'/>
  +		<js:service name='Powertools'/>        
   	</js:services>
   	
   </portlet-app>
  \ 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