cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r314938 - in /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal: aspect/impl/ authenticationfw/ event/impl/ impl/ layout/impl/ pluto/
Date Wed, 12 Oct 2005 15:01:46 GMT
Author: rgoers
Date: Wed Oct 12 08:01:42 2005
New Revision: 314938

URL: http://svn.apache.org/viewcvs?rev=314938&view=rev
Log:
Convert CascadingRuntimeException to something more useful.

Modified:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/DefaultAspectDataHandler.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/RequestAspectDataStore.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/authenticationfw/User.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/DefaultAspectDataHandler.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/DefaultAspectDataHandler.java?rev=314938&r1=314937&r2=314938&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/DefaultAspectDataHandler.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/DefaultAspectDataHandler.java
Wed Oct 12 08:01:42 2005
@@ -19,7 +19,6 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.cocoon.portal.aspect.AspectDataHandler;
@@ -27,12 +26,13 @@
 import org.apache.cocoon.portal.aspect.AspectDescription;
 import org.apache.cocoon.portal.aspect.Aspectalizable;
 import org.apache.cocoon.portal.aspect.AspectalizableDescription;
+import org.apache.cocoon.portal.PortalException;
 
 /**
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: DefaultAspectDataHandler.java,v 1.7 2004/03/10 12:28:29 cziegeler Exp
$
+ * @version CVS $Id$
  */
 public class DefaultAspectDataHandler 
     implements AspectDataHandler {
@@ -71,7 +71,7 @@
             }
 
         } catch (ServiceException ce) {
-            throw new CascadingRuntimeException("Unable to lookup aspect data store " + aspectDesc.getStoreName(),
ce);
+            throw new PortalException("Unable to lookup aspect data store " + aspectDesc.getStoreName(),
ce);
         } finally {
             this.storeSelector.release( store );
         }        
@@ -124,7 +124,7 @@
                 }
 
             } catch (ServiceException ce) {
-                throw new CascadingRuntimeException("Unable to lookup aspect data store "
+ current.getStoreName(), ce);
+                throw new PortalException("Unable to lookup aspect data store " + current.getStoreName(),
ce);
             } finally {
                 this.storeSelector.release( store );
             }        
@@ -149,7 +149,7 @@
             store = (AspectDataStore)this.storeSelector.select(aspectDesc.getStoreName());
             store.setAspectData(owner, aspectName, AspectUtil.convert(aspectDesc, data));
         } catch (ServiceException ce) {
-            throw new CascadingRuntimeException("Unable to lookup aspect data store " + aspectDesc.getStoreName(),
ce);
+            throw new PortalException("Unable to lookup aspect data store " + aspectDesc.getStoreName(),
ce);
         } finally {
             this.storeSelector.release( store );
         }        

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/RequestAspectDataStore.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/RequestAspectDataStore.java?rev=314938&r1=314937&r2=314938&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/RequestAspectDataStore.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/aspect/impl/RequestAspectDataStore.java
Wed Oct 12 08:01:42 2005
@@ -15,12 +15,12 @@
  */
 package org.apache.cocoon.portal.aspect.impl;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.avalon.framework.parameters.Parameterizable;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.cocoon.portal.LinkService;
+import org.apache.cocoon.portal.PortalException;
 import org.apache.cocoon.portal.aspect.Aspectalizable;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
 import org.apache.cocoon.portal.event.impl.ChangeAspectDataEvent;
@@ -31,7 +31,7 @@
  * 
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: RequestAspectDataStore.java,v 1.7 2004/03/05 13:02:10 bdelacretaz Exp
$
+ * @version CVS $Id$
  */
 public class RequestAspectDataStore 
     extends TemporaryAspectDataStore
@@ -57,7 +57,7 @@
             service = (LinkService)this.manager.lookup(LinkService.ROLE);
             service.addEventToLink( e );
         } catch (ServiceException ce) {
-            throw new CascadingRuntimeException("Unable to lookup link service.", ce);
+            throw new PortalException("Unable to lookup link service.", ce);
         } finally {
             this.manager.release( service );
         }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/authenticationfw/User.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/authenticationfw/User.java?rev=314938&r1=314937&r2=314938&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/authenticationfw/User.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/authenticationfw/User.java Wed
Oct 12 08:01:42 2005
@@ -15,12 +15,12 @@
  */
 package org.apache.cocoon.portal.authenticationfw;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.portal.profile.PortalUser;
 import org.apache.cocoon.portal.profile.impl.UserInfo;
