cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r468530 - in /cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal: event/ event/aspect/ event/impl/ services/aspects/
Date Fri, 27 Oct 2006 20:43:30 GMT
Author: cziegeler
Date: Fri Oct 27 13:43:29 2006
New Revision: 468530

URL: http://svn.apache.org/viewvc?view=rev&rev=468530
Log:
Some comments

Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/EventManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspect.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspectContext.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/EventManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/EventManager.java?view=diff&rev=468530&r1=468529&r2=468530
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/EventManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/EventManager.java
Fri Oct 27 13:43:29 2006
@@ -36,7 +36,7 @@
     String ROLE = EventManager.class.getName(); 
 
     /**
-     * Process the events
+     * Process the events.
      */
     void processEvents()
     throws ProcessingException;

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspect.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspect.java?view=diff&rev=468530&r1=468529&r2=468530
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspect.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspect.java
Fri Oct 27 13:43:29 2006
@@ -16,13 +16,29 @@
  */
 package org.apache.cocoon.portal.event.aspect;
 
+import org.apache.cocoon.portal.event.EventManager;
+
 /**
+ * An event aspect can be used to extend the functionality of an {@link EventManager}
+ * without the need to change the current implementation of the event manager.
+ *
+ * Each event manager implementation can be configured with a set of event aspects.
+ * The aspects are lined up in a chain and the event manager invokes the first event
+ * aspect for each call to {@link EventManager#processEvents()}.
+ * As the aspects are chained up, it's the responsibility of an event aspect to
+ * invoke the next aspect in the chain. However, depending on the functionality
+ * and implementation of the aspect, it's up to the aspect to decide whether it's
+ * appropriate to invoke the next aspect in the chain. To invoke the next aspect,
+ * {@link EventAspectContext#invokeNext()} has to be called.
  *
  * @version $Id$
  */
 public interface EventAspect {
 
-    String ROLE = EventAspect.class.getName();
-
+    /**
+     * Process the current event phase.
+     * @param context The event aspect context to access environment information and invoke
+     *                the next event aspect in the chain.
+     */
     void process(EventAspectContext context);
 }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspectContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspectContext.java?view=diff&rev=468530&r1=468529&r2=468530
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspectContext.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/EventAspectContext.java
Fri Oct 27 13:43:29 2006
@@ -19,6 +19,9 @@
 import org.apache.cocoon.portal.services.aspects.BasicAspectContext;
 
 /**
+ * The context for an event aspect.
+ * An event aspect can call the next aspect in the chain by calling {@link #invokeNext()}.
+ * @see BasicAspectContext
  *
  * @version $Id$
  */
@@ -26,7 +29,7 @@
     extends BasicAspectContext {
 
     /**
-     * Invoke next aspect 
+     * Invoke next aspect in the chain. 
      */
     void invokeNext();
 }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java?view=diff&rev=468530&r1=468529&r2=468530
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
Fri Oct 27 13:43:29 2006
@@ -132,6 +132,7 @@
             }
             this.configuration = null;
         }
+        // now process event aspects
         DefaultEventAspectContext eventContext = new DefaultEventAspectContext(this.portalService,
this.chain);
         eventContext.invokeNext();
     }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java?view=diff&rev=468530&r1=468529&r2=468530
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/aspects/BasicAspectContext.java
Fri Oct 27 13:43:29 2006
@@ -22,6 +22,8 @@
 
 /**
  * The base interface for all aspect contexts.
+ * This interface provides basic access to some environment information like
+ * the current {@link PortalService} and the configuration for the aspect.
  *
  * @since 2.2
  * @version $Id$



Mime
View raw message