cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r312966 - in /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl: AbstractUserProfileManager.java AuthenticationProfileManager.java GroupBasedProfileManager.java StaticProfileManager.java
Date Tue, 11 Oct 2005 22:24:23 GMT
Author: rgoers
Date: Tue Oct 11 15:24:06 2005
New Revision: 312966

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

Modified:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java?rev=312966&r1=312965&r2=312966&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java
Tue Oct 11 15:24:06 2005
@@ -22,7 +22,6 @@
 import java.util.List;
 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.ProcessingException;
@@ -35,6 +34,8 @@
 import org.apache.cocoon.portal.layout.Layout;
 import org.apache.cocoon.portal.layout.LayoutFactory;
 import org.apache.cocoon.portal.profile.PortalUser;
+import org.apache.cocoon.portal.profile.ProfileException;
+import org.apache.cocoon.portal.PortalException;
 
 /**
  * An abstract profile manager providing a different profile for each user.
@@ -85,7 +86,7 @@
             this.portalService.removeAttribute("CopletInstanceData:"+layoutKey);
             this.portalService.removeAttribute("Layout:"+layoutKey);
         } catch (ServiceException e) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", e);
+            throw new PortalException("Unable to lookup portal service.", e);
         } finally {
             this.manager.release(adapterSelector);
         }
@@ -283,7 +284,7 @@
 
             return layout;
         } catch (Exception ce) {
-            throw new CascadingRuntimeException("Exception during loading of profile.", ce);
+            throw new ProfileException("Exception during loading of profile.", ce);
         } finally {
             this.manager.release(adapterSelector);
         }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java?rev=312966&r1=312965&r2=312966&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
Tue Oct 11 15:24:06 2005
@@ -21,7 +21,6 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.service.ServiceException;
@@ -174,7 +173,7 @@
             adapter.saveProfile(key, parameters, profileManager);
         } catch (Exception e) {
             // TODO
-            throw new CascadingRuntimeException("Exception during save profile", e);
+            throw new ProfileException("Exception during save profile", e);
         } finally {
             this.manager.release(adapter);
         }
@@ -205,7 +204,7 @@
             adapter.saveProfile(key, parameters, layout);
         } catch (Exception e) {
             // TODO
-            throw new CascadingRuntimeException("Exception during save profile", e);
+            throw new ProfileException("Exception during save profile", e);
         } finally {
             this.manager.release(adapter);
         }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java?rev=312966&r1=312965&r2=312966&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
Tue Oct 11 15:24:06 2005
@@ -23,7 +23,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.context.Context;
 import org.apache.avalon.framework.context.ContextException;
@@ -42,6 +41,7 @@
 import org.apache.cocoon.portal.profile.PortalUser;
 import org.apache.cocoon.portal.profile.ProfileLS;
 import org.apache.cocoon.portal.profile.ProfileException;
+import org.apache.cocoon.portal.PortalException;
 import org.apache.commons.collections.map.LinkedMap;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.excalibur.source.SourceNotFoundException;
@@ -214,7 +214,7 @@
                 }
 
             } catch (ServiceException e) {
-                throw new CascadingRuntimeException("Unable to lookup portal service.", e);
+                throw new PortalException("Unable to lookup portal service.", e);
             } finally {
                 this.manager.release(adapterSelector);
             }
@@ -381,7 +381,7 @@
 
             return profile;
         } catch (ServiceException se) {
-            throw new CascadingRuntimeException("Unable to get component profilels.", se);
+            throw new ProfileException("Unable to get component profilels.", se);
         } finally {
             this.manager.release( loader );
         }
@@ -619,7 +619,7 @@
             adapter.saveProfile(key, parameters, cidm);
         } catch (Exception e) {
             // TODO
-            throw new CascadingRuntimeException("Exception during save profile", e);
+            throw new ProfileException("Exception during save profile", e);
         } finally {
             this.manager.release(adapter);
         }
@@ -649,7 +649,7 @@
             adapter.saveProfile(key, parameters, profile.getRootLayout());
         } catch (Exception e) {
             // TODO
-            throw new CascadingRuntimeException("Exception during save profile", e);
+            throw new ProfileException("Exception during save profile", e);
         } finally {
             this.manager.release(adapter);
         }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java?rev=312966&r1=312965&r2=312966&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
Tue Oct 11 15:24:06 2005
@@ -23,19 +23,17 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.cocoon.portal.coplet.CopletData;
 import org.apache.cocoon.portal.coplet.CopletFactory;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
-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.*;
 import org.apache.cocoon.portal.profile.PortalUser;
 import org.apache.cocoon.portal.profile.ProfileLS;
+import org.apache.cocoon.portal.profile.ProfileException;
+import org.apache.cocoon.portal.PortalException;
 import org.apache.commons.collections.map.LinkedMap;
 import org.apache.commons.collections.map.StaticBucketMap;
 import org.apache.excalibur.source.SourceValidity;
@@ -125,7 +123,7 @@
 
             return (Layout) layouts.get(layoutID);
         } catch (Exception ce) {
-            throw new CascadingRuntimeException("Unable to get layout.", ce);
+            throw new LayoutException("Unable to get layout.", ce);
         } finally {
             this.manager.release(adapter);
         }
@@ -237,7 +235,7 @@
         try {
             return getCopletInstanceDataManager().getCopletInstanceData(copletID);
         } catch (Exception e) {
-            throw new CascadingRuntimeException("Error in getCopletInstanceData", e);
+            throw new ProfileException("Error in getCopletInstanceData", e);
         }
     }
 
@@ -258,7 +256,7 @@
             }
             return null;
         } catch (Exception e) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", e);
+            throw new PortalException("Unable to lookup portal service.", e);
         }
     }
 
@@ -277,7 +275,7 @@
             }
             return coplets;
         } catch (Exception e) {
-            throw new CascadingRuntimeException("Error in getCopletInstanceData", e);
+            throw new ProfileException("Error in getCopletInstanceData", e);
         }
     }
 
@@ -325,7 +323,7 @@
         try {
             return this.getCopletDataManager().getCopletData().values();
         } catch (Exception e) {
-            throw new CascadingRuntimeException("Error in getCopletDatas.", e);
+            throw new ProfileException("Error in getCopletDatas.", e);
         }
     }
 
@@ -336,7 +334,7 @@
         try {
             return this.getCopletInstanceDataManager().getCopletInstanceData().values();
         } catch (Exception e) {
-            throw new CascadingRuntimeException("Error in getCopletInstanceDatas.", e);
+            throw new ProfileException("Error in getCopletInstanceDatas.", e);
         }
     }
 



Mime
View raw message