+import org.apache.cocoon.portal.PortalException;
 import org.apache.cocoon.webapps.authentication.AuthenticationManager;
 import org.apache.cocoon.webapps.authentication.user.RequestState;
 import org.apache.cocoon.webapps.authentication.user.UserHandler;
@@ -67,7 +67,7 @@
 
             return info;
         } catch (ServiceException se) {
-            throw new CascadingRuntimeException("Unable to lookup authentication manager.",
se);
+            throw new PortalException("Unable to lookup authentication manager.", se);
         } finally {
             manager.release( authManager );
         }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java?rev=314938&r1=314937&r2=314938&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java
Wed Oct 12 08:01:42 2005
@@ -18,13 +18,13 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.portal.PortalException;
 import org.apache.cocoon.portal.event.Event;
 import org.apache.cocoon.portal.event.EventConverter;
 
@@ -70,7 +70,7 @@
             }
             return String.valueOf(index);
         } catch (ServiceException ce) {
-            throw new CascadingRuntimeException("Unable to lookup component.", ce);     
      
+            throw new PortalException("Unable to lookup component.", ce);
         } finally {
             this.manager.release(service);
         }
@@ -92,7 +92,7 @@
                     }
                 }
             } catch (ServiceException ce) {
-                throw new CascadingRuntimeException("Unable to lookup component.", ce); 
          
+                throw new PortalException("Unable to lookup component.", ce);
             } finally {
                 this.manager.release(service);
             }
@@ -113,7 +113,7 @@
                 service.removeAttribute(ENCODE_LIST);
             }
         } catch (ServiceException ce) {
-            throw new CascadingRuntimeException("Unable to lookup component.", ce);     
      
+            throw new PortalException("Unable to lookup component.", ce);
         } finally {
             this.manager.release(service);
         }
@@ -128,7 +128,7 @@
             service = (PortalService)this.manager.lookup(PortalService.ROLE);
             service.removeAttribute(DECODE_LIST);
         } catch (ServiceException ce) {
-            throw new CascadingRuntimeException("Unable to lookup component.", ce);     
      
+            throw new PortalException("Unable to lookup component.", ce);
         } finally {
             this.manager.release(service);
         }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java?rev=314938&r1=314937&r2=314938&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
Wed Oct 12 08:01:42 2005
@@ -19,7 +19,6 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
@@ -28,10 +27,7 @@
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.cocoon.core.Core;
-import org.apache.cocoon.portal.LinkService;
-import org.apache.cocoon.portal.PortalComponentManager;
-import org.apache.cocoon.portal.PortalManager;
-import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.portal.*;
 import org.apache.cocoon.portal.coplet.CopletFactory;
 import org.apache.cocoon.portal.event.EventManager;
 import org.apache.cocoon.portal.layout.LayoutFactory;
@@ -103,7 +99,7 @@
             try {
                 this.linkService = (LinkService)this.manager.lookup( LinkService.ROLE );
             } catch (ServiceException e) {
-                throw new CascadingRuntimeException("Unable to lookup link service.", e);
+                throw new PortalException("Unable to lookup link service.", e);
             }
         }
         return this.linkService;
@@ -117,7 +113,7 @@
             try {
                 this.profileManager = (ProfileManager)this.manager.lookup( ProfileManager.ROLE
);
             } catch (ServiceException e) {
-                throw new CascadingRuntimeException("Unable to lookup profile manager.",
e);
+                throw new PortalException("Unable to lookup profile manager.", e);
             }
         }
         return this.profileManager;
@@ -131,7 +127,7 @@
             try {
                 this.eventManager = (EventManager)this.manager.lookup( EventManager.ROLE
);
             } catch (ServiceException e) {
-                throw new CascadingRuntimeException("Unable to lookup event manager.", e);
+                throw new PortalException("Unable to lookup event manager.", e);
             }
         }
         return this.eventManager;
@@ -175,7 +171,7 @@
                 o = (Renderer) this.manager.lookup( Renderer.ROLE + '/' + hint );
                 this.renderers.put( hint, o );
             } catch (ServiceException e) {
-                throw new CascadingRuntimeException("Unable to lookup renderer with hint
" + hint, e);
+                throw new PortalException("Unable to lookup renderer with hint " + hint,
e);
             }
         }
         return o;
@@ -189,7 +185,7 @@
             try {
                 this.copletFactory = (CopletFactory)this.manager.lookup( CopletFactory.ROLE
);
             } catch (ServiceException e) {
-                throw new CascadingRuntimeException("Unable to lookup coplet factory.", e);
+                throw new PortalException("Unable to lookup coplet factory.", e);
             }
         }
         return this.copletFactory;
