portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container JetspeedPortletContainerWrapper.java
Date Wed, 04 Feb 2004 21:26:12 GMT
weaver      2004/02/04 13:26:12

  Modified:    portal/src/java/org/apache/jetspeed/container
                        JetspeedPortletContainerWrapper.java
  Log:
  added logging and object integrity tests
  
  Revision  Changes    Path
  1.6       +16 -1     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java
  
  Index: JetspeedPortletContainerWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JetspeedPortletContainerWrapper.java	31 Dec 2003 09:46:35 -0000	1.5
  +++ JetspeedPortletContainerWrapper.java	4 Feb 2004 21:26:12 -0000	1.6
  @@ -65,6 +65,8 @@
   import org.apache.pluto.om.window.PortletWindow;
   import org.apache.pluto.services.PortletContainerEnvironment;
   import org.apache.pluto.PortletContainerException;
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.engine.servlet.ServletObjectAccess;
   
   /**
  @@ -76,6 +78,7 @@
   public class JetspeedPortletContainerWrapper implements PortletContainer
   {
       private boolean initialiized = false;
  +    private static final Log log = LogFactory.getLog(JetspeedPortletContainerWrapper.class);
 
   
       public synchronized void init(
           String uniqueContainerId,
  @@ -101,6 +104,18 @@
       public void renderPortlet(PortletWindow portletWindow, HttpServletRequest servletRequest,
HttpServletResponse servletResponse)
           throws PortletException, IOException, PortletContainerException
       {
  +    	    	
  +		if(portletWindow.getPortletEntity() == null)
  +		{
  +			log.warn("Could not render PortletWindow "+ portletWindow.getId() + " as it has no PortletEntity
defined.");
  +			return;
  +		}		
  +    	
  +    	if(portletWindow.getPortletEntity().getPortletDefinition() == null)
  +    	{
  +    		log.warn("Could not render PortletWindow"+ portletWindow.getId() + " as it has no
PortletDefintion defined.");
  +    		return;
  +    	}
           PortletContainerFactory.getPortletContainerOriginal().renderPortlet(portletWindow,
servletRequest, servletResponse);
           // TODO: figure out how to access pluto-services before container kicks in
           //                              ServletObjectAccess.getServletRequest(servletRequest),
  
  
  

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