cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r312946 - in /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal: bridges/ event/aspect/impl/ event/impl/ impl/ layout/
Date Tue, 11 Oct 2005 19:57:54 GMT
Author: cziegeler
Date: Tue Oct 11 12:57:27 2005
New Revision: 312946

URL: http://svn.apache.org/viewcvs?rev=312946&view=rev
Log:
New event manager which should be a little bit faster and should have less concurrency problems
Code formatting

Modified:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/bridges/ServletContextProviderImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractLayout.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractParameters.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/CompositeLayout.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Item.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Layout.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutDescription.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutException.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutFactory.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/NamedItem.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Parameters.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/SkinDescription.java

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/bridges/ServletContextProviderImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/bridges/ServletContextProviderImpl.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/bridges/ServletContextProviderImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/bridges/ServletContextProviderImpl.java
Tue Oct 11 12:57:27 2005
@@ -30,7 +30,7 @@
 /**
  * This is the "bridge" to the bridges project.
  *
- * @version CVS $Id:$
+ * @version $Id$
  */
 public class ServletContextProviderImpl implements ServletContextProvider {
 
@@ -54,5 +54,4 @@
     public ServletContext getServletContext(GenericPortlet portlet) {
         return ((PortletContextImpl)portlet.getPortletContext()).getServletContext();
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java
Tue Oct 11 12:57:27 2005
@@ -39,11 +39,11 @@
     }
 
     /**
-     * @see org.apache.cocoon.portal.event.aspect.impl.AbstractContentEventAspect#publish(org.apache.cocoon.portal.event.Publisher,
org.apache.cocoon.portal.layout.Layout, java.lang.String[])
+     * @see org.apache.cocoon.portal.event.aspect.impl.AbstractContentEventAspect#publish(EventManager,
org.apache.cocoon.portal.layout.Layout, java.lang.String[])
      */
     protected void publish(EventManager publisher,
-                             Layout layout,
-                              String[] values) {
+                           Layout layout,
+                           String[] values) {
         if (layout instanceof LinkLayout) {
             LinkLayout linkLayout = (LinkLayout) layout;
             Event e = new ChangeAspectDataEvent(linkLayout,

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
Tue Oct 11 12:57:27 2005
@@ -50,10 +50,10 @@
 
 /**
  * This is the default implementation of the event manager.
- * 
+ *
  * @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 $Id$
  */
 public class DefaultEventManager 
@@ -66,30 +66,24 @@
                 Disposable,
                 Contextualizable {
 
-    /** The list of all receivers */
-    private Map receivers = new HashMap();
+    /** The service manager. */
+    protected ServiceManager manager;
+
+    /** Our configuration. */
+    protected Configuration configuration;
 
-    private ServiceManager manager;
-    private Configuration configuration;
-    
     protected EventAspectChain chain;
-    
+
     protected ServiceSelector aspectSelector;
 
     protected Context context;
 
-    /** The portal service */
+    /** The portal service. */
     protected PortalService service;
 
-    /** Introspected receiver classes */
+    /** Introspected receiver classes. */
     protected Map receiverClasses = new HashMap();
 
-    /** Are we currently processing events? */
-    protected int isSendingEvents = 0;
-
-    /** Additional receivers if we are currenlty sending events. */
-    protected List additionalReceiverClasses = new ArrayList();
-
     /** Map of all event classes and their corresponding receivers. */
     protected Map eventHierarchy = new HashMap();
 
@@ -137,8 +131,8 @@
      */
     public void initialize()
     throws Exception {
-        // create tree of all Events
-        // this.getHierarchyInfo(Event.class);
+        // we create a tree of all events - we initialize this with the root class
+        this.getHierarchyInfo(Event.class);
 
         // subscribe all configured receiver roles
         Configuration roles = this.configuration.getChild("receiver-roles", false);
@@ -173,7 +167,6 @@
                 this.subscribe(receiver);
             }
         }
-
     }
 
     /**
@@ -201,7 +194,7 @@
             converter = (EventConverter) this.manager.lookup(EventConverter.ROLE);
 
             converter.start();
-            
+
             // Invoke aspects
             context.setObjectModel(this.getObjectModel());
             context.setEventConverter(converter);
@@ -215,7 +208,6 @@
             this.manager.release(converter);
             this.manager.release(service);
         }
-
     }
 
     /**
@@ -231,44 +223,45 @@
      */
     public void send(Event event) {
         if ( getLogger().isDebugEnabled() ) {
-            getLogger().debug("Publishing event " + event.getClass());
+            getLogger().debug("Publishing event " + event);
         }
-        this.isSendingEvents++;
-        try {
-            for (Iterator re = receivers.entrySet().iterator(); re.hasNext(); ) {
-                final Map.Entry current = (Map.Entry)re.next();
-                final Receiver receiver = (Receiver)current.getKey();
-                final List methodInfos = (List)current.getValue();
-                boolean found = false;
-                final Iterator ci = methodInfos.iterator();
-                while ( !found && ci.hasNext() ) {
-                    final MethodInfo info = (MethodInfo)ci.next();
-                    if ( info.eventClass.isAssignableFrom(event.getClass()) ) {
-                        if ( getLogger().isDebugEnabled() ) {
-                            getLogger().info("Informing receiver "+receiver+" of event "+event.getClass());
-                        }
-                        try {
-                            info.method.invoke(receiver, new Object[] {event, this.service});
-                        } catch (Exception ignore) {
-                            this.getLogger().warn("Exception during event dispatching on
receiver " + receiver
-                                                 +" and event " + event, ignore);
-                        }
-                        found = true;
+        final HierarchyInfo info = this.getHierarchyInfo(event.getClass());
+        this.send(event, info, true);
+    }
+
+    protected void send(Event event, HierarchyInfo hierarchy, boolean recursive) {
+        final List receivers = hierarchy.getReceivers();
+        int index = 0;
+        // we don't use an iterator to avoid problems if a receiver is added while we're
sending
+        // events.
+        while ( index < receivers.size() ) {
+            final Receiver receiver = (Receiver)receivers.get(index);
+            final List methodInfos = (List)this.receiverClasses.get(receiver.getClass().getName());
+            boolean found = false;
+            final Iterator ci = methodInfos.iterator();
+            while ( !found && ci.hasNext() ) {
+                final MethodInfo info = (MethodInfo)ci.next();
+                if ( info.eventClass.isAssignableFrom(event.getClass()) ) {
+                    if ( getLogger().isDebugEnabled() ) {
+                        getLogger().info("Informing receiver "+receiver+" of event "+event.getClass());
                     }
+                    try {
+                        info.method.invoke(receiver, new Object[] {event, this.service});
+                    } catch (Exception ignore) {
+                        this.getLogger().warn("Exception during event dispatching on receiver
" + receiver
+                                             +" and event " + event, ignore);
+                    }
+                    found = true;
                 }
             }
-        } finally {
-            this.isSendingEvents--;
-            if ( this.isSendingEvents == 0 && this.additionalReceiverClasses.size()
> 0) {
-                List copy = null;
-                synchronized ( this.additionalReceiverClasses ) {
-                    copy = new ArrayList(this.additionalReceiverClasses);
-                    this.additionalReceiverClasses.clear();
-                }
-                final Iterator i = copy.iterator();
-                while (i.hasNext() ) {
-                    this.subscribe((Receiver)i.next());
-                }
+            index++;
+        }
+        // now call listeners for parents
+        if ( recursive ) {
+            final Iterator parentIterator = hierarchy.getParents().iterator();
+            while ( parentIterator.hasNext() ) {
+                final HierarchyInfo current = (HierarchyInfo)parentIterator.next();
+                this.send(event, current, false);
             }
         }
     }
@@ -294,45 +287,38 @@
                             info.eventClass = params[0];
                             info.method = current;
                             result.add(info);
-                            // HierarchyInfo hi = this.getHierarchyInfo(info.eventClass);
-                            // this.print(hi);
+                            // create the hierarchy info for the event class
+                            this.getHierarchyInfo(info.eventClass);
                         }
                     }
                 }
             }
             if ( result.size() == 0 ) {
                 result = null;
+            } else {
+                this.receiverClasses.put(receiverClass.getName(), result);
             }
         }
         return result;
     }
- 
+
     /**
      * @see org.apache.cocoon.portal.event.EventManager#subscribe(org.apache.cocoon.portal.event.Receiver)
      */
     public void subscribe(Receiver receiver) {
-        // if we are currently sending events, we just store the receiver
-        // and add it later on
-        if ( this.isSendingEvents > 0 ) {
-            synchronized ( this.additionalReceiverClasses ) {
-                this.additionalReceiverClasses.add(receiver);
-                return;
-            }
-        }
-
         List infos = this.introspect(receiver.getClass());
         if ( infos == null ) {
             throw new RuntimeException("Invalid event receiver type: " + receiver);
         }
 
         // Add to list but prevent duplicate subscriptions
-        List eventClassesForReceiver = (List)this.receivers.get(receiver);
-        if ( eventClassesForReceiver == null ) {
-            this.receivers.put(receiver, infos);
-        }
-        if ( getLogger().isDebugEnabled() ) {
-            for(int i=0; i<infos.size();i++) {
-                getLogger().debug( "Receiver " + receiver + " subscribed for event: " + ((MethodInfo)infos.get(i)).eventClass.getName()
);
+        final Iterator i = infos.iterator();
+        while ( i.hasNext() ) {
+            final MethodInfo info = (MethodInfo)i.next();
+            final HierarchyInfo hierarchy = this.getHierarchyInfo(info.eventClass);
+            hierarchy.addToReceivers(receiver);
+            if ( getLogger().isDebugEnabled() ) {
+                getLogger().debug( "Receiver " + receiver + " subscribed for event: " + info.eventClass.getName()
);
             }
         }
     }
@@ -341,10 +327,19 @@
      * @see org.apache.cocoon.portal.event.EventManager#unsubscribe(org.apache.cocoon.portal.event.Receiver)
      */
     public void unsubscribe(Receiver receiver) {
-        if ( getLogger().isDebugEnabled() ) {
-            getLogger().debug( "Receiver " + receiver + " unsubscribed.");
+        // unsubscribing is a costly operation
+        List infos = this.introspect(receiver.getClass());
+        if ( infos != null ) {
+            final Iterator i = infos.iterator();
+            while ( i.hasNext() ) {
+                final MethodInfo info = (MethodInfo)i.next();
+                final HierarchyInfo hierarchy = this.getHierarchyInfo(info.eventClass);
+                hierarchy.removeFromReceivers(receiver);
+                if ( getLogger().isDebugEnabled() ) {
+                    getLogger().debug( "Receiver " + receiver + " unsubscribed from event:
" + info.eventClass.getName() );
+                }
+            }
         }
-        this.receivers.remove(receiver);
     }
 
     /**
@@ -368,20 +363,6 @@
         return info;
     }
 
-    protected void print(HierarchyInfo info) {
-        if ( info.className.equals(Event.class.getName())) return;
-        System.out.println("-------------------------------- " + info.className);
-        if ( info.getParents().size() == 0 ) return;
-        System.out.println("Parents: ");
-        Iterator i = info.getParents().iterator();
-        while ( i.hasNext() ) {
-            HierarchyInfo c = (HierarchyInfo)i.next();
-            System.out.println("  " + c.className);
-        }
-        System.out.println("===============================================================");
-        System.out.println();
-    }
-
     protected void addToHierarchy(HierarchyInfo info, Class c) {
         if ( c != null && Event.class.isAssignableFrom(c) ) {
             final HierarchyInfo parent = this.getHierarchyInfo(c);
@@ -410,14 +391,22 @@
             this.className = className;
         }
 
+        public void removeFromReceivers(Receiver receiver) {
+            if ( this.receivers != null ) {
+                this.receivers.remove(receiver);
+            }
+        }
+
         public synchronized void addToReceivers(Receiver r) {
             if ( this.receivers == null ) {
                 this.receivers = new ArrayList();
             }
-            this.receivers.add(r);
+            if ( !this.receivers.contains(r)) {
+                this.receivers.add(r);
+            }
         }
 
-        public synchronized void addToParents(HierarchyInfo i) {
+        public void addToParents(HierarchyInfo i) {
             if ( this.parents == null ) {
                 this.parents = new ArrayList();
             }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java Tue
Oct 11 12:57:27 2005
@@ -19,6 +19,8 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
@@ -27,20 +29,17 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.avalon.framework.CascadingRuntimeException;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.components.ContextHelper;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.portal.PortalException;
-import org.apache.cocoon.portal.layout.Layout;
+import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.portal.event.impl.ChangeAspectDataEvent;
 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.NamedItem;
-import org.apache.cocoon.portal.event.impl.ChangeAspectDataEvent;
 import org.apache.cocoon.util.HashMap;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.components.ContextHelper;
 
 /**
  * Manages the various activities required for page labels.

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractLayout.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractLayout.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractLayout.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractLayout.java Tue
Oct 11 12:57:27 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,36 +26,35 @@
 import org.apache.pluto.om.common.Parameter;
 
 /**
+ * FIXME - We have to remove the dependency to pluto
  *
  * @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$
+ *
+ * @version $Id$
  */
 public abstract class AbstractLayout
     extends AbstractProducible 
     implements Layout, Parameters {
-    
+
     protected String rendererName;
-    
+
     protected Item parent;
-    
+
     protected Map parameters = new LinkedMap();
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.layout.Parameters#getParameters()
      */
     public final Map getParameters() {
         return parameters;
     }
 
-    public final Set getCastorParameters()
-    {
+    public final Set getCastorParameters() {
         Set set = new HashSet(this.parameters.size());
         Iterator iterator = this.parameters.entrySet().iterator();
         Map.Entry entry;
-        while (iterator.hasNext())
-        {
+        while (iterator.hasNext()) {
             entry = (Map.Entry) iterator.next();
             ParameterImpl param = new ParameterImpl();
             param.setName((String) entry.getKey());
@@ -65,8 +64,7 @@
         return set;
     }
 
-    public void addParameter(Parameter parameter)
-    {
+    public void addParameter(Parameter parameter) {
         parameters.put(parameter.getName(), parameter.getValue());
     }
 
@@ -83,38 +81,37 @@
     public void setLayoutRendererName(String value) {
 		this.rendererName = value;
 	}
-    
+
     public Item getParent() {
         return this.parent;
     }
-    
+
     public void setParent(Item item) {
         this.parent = item;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.layout.Layout#getLayoutRendererName()
      */
     public String getLayoutRendererName() {
         return this.rendererName;
     }
 
-    
-    /* (non-Javadoc)
+    /**
      * @see java.lang.Object#clone()
      */
     protected Object clone() throws CloneNotSupportedException {
         AbstractLayout clone = (AbstractLayout)super.clone();
-        
+
         // we don't clone the parent; we just set it to null
         clone.rendererName = this.rendererName;
         clone.parameters = new LinkedMap(this.parameters);
         clone.parent = null;
-        
+
         return clone;
     }
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.layout.Layout#copy()
      */
     public Layout copy() {

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractParameters.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractParameters.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractParameters.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/AbstractParameters.java
Tue Oct 11 12:57:27 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,15 +28,15 @@
  *
  * @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$
+ *
+ * @version $Id$
  */
 public abstract class AbstractParameters 
     implements Parameters, Cloneable {
 
     protected Map parameters = new LinkedMap();
-     
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.layout.Parameters#getParameters()
      */
     public final Map getParameters() {
@@ -47,8 +47,7 @@
         Set set = new HashSet(this.parameters.size());
         Iterator iterator = this.parameters.entrySet().iterator();
         Map.Entry entry;
-        while (iterator.hasNext())
-        {
+        while (iterator.hasNext()) {
             entry = (Map.Entry) iterator.next();
             ParameterImpl param = new ParameterImpl();
             param.setName((String)entry.getKey());
@@ -62,14 +61,14 @@
         parameters.put(parameter.getName(), parameter.getValue());
     }
 
-    /* (non-Javadoc)
+    /**
      * @see java.lang.Object#clone()
      */
     protected Object clone() throws CloneNotSupportedException {
         AbstractParameters clone = (AbstractParameters)super.clone();
-        
+
         clone.parameters = new LinkedMap(this.parameters);
-        
+
         return clone;
     }
 }

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=312946&r1=312945&r2=312946&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 Tue
Oct 11 12:57:27 2005
@@ -1,6 +1,6 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -17,14 +17,13 @@
 
 import java.util.List;
 
-
 /**
  * A composite layout is a layout that contains other layouts.
- * 
+ *
  * @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$
+ *
+ * @version $Id$
  */
 public interface CompositeLayout 
     extends Layout {
@@ -60,13 +59,13 @@
 	 * @return size
 	 */
 	int getSize();
-    
+
     /**
      * Remove an item
      * @param item
      */
     void removeItem(Item item);
-    
+
     /**
      * Create a new item.
      * This item is not added to the composite layout
@@ -77,10 +76,9 @@
      * @return Returns the item class name.
      */
     String getItemClassName();
-    
+
     /**
      * @param value The item class name to set.
      */
     void setItemClassName(String value);
-    
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Item.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Item.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Item.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Item.java Tue Oct 11 12:57:27
2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,15 +20,15 @@
  *
  * @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$
+ *
+ * @version $Id$
  */
 public class Item extends AbstractParameters {
-	
+
 	private Layout layout;
 
     private CompositeLayout parentLayout;
-    
+
 	/**
 	 * Returns the layout.
 	 * @return Layout
@@ -47,7 +47,7 @@
             layout.setParent(this);
         }
     }
-    
+
     public final CompositeLayout getParent() {
         return this.parentLayout;
     }
@@ -55,19 +55,19 @@
     public final void setParent(CompositeLayout layout) {
         this.parentLayout = layout;
     }
-        
-    /* (non-Javadoc)
+
+    /**
      * @see java.lang.Object#clone()
      */
     protected Object clone() throws CloneNotSupportedException {
         Item clone = (Item)super.clone();
-        
+
         clone.layout = null;
         clone.parentLayout = null;
-        
+
         return clone;
     }
-    
+
     public Item copy(CompositeLayout parent) {
         try {
             Item clone = (Item)this.clone();
@@ -82,5 +82,4 @@
         }
         return null;
     }
-    
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Layout.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Layout.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Layout.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Layout.java Tue Oct 11
12:57:27 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,8 +23,8 @@
  *
  * @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$
+ *
+ * @version $Id$
  */
 public interface Layout 
     extends Parameters, Producible, Aspectalizable {
@@ -36,13 +36,13 @@
      * @return String The role name
      */
     String getRendererName();
-    
+
     /** 
      * Get the name of a custom {@link org.apache.cocoon.portal.layout.renderer.Renderer}
for this layout.
      * @return String The role name
      */
     String getLayoutRendererName();
-    
+
     Item getParent();
 
     void setParent(Item item);
@@ -52,5 +52,4 @@
      * This includes copies of items and copletinstancedatas.
      */
     Layout copy();
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutDescription.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutDescription.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutDescription.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutDescription.java
Tue Oct 11 12:57:27 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,10 +22,10 @@
 
 /**
  * A configured layout
- * 
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public interface LayoutDescription
     extends ProducibleDescription, AspectalizableDescription  {
@@ -34,12 +34,12 @@
      * @return the default renderer name
      */
     String getDefaultRendererName();
-    
+
     /**
      * @return the names of all allowed renderers
      */
     Iterator getRendererNames();
-    
+
     /**
      * @return The class name of the item
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutException.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutException.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutException.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutException.java Tue
Oct 11 12:57:27 2005
@@ -21,9 +21,10 @@
  *
  * @author <a href="mailto:rgoers@apache.org">Ralph Goers</a>
  *
- * @version $Id: $
+ * @version $Id$
  */
 public class LayoutException extends PortalException {
+
     public LayoutException() {
         super();
     }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutFactory.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutFactory.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/LayoutFactory.java Tue
Oct 11 12:57:27 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,29 +20,29 @@
 import org.apache.cocoon.ProcessingException;
 
 /**
- * This factory is for creating and managing layout objects
- * 
+ * This factory is for creating and managing layout objects.
+ *
  * @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$
+ *
+ * @version $Id$
  */
 public interface LayoutFactory  {
-    
+
     String ROLE = LayoutFactory.class.getName();
-    
+
     /**
      * This method is invoked for a newly loaded profile
      */
     void prepareLayout(Layout layout);
-    
+
     /**
      * Create a new layout instance.
      * The instance is also registered at the profile manager.
      */
     Layout newInstance(String name)
     throws ProcessingException;
-    
+
     /**
      * Remove the layout instance.
      * The instance (and all childs) will also be unregistered from
@@ -50,7 +50,6 @@
      */
     void remove(Layout layout)
     throws ProcessingException;
-    
+
     List getLayoutDescriptions();
-    
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/NamedItem.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/NamedItem.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/NamedItem.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/NamedItem.java Tue Oct
11 12:57:27 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,8 +19,8 @@
  *
  * @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$
+ *
+ * @version $Id$
  */
 public class NamedItem extends Item {
 
@@ -42,15 +42,14 @@
 		this.name = name;
 	}
 
-    /* (non-Javadoc)
+    /**
      * @see java.lang.Object#clone()
      */
     protected Object clone() throws CloneNotSupportedException {
         NamedItem clone = (NamedItem)super.clone();
-        
+
         clone.name = this.name;
-        
+
         return clone;
     }
-    
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Parameters.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Parameters.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Parameters.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/Parameters.java Tue Oct
11 12:57:27 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,10 +21,11 @@
  *
  * @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: Parameters.java,v 1.2 2004/03/05 13:02:13 bdelacretaz Exp $
+ *
+ * @version $Id$
  */
 public interface Parameters {
+
     /**
      * Get custom parameters as List of
      * org.apache.cocoon.portal.layout.impl.Parameters. This method

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/SkinDescription.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/SkinDescription.java?rev=312946&r1=312945&r2=312946&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/SkinDescription.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/layout/SkinDescription.java Tue
Oct 11 12:57:27 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,46 +16,50 @@
 package org.apache.cocoon.portal.layout;
 
 /**
-*
-* @version CVS $Id: Parameters.java 30932 2004-07-29 17:35:38Z vgritsenko $
-*/
+ *
+ * @version $Id$
+ */
 public class SkinDescription {
 
     protected String name;
     protected String basePath;
     protected String thumbnailPath;
-    
-    
+
     /**
      * @return Returns the basePath.
      */
     public String getBasePath() {
         return basePath;
     }
+
     /**
      * @param basePath The basePath to set.
      */
     public void setBasePath(String basePath) {
         this.basePath = basePath;
     }
+
     /**
      * @return Returns the name.
      */
     public String getName() {
         return name;
     }
+
     /**
      * @param name The name to set.
      */
     public void setName(String name) {
         this.name = name;
     }
+
     /**
      * @return Returns the thumbnailPath.
      */
     public String getThumbnailPath() {
         return thumbnailPath;
     }
+
     /**
      * @param thumbnailPath The thumbnailPath to set.
      */



Mime
View raw message