cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r180282 - /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/multipart
Date Mon, 06 Jun 2005 09:55:14 GMT
Author: cziegeler
Date: Mon Jun  6 02:55:12 2005
New Revision: 180282

URL: http://svn.apache.org/viewcvs?rev=180282&view=rev
Log:
Update javadocs and use new Receiver

Modified:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/EventAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ActionCounterEventAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ConvertableEventAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/NoClientCachingEventAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/PageLabelEventAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/RequestParameterEventAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/CompositeLayout.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/multipart/MultipartActionRequest.java

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/EventAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/EventAspect.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/EventAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/EventAspect.java
Mon Jun  6 02:55:12 2005
@@ -21,13 +21,13 @@
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
- * 
+ *
  * @version CVS $Id$
  */
 public interface EventAspect {
 
     String ROLE = EventAspect.class.getName();
-    
+
     void process(EventAspectContext context,
-                  PortalService  service);
+                 PortalService  service);
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ActionCounterEventAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ActionCounterEventAspect.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ActionCounterEventAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ActionCounterEventAspect.java
Mon Jun  6 02:55:12 2005
@@ -31,20 +31,20 @@
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
- * 
- * @version CVS $Id: ActionCounterEventAspect.java,v 1.6 2004/06/07 09:53:34 cziegeler Exp
$
+ *
+ * @version CVS $Id$
  */
 public class ActionCounterEventAspect
 	extends AbstractLogEnabled
-	implements EventAspect, 
-                ThreadSafe,
-                Parameterizable {
+	implements EventAspect,
+               ThreadSafe,
+               Parameterizable {
+
     protected final static String ATTRIBUTE_NAME = ActionCounterEventAspect.class.getName();
-    
 
     /** The name of the parameter to check */
     protected String parameterName;
-    
+
 	/* (non-Javadoc)
 	 * @see org.apache.cocoon.portal.event.aspect.EventAspect#process(org.apache.cocoon.portal.event.aspect.EventAspectContext,
org.apache.cocoon.portal.PortalService)
 	 */
@@ -52,7 +52,7 @@
         final String requestParameterName = context.getAspectParameters().getParameter("parameter-name",
this.parameterName);
 
         int actionCount;
-        
+
         Integer actionValue = (Integer) service.getAttribute(ATTRIBUTE_NAME);
         if (null == actionValue) {
             actionValue = new Integer(0);
@@ -73,7 +73,7 @@
             } catch (Exception ignore) {
                 number = -1;
             }
-            
+
             if ( number == actionCount - 1) {
                 // and invoke next one
                 context.invokeNext( service );
@@ -88,7 +88,6 @@
         response.setHeader("Expires", "Thu, 01 Jan 2000 00:00:00 GMT");
 	}
 
-
     /* (non-Javadoc)
      * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
      */
@@ -96,5 +95,4 @@
     throws ParameterException {
         this.parameterName = parameters.getParameter("parameter-name", "cocoon-portal-action");
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ConvertableEventAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ConvertableEventAspect.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ConvertableEventAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/ConvertableEventAspect.java
Mon Jun  6 02:55:12 2005
@@ -49,8 +49,10 @@
 
     protected ServiceManager manager;
 
-    public void service(ServiceManager manager) throws ServiceException
-    {
+    /**
+     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
+     */
+    public void service(ServiceManager manager) throws ServiceException {
         this.manager = manager;
     }
 
@@ -110,4 +112,4 @@
         }
         return event;
     }
-}
\ No newline at end of file
+}

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/NoClientCachingEventAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/NoClientCachingEventAspect.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/NoClientCachingEventAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/NoClientCachingEventAspect.java
Mon Jun  6 02:55:12 2005
@@ -27,17 +27,17 @@
  * This aspect implementation sets some headers on the response that tell
  * clients/proxies to not cache. This "disables" the back button on the
  * client.
- * 
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
- * 
- * @version CVS $Id: NoClientCachingEventAspect.java,v 1.2 2004/04/07 12:03:46 cziegeler
Exp $
+ *
+ * @version CVS $Id$
  */
 public class NoClientCachingEventAspect
 	extends AbstractLogEnabled