@@ -203,7 +199,7 @@
             try {
                 this.layoutFactory = (LayoutFactory)this.manager.lookup( LayoutFactory.ROLE
);
             } catch (ServiceException e) {
-                throw new CascadingRuntimeException("Unable to lookup layout factory.", e);
+                throw new PortalException("Unable to lookup layout factory.", e);
             }
         }
         return this.layoutFactory;
@@ -217,7 +213,7 @@
             try {
                 this.portalManager = (PortalManager)this.manager.lookup( PortalManager.ROLE
);
             } catch (ServiceException e) {
-                throw new CascadingRuntimeException("Unable to lookup portal manager.", e);
+                throw new PortalException("Unable to lookup portal manager.", e);
             }
         }
         return this.portalManager;

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java?rev=314938&r1=314937&r2=314938&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
Wed Oct 12 08:01:42 2005
@@ -21,7 +21,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
 import org.apache.avalon.framework.configuration.Configurable;
@@ -50,8 +49,8 @@
 import org.apache.cocoon.portal.layout.CompositeLayout;
 import org.apache.cocoon.portal.layout.Item;
 import org.apache.cocoon.portal.layout.Layout;
-import org.apache.cocoon.portal.layout.LayoutFactory;
 import org.apache.cocoon.portal.layout.LayoutException;
+import org.apache.cocoon.portal.layout.LayoutFactory;
 import org.apache.cocoon.portal.layout.renderer.Renderer;
 import org.apache.cocoon.portal.profile.ProfileManager;
 import org.apache.cocoon.util.ClassUtils;
@@ -246,7 +245,7 @@
                         try {
                             this.configureLayout( layoutsConf[i] );
                         } catch (ConfigurationException ce) {
-                            throw new CascadingRuntimeException("Unable to configure layout.",
ce);
+                            throw new LayoutException("Unable to configure layout.", ce);
                         }
                     }
                     this.layoutsConf = null;
@@ -392,7 +391,7 @@
         try {
             this.remove( layout );
         } catch (ProcessingException pe) {
-            throw new CascadingRuntimeException("Exception during removal.", pe);
+            throw new LayoutException("Exception during removal.", pe);
         }
     }
 

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java?rev=314938&r1=314937&r2=314938&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java
Wed Oct 12 08:01:42 2005
@@ -19,7 +19,6 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
 import org.apache.avalon.framework.container.ContainerUtil;
@@ -34,6 +33,7 @@
 import org.apache.cocoon.portal.pluto.service.log.LogServiceImpl;
 import org.apache.cocoon.portal.pluto.services.PropertyManagerServiceImpl;
 import org.apache.cocoon.portal.pluto.services.factory.FactoryManagerServiceImpl;
+import org.apache.cocoon.portal.PortalException;
 import org.apache.pluto.services.ContainerService;
 import org.apache.pluto.services.PortletContainerEnvironment;
 import org.apache.pluto.services.factory.FactoryManagerService;
@@ -47,7 +47,7 @@
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: PortletContainerEnvironmentImpl.java,v 1.5 2004/03/15 10:14:39 cziegeler
Exp $
+ * @version CVS $Id$
  */
 public class PortletContainerEnvironmentImpl 
 extends AbstractLogEnabled
@@ -139,7 +139,7 @@
                     service = (ContainerService)this.manager.lookup(key);
                     this.services.put(key, service);
                 } catch (ServiceException se) {
-                    throw new CascadingRuntimeException("Unable to lookup service " + key,
se);
+                    throw new PortalException("Unable to lookup service " + key, se);
                 }
             }
         }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java?rev=314938&r1=314937&r2=314938&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
Wed Oct 12 08:01:42 2005
@@ -25,10 +25,10 @@
 import javax.portlet.PortletMode;
 import javax.portlet.WindowState;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.cocoon.portal.LinkService;
+import org.apache.cocoon.portal.PortalException;
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
 import org.apache.cocoon.portal.event.CopletInstanceEvent;
@@ -88,7 +88,7 @@
             service = (PortalService) manager.lookup(PortalService.ROLE);
             this.linkService = service.getComponentManager().getLinkService();
         } catch (ServiceException se) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", se);
+            throw new PortalException("Unable to lookup portal service.", se);
         } finally {
             manager.release(service);
         }



Mime
View raw message