-	implements EventAspect, 
-                ThreadSafe {
+	implements EventAspect,
+               ThreadSafe {
 
-    /* (non-Javadoc)
+    /**
 	 * @see org.apache.cocoon.portal.event.aspect.EventAspect#process(org.apache.cocoon.portal.event.aspect.EventAspectContext,
org.apache.cocoon.portal.PortalService)
 	 */
 	public void process(EventAspectContext context, PortalService service) {
@@ -47,9 +47,7 @@
         response.addHeader("Cache-Control", "no-store");
         response.setHeader("Pragma", "no-cache");
         response.setHeader("Expires", "Thu, 01 Jan 2000 00:00:00 GMT");
-        
+
         context.invokeNext(service);
 	}
-
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/PageLabelEventAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/PageLabelEventAspect.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/PageLabelEventAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/PageLabelEventAspect.java
Mon Jun  6 02:55:12 2005
@@ -28,7 +28,7 @@
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.impl.PageLabelManager;
 import org.apache.cocoon.portal.event.Event;
-import org.apache.cocoon.portal.event.Publisher;
+import org.apache.cocoon.portal.event.EventManager;
 import org.apache.cocoon.portal.event.aspect.EventAspect;
 import org.apache.cocoon.portal.event.aspect.EventAspectContext;
 
@@ -39,23 +39,28 @@
  *
  * @author Ralph Goers
  *
- * @version CVS $Id:  $
+ * @version CVS $Id:$
  */
-public class PageLabelEventAspect extends AbstractLogEnabled
+public class PageLabelEventAspect
+    extends AbstractLogEnabled
 	implements EventAspect, ThreadSafe, Serviceable, Disposable {
 
     protected ServiceManager manager;
 
     protected PageLabelManager labelManager;
 
-    public void service(ServiceManager manager) throws ServiceException
-    {
+    /**
+     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
+     */
+    public void service(ServiceManager manager) throws ServiceException {
         this.manager = manager;
         this.labelManager = (PageLabelManager)manager.lookup(PageLabelManager.ROLE);
     }
 
-    public void dispose()
-    {
+    /**
+     * @see org.apache.avalon.framework.activity.Disposable#dispose()
+     */
+    public void dispose() {
         if (this.manager != null) {
             if (this.labelManager != null) {
                 this.manager.release(this.labelManager);
@@ -65,12 +70,12 @@
         }
     }
 
-	/* (non-Javadoc)
+	/**
 	 * @see org.apache.cocoon.portal.event.aspect.EventAspect#process(org.apache.cocoon.portal.event.aspect.EventAspectContext,
org.apache.cocoon.portal.PortalService)
 	 */
 	public void process(EventAspectContext context, PortalService service) {
         if (this.labelManager != null) {
-            final Publisher publisher = context.getEventPublisher();
+            final EventManager publisher = service.getComponentManager().getEventManager();
             final Request request = ObjectModelHelper.getRequest(context.getObjectModel());
             final String parameterName = this.labelManager.getRequestParameterName();
 
@@ -85,7 +90,7 @@
                     // Publish all the events for this page label.
                     while (iter.hasNext()) {
                         Event event = (Event) iter.next();
-                        publisher.publish(event);
+                        publisher.send(event);
                     }
             //        return;
                 }
@@ -94,4 +99,4 @@
 
         context.invokeNext( service );
 	}
-}
\ No newline at end of file
+}

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/RequestParameterEventAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/RequestParameterEventAspect.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/RequestParameterEventAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/RequestParameterEventAspect.java
Mon Jun  6 02:55:12 2005
@@ -26,7 +26,7 @@
 import org.apache.cocoon.portal.LinkService;
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.event.Event;
-import org.apache.cocoon.portal.event.Publisher;
+import org.apache.cocoon.portal.event.EventManager;
 import org.apache.cocoon.portal.event.aspect.EventAspect;
 import org.apache.cocoon.portal.event.aspect.EventAspectContext;
 
@@ -41,24 +41,26 @@
 	extends AbstractLogEnabled
 	implements EventAspect, ThreadSafe {
 
-    protected void process(EventAspectContext context, Request request, String parameterName)
{
+    protected void process(EventAspectContext context,
+                           PortalService      service,
+                           Request            request, 
+                           String             parameterName) {
         String[] values = request.getParameterValues( parameterName );
+        final EventManager publisher = service.getComponentManager().getEventManager();
         if ( values != null ) {
-            final Publisher publisher = context.getEventPublisher();
             for(int i=0; i<values.length; i++) {
                 final String current = values[i];
                 final Event e = context.getEventConverter().decode(current);
                 if ( null != e) {
-                    publisher.publish(e);
+                    publisher.send(e);
                 }
             }
         } else {
             List list = (List) request.getAttribute("org.apache.cocoon.portal." + parameterName);
             if (list != null) {
                 Event[] events = (Event[]) list.toArray(new Event[0]);
-                final Publisher publisher = context.getEventPublisher();
                 for (int i = 0; i < events.length; i++) {
-                    publisher.publish(events[i]);
+                    publisher.send(events[i]);
                 }
             }
         }
@@ -76,13 +78,13 @@
         StringTokenizer tokenizer = new StringTokenizer(requestParameterNames, ", ");
         while ( tokenizer.hasMoreTokens() ) {
             final String currentName = tokenizer.nextToken();
-            this.process(context, request, currentName);
+            this.process(context, service, request, currentName);
             if ( LinkService.DEFAULT_REQUEST_EVENT_PARAMETER_NAME.equals(currentName) ) {
                 processedDefault = true;
             }
         }
         if ( !processedDefault ) {
-            this.process( context, request, LinkService.DEFAULT_REQUEST_EVENT_PARAMETER_NAME
);
+            this.process( context, service, request, LinkService.DEFAULT_REQUEST_EVENT_PARAMETER_NAME
);
         }
         context.invokeNext( service );        
 	}

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManager.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortletPortalManager.java
Mon Jun  6 02:55:12 2005
@@ -37,10 +37,9 @@
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.environment.http.HttpEnvironment;
 import org.apache.cocoon.portal.PortalManager;
-import org.apache.cocoon.portal.event.Event;
+import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.event.EventManager;
-import org.apache.cocoon.portal.event.Filter;
-import org.apache.cocoon.portal.event.Subscriber;
+import org.apache.cocoon.portal.event.Receiver;
 import org.apache.cocoon.portal.pluto.PortletContainerEnvironmentImpl;
 import org.apache.cocoon.portal.pluto.PortletURLProviderImpl;
 import org.apache.cocoon.portal.pluto.servlet.ServletRequestImpl;
@@ -58,15 +57,15 @@
 import org.xml.sax.SAXException;
 
 /**
- * Extends the PortalManager by initializing Pluto
- * 
+ * Extends the PortalManager by initializing Pluto.
+ *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * 
+ *
  * @version CVS $Id$
  */
 public class PortletPortalManager
 	extends PortalManagerImpl
-	implements Initializable, Contextualizable, Disposable, Subscriber {
+	implements Initializable, Contextualizable, Disposable, Receiver {
 
     public static final ThreadLocal copletInstanceData = new InheritableThreadLocal();
     
@@ -109,7 +108,7 @@
         EventManager eventManager = null;
         try {
             eventManager = (EventManager)this.manager.lookup(EventManager.ROLE);
-            eventManager.getRegister().subscribe(this);
+            eventManager.subscribe(this);
         } finally {
             this.manager.release(eventManager);
         }
@@ -123,7 +122,7 @@
             EventManager eventManager = null;
             try {
                 eventManager = (EventManager)this.manager.lookup(EventManager.ROLE);
-                eventManager.getRegister().unsubscribe(this);
+                eventManager.unsubscribe(this);
             } catch (Exception ignore) {
                 // let's ignore it
             } finally {
@@ -249,31 +248,16 @@
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.cocoon.portal.event.Subscriber#getEventType()
-     */
-    public Class getEventType() {
-        return PortletURLProviderImpl.class;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.cocoon.portal.event.Subscriber#getFilter()
-     */
-    public Filter getFilter() {
-        return null;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.cocoon.portal.event.Subscriber#inform(org.apache.cocoon.portal.event.Event)
+    /**
+     * @see Receiver
      */
-    public void inform(Event e) {
-        PortletURLProviderImpl event = (PortletURLProviderImpl)e;
+    public void inform(PortletURLProviderImpl event, PortalService service) {
         final Map objectModel = ContextHelper.getObjectModel(this.context);
         final ServletRequestImpl req = new ServletRequestImpl((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT),
event);
         final HttpServletResponse res = new ServletResponseImpl((HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT));
         objectModel.put("portlet-response",  res);
         objectModel.put("portlet-request", req);        
-        
+
         if ( event.isAction() ) {
             // This means we can only have ONE portlet event per request!
             objectModel.put("portlet-event", event);
@@ -281,7 +265,7 @@
             DynamicInformationProvider dynProv;
             InformationProviderService ips;
             PortletActionProvider pap;
-            
+
             ips = (InformationProviderService)this.portletContainerEnvironment.getContainerService(InformationProviderService.class);
             dynProv = ips.getDynamicProvider(req);
             pap = dynProv.getPortletActionProvider(event.getPortletWindow());

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/CompositeLayout.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/CompositeLayout.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/CompositeLayout.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/CompositeLayout.java Mon
Jun  6 02:55:12 2005
@@ -79,7 +79,7 @@
     String getItemClassName();
     
     /**
-     * @param itemClassName The item class name to set.
+     * @param value The item class name to set.
      */
     void setItemClassName(String value);
     

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java
Mon Jun  6 02:55:12 2005
@@ -120,7 +120,7 @@
     }
     
     /**
-     * @param itemClassName The item class name to set.
+     * @param value The item class name to set.
      */
     public void setItemClassName(String value) {
         this.itemClassName = value;

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=180282&r1=180281&r2=180282&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
Mon Jun  6 02:55:12 2005
@@ -425,7 +425,7 @@
                     if ( layout.equals(service.getEntryLayout(null)) ) {
                         Event event = new FullScreenCopletEvent(((CopletLayout)layout).getCopletInstanceData(),
null);
                         eventManager = (EventManager)this.manager.lookup(EventManager.ROLE);
-                        eventManager.getPublisher().publish(event);
+                        eventManager.send(event);
                         service.getComponentManager().getLinkService().addEventToLink(event);
                     }
                     CopletFactory factory = service.getComponentManager().getCopletFactory();

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
Mon Jun  6 02:55:12 2005
@@ -60,7 +60,7 @@
     /**
      * Delets the Object with the id in the layout
      * @param id 
-     * @return
+     * @return true if the object could be deleted.
      */
 	public boolean del(String id) {
 		
@@ -108,7 +108,7 @@
 	 * Moves the object one position up or down
 	 * @param id id of the element
 	 * @param moveUp set 'true', to move the element up ('false' to move it down)
-	 * @return 
+	 * @return true if the object could be moved.
 	 */
 	public boolean move(String id, boolean moveUp) {
 		
@@ -299,7 +299,9 @@
 				   cl.addItem(item);
 			   }
 			   
-			} catch (ProcessingException e) {}
+			} catch (ProcessingException e) {
+                // ignore it
+            }
 		}
 		return copletDatas;
     }
@@ -308,9 +310,8 @@
         Object obj = getLayoutElement(layout, id, "", 1);
         if(obj instanceof CopletLayout) {
             return ((CopletLayout) obj).getCopletInstanceData();
-        } else {
-            return null;    
         }
+        return null;    
     }
     
     /**

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java
Mon Jun  6 02:55:12 2005
@@ -38,7 +38,9 @@
 		DocumentFragment df = null;
 		try {
 			df = context.getXML ("/authentication/");
-		} catch (Exception e) {}
+		} catch (Exception e) {
+            // we ignore it for now
+        }
 		
 		grabAuthContext (df.getFirstChild(),ub);
 		

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java
Mon Jun  6 02:55:12 2005
@@ -30,6 +30,7 @@
 	
 	
     public UserBean () {
+        // empty constructor
     }
     
     /**
@@ -55,14 +56,13 @@
 	 * return specified context value
 	 * 
 	 * @param key 
-	 * @return
+	 * @return context item
 	 */
 	public String getContextItem (String key) {
 		if (this.context.get(key) != null) {
 			return ((ContextItem) this.context.get(key)).getValue();
-        } else {
-			return "";
         }
+		return "";
 	}
 	
 	/**

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java Mon Jun 
6 02:55:12 2005
@@ -300,6 +300,7 @@
             try {
                 Thread.currentThread().setContextClassLoader(this.classLoader);
             } catch (Exception e) {
+                // ignore it
             }
         }
 
@@ -449,15 +450,11 @@
                 ctxMap.clear();
             }
 
-            try {
-                if (request instanceof MultipartActionRequest) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("Deleting uploaded file(s).");
-                    }
-                    ((MultipartActionRequest) request).cleanup();
+            if (request instanceof MultipartActionRequest) {
+                if (getLogger().isDebugEnabled()) {
+                    getLogger().debug("Deleting uploaded file(s).");
                 }
-            } catch (IOException e) {
-                getLogger().error("Cocoon got an Exception while trying to cleanup the uploaded
files.", e);
+                ((MultipartActionRequest) request).cleanup();
             }
         }
     }
@@ -475,6 +472,7 @@
             try {
                 Thread.currentThread().setContextClassLoader(this.classLoader);
             } catch (Exception e) {
+                // ignore it
             }
         }
 
@@ -628,15 +626,11 @@
                 ctxMap.clear();
             }
 
-            try {
-                if (request instanceof MultipartActionRequest) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("Deleting uploaded file(s).");
-                    }
-                    ((MultipartActionRequest) request).cleanup();
+            if (request instanceof MultipartActionRequest) {
+                if (getLogger().isDebugEnabled()) {
+                    getLogger().debug("Deleting uploaded file(s).");
                 }
-            } catch (IOException e) {
-                getLogger().error("Cocoon got an Exception while trying to cleanup the uploaded
files.", e);
+                ((MultipartActionRequest) request).cleanup();
             }
 
             try {

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java Mon
Jun  6 02:55:12 2005
@@ -460,15 +460,11 @@
                 ctxMap.clear();
             }
 
-            try {
-                if (request instanceof MultipartActionRequest) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("Deleting uploaded file(s).");
-                    }
-                    ((MultipartActionRequest) request).cleanup();
+            if (request instanceof MultipartActionRequest) {
+                if (getLogger().isDebugEnabled()) {
+                    getLogger().debug("Deleting uploaded file(s).");
                 }
-            } catch (IOException e) {
-                getLogger().error("Cocoon got an Exception while trying to cleanup the uploaded
files.", e);
+                ((MultipartActionRequest) request).cleanup();
             }
         }
     }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java Mon Jun
 6 02:55:12 2005
@@ -25,7 +25,7 @@
 import org.apache.commons.lang.SystemUtils;
 
 /**
- * This helper class initializes the {@link Settings} object from the servlet
+ * This helper class initializes the {@link MutableSettings} object from the servlet
  * configuration.
  * 
  * @version SVN $Id$

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/multipart/MultipartActionRequest.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/multipart/MultipartActionRequest.java?rev=180282&r1=180281&r2=180282&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/multipart/MultipartActionRequest.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/multipart/MultipartActionRequest.java
Mon Jun  6 02:55:12 2005
@@ -40,7 +40,7 @@
  * Portlet action request wrapper for multipart parser.
  *
  * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
- * @version CVS $Id: MultipartActionRequest.java,v 1.2 2004/03/05 13:02:17 bdelacretaz Exp
$
+ * @version CVS $Id$
  */
 public class MultipartActionRequest implements ActionRequest {
 
@@ -62,7 +62,7 @@
     /**
      * Cleanup eventually uploaded parts that were saved on disk
      */
-    public void cleanup() throws IOException {
+    public void cleanup() {
         Enumeration e = getParameterNames();
         while (e.hasMoreElements()) {
             Object o = get((String) e.nextElement());
@@ -87,9 +87,8 @@
             if (result instanceof Vector) {
                 if (((Vector) result).size() == 1) {
                     return ((Vector) result).elementAt(0);
-                } else {
-                    return result;
                 }
+                return result;
             }
         }
 
@@ -120,9 +119,8 @@
     public Enumeration getParameterNames() {
         if (values != null) {
             return values.keys();
-        } else {
-            return request.getParameterNames();
         }
+        return request.getParameterNames();
     }
 
     /**
@@ -162,15 +160,13 @@
                     }
                     return results;
 
-                } else {
-                    return new String[]{value.toString()};
                 }
+                return new String[]{value.toString()};
             }
 
             return null;
-        } else {
-            return request.getParameterValues(name);
         }
+        return request.getParameterValues(name);
     }
 
     /**



Mime
View raw message