cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r506481 - in /cocoon/trunk/blocks/cocoon-portal: cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/ cocoon-portal-impl/src/main/java/org/apache/cocoon/porta...
Date Mon, 12 Feb 2007 15:24:22 GMT
Author: cziegeler
Date: Mon Feb 12 07:24:21 2007
New Revision: 506481

URL: http://svn.apache.org/viewvc?view=rev&rev=506481
Log:
Convert the event convert from avalon to spring bean

Added:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertedEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/LayoutEvent.java
      - copied, changed from r505230, cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractBean.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/cocoon-portal-components.xml
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/spring/event-converter.xml
Removed:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutEvent.java
Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ComparableEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertableEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutAddedEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutJXPathEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutRemovedEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractComponent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/avalon/cocoon-portal-sample.xconf

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ComparableEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ComparableEvent.java?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ComparableEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ComparableEvent.java
Mon Feb 12 07:24:21 2007
@@ -17,7 +17,9 @@
 package org.apache.cocoon.portal.event;
 
 /**
- * Marker interface for portal event that is comparable.
+ * Marker interface for a portal event that is comparable.
+ * This interface should be used, if each url should only contain one (or zero)
+ * events of this specific type.
  *
  * @version $Id$
  */

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertableEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertableEvent.java?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertableEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertableEvent.java
Mon Feb 12 07:24:21 2007
@@ -19,6 +19,8 @@
 /**
  * Marker interface for portal event.
  *
+ * Each event should be convertable.
+ *
  * @version $Id$
  */
 public interface ConvertableEvent extends Event {

Added: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertedEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertedEvent.java?view=auto&rev=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertedEvent.java
(added)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/ConvertedEvent.java
Mon Feb 12 07:24:21 2007
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.portal.event;
+
+/**
+ * An instance of this class represents a converted event.
+ *
+ * @version $Id$
+ */
+public class ConvertedEvent {
+
+    protected final String key;
+    protected final String value;
+    protected final int ordering;
+
+    public ConvertedEvent(String key, String value, int ordering) {
+        this.key = key;
+        this.value = value;
+        this.ordering = ordering;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public int getOrdering() {
+        return ordering;
+    }
+}

Copied: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/LayoutEvent.java
(from r505230, cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutEvent.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/LayoutEvent.java?view=diff&rev=506481&p1=cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutEvent.java&r1=505230&p2=cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/LayoutEvent.java&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/LayoutEvent.java
Mon Feb 12 07:24:21 2007
@@ -20,9 +20,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.portal.event.layout;
+package org.apache.cocoon.portal.event;
 
-import org.apache.cocoon.portal.event.Event;
 import org.apache.cocoon.portal.om.Layout;
 
 /**

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventConverter.java
Mon Feb 12 07:24:21 2007
@@ -24,16 +24,12 @@
 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.configuration.ConfigurationException;
-import org.apache.avalon.framework.service.ServiceException;
 import org.apache.cocoon.portal.PortalRuntimeException;
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.event.ConvertableEvent;
 import org.apache.cocoon.portal.event.Event;
 import org.apache.cocoon.portal.event.EventConverter;
-import org.apache.cocoon.portal.impl.AbstractComponent;
+import org.apache.cocoon.portal.impl.AbstractBean;
 import org.apache.cocoon.util.ClassUtils;
 import org.apache.cocoon.util.HashUtil;
 
@@ -51,8 +47,8 @@
  * @version $Id$
  */
 public class DefaultEventConverter
-    extends AbstractComponent
-    implements EventConverter, Configurable {
+    extends AbstractBean
+    implements EventConverter {
 
     protected static final String EVENT_LIST = DefaultEventConverter.class.getName();
 
@@ -70,9 +66,37 @@
     /** All configured event converters. */
     protected Map converters = new HashMap();
 
+    /** The configured mappings. */
+    protected Map mappings;
+
     /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
+     * Set the mappings.
+     * A mapping is a key value pair consisting of a name as the key and a class
+     * name as a value.
+     */
+    public void setMappings(Map m) {
+        this.mappings = m;
+    }
+
+    /**
+     * Initialize this component.
      */
+    public void init() {
+        if ( this.mappings != null ) {
+            final Iterator i = this.mappings.entrySet().iterator();
+            while ( i.hasNext() ) {
+                final Map.Entry current = (Map.Entry)i.next();
+                final Constructor c = this.getConstructor(current.getValue().toString());
+                final long hash = HashUtil.hash(current.getValue().toString());
+                final String hashKey = Long.toString(hash);
+                this.factories.put(hashKey, current.getKey().toString());
+                this.factories.put(current.getKey().toString(), c);
+            }
+        }
+    }
+
+    /**
+     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
     public void configure(Configuration config) throws ConfigurationException {
         Configuration[] mappings = config.getChild("mappings").getChildren("mapping");
         for( int i=0; i<mappings.length; i++) {
@@ -107,10 +131,10 @@
             }
         }
     }
+    */
 
     /**
      * @see org.apache.cocoon.portal.impl.AbstractComponent#dispose()
-     */
     public void dispose() {
         if ( this.manager != null ) {
             final Iterator i = this.converters.values().iterator();
@@ -120,6 +144,7 @@
         }
         super.dispose();
     }
+     */
 
     protected Constructor getConstructor(String factory) {
         try {

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutAddedEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutAddedEvent.java?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutAddedEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutAddedEvent.java
Mon Feb 12 07:24:21 2007
@@ -16,6 +16,7 @@
  */
 package org.apache.cocoon.portal.event.layout;
 
+import org.apache.cocoon.portal.event.LayoutEvent;
 import org.apache.cocoon.portal.om.Layout;
 
 /**

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java
Mon Feb 12 07:24:21 2007
@@ -19,6 +19,7 @@
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.event.ComparableEvent;
 import org.apache.cocoon.portal.event.ConvertableEvent;
+import org.apache.cocoon.portal.event.LayoutEvent;
 import org.apache.cocoon.portal.om.Layout;
 import org.apache.commons.lang.ObjectUtils;
 

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutJXPathEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutJXPathEvent.java?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutJXPathEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutJXPathEvent.java
Mon Feb 12 07:24:21 2007
@@ -16,6 +16,7 @@
  */
 package org.apache.cocoon.portal.event.layout;
 
+import org.apache.cocoon.portal.event.LayoutEvent;
 import org.apache.cocoon.portal.event.impl.JXPathEvent;
 import org.apache.cocoon.portal.om.Layout;
 

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutRemovedEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutRemovedEvent.java?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutRemovedEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutRemovedEvent.java
Mon Feb 12 07:24:21 2007
@@ -16,6 +16,7 @@
  */
 package org.apache.cocoon.portal.event.layout;
 
+import org.apache.cocoon.portal.event.LayoutEvent;
 import org.apache.cocoon.portal.om.Layout;
 
 /**

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java
Mon Feb 12 07:24:21 2007
@@ -18,6 +18,7 @@
 
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.event.ConvertableEvent;
+import org.apache.cocoon.portal.event.LayoutEvent;
 import org.apache.cocoon.portal.om.CopletLayout;
 import org.apache.cocoon.portal.om.Layout;
 import org.apache.cocoon.portal.om.LayoutFeatures;

Added: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractBean.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractBean.java?view=auto&rev=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractBean.java
(added)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractBean.java
Mon Feb 12 07:24:21 2007
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.portal.impl;
+
+import org.apache.cocoon.portal.PortalService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * This class can be used as a base class for all portal related components
+ * that do not use Avalon anymore.
+ *
+ * @version $Id: AbstractComponent.java 449173 2006-09-23 05:52:37Z crossley $
+ */
+public class AbstractBean  {
+    
+    /** The portal service. */
+    protected PortalService portalService;
+
+    /** By default we use the logger for this class. */
+    private Log logger = LogFactory.getLog(getClass());
+
+    public Log getLogger() {
+        return this.logger;
+    }
+
+    public void setLogger(Log l) {
+        this.logger = l;
+    }
+
+    /**
+     * Set the portal service.
+     */
+    public void setPortalService(PortalService service) {
+        this.portalService = service;
+    }
+}

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractComponent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractComponent.java?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractComponent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/AbstractComponent.java
Mon Feb 12 07:24:21 2007
@@ -23,7 +23,8 @@
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.cocoon.portal.PortalService;
-import org.apache.cocoon.util.AbstractLogEnabled;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * This class can be used as a base class for all portal related components.
@@ -34,7 +35,6 @@
  * @version $Id$
  */
 public class AbstractComponent
-    extends AbstractLogEnabled
     implements Serviceable, Disposable, ThreadSafe, Initializable {
     
     /** The service manager. */
@@ -42,6 +42,17 @@
 
     /** The portal service. */
     protected PortalService portalService;
+
+    /** By default we use the logger for this class. */
+    private Log logger = LogFactory.getLog(getClass());
+
+    public Log getLogger() {
+        return this.logger;
+    }
+
+    public void setLogger(Log l) {
+        this.logger = l;
+    }
 
     /**
      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)

Added: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/cocoon-portal-components.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/cocoon-portal-components.xml?view=auto&rev=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/cocoon-portal-components.xml
(added)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/cocoon-portal-components.xml
Mon Feb 12 07:24:21 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--+
+    | This is the default configuration for the portal beans.
+    |
+    | @version $Id$
+    +-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+
+  <!-- Event Converter -->
+  <bean name="org.apache.cocoon.portal.event.EventConverter"
+        class="org.apache.cocoon.portal.event.impl.DefaultEventConverter"
+        init-method="init" scope="singleton"/>
+
+</beans>
\ No newline at end of file

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles
Mon Feb 12 07:24:21 2007
@@ -201,14 +201,6 @@
           shorthand="portal-event-manager"/>
 
   <!--+
-      | Event Converter.
-      |
-      +-->
-    <role name="org.apache.cocoon.portal.event.EventConverter"
-          default-class="org.apache.cocoon.portal.event.impl.DefaultEventConverter"
-          shorthand="portal-event-converter"/>
-
-  <!--+
       | Page Label Manager.
       |
       +-->

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/avalon/cocoon-portal-sample.xconf
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/avalon/cocoon-portal-sample.xconf?view=diff&rev=506481&r1=506480&r2=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/avalon/cocoon-portal-sample.xconf
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/avalon/cocoon-portal-sample.xconf
Mon Feb 12 07:24:21 2007
@@ -34,6 +34,9 @@
   <!-- Include portal roles -->
   <include src="resource://org/apache/cocoon/portal/portal.roles"/>
 
+  <!-- Include default components -->
+  <include-beans src="resource://org/apache/cocoon/portal/cocoon-portal-components.xml"/>
+
   <!-- If you don't need JSR 168 support, you can remove the following include. -->
   <include src="resource://org/apache/cocoon/portal/pluto/portal-pluto.roles"/>
 
@@ -99,27 +102,6 @@
         <aspect type="request-parameter"/>
     </aspects>
   </portal-event-manager>
-
-  <!--+
-      | Page Labels.
-      | To enable PageLabels uncomment the following definition:
-  <portal-event-converter class="org.apache.cocoon.portal.event.impl.PageLabelEventConverter"/>
-      +-->
-  <portal-event-converter>
-    <!-- Map event class to keys. These keys are used to create the values
-         for the uri if that event is used. If no mapping is found a hash
-         of the event class name is used as default. -->
-    <mappings>
-      <mapping name="sizing" event-class="org.apache.cocoon.portal.event.coplet.CopletInstanceSizingEvent"/>
-      <mapping name="lpar" event-class="org.apache.cocoon.portal.event.layout.LayoutChangeParameterEvent"/>
-    </mappings>
-  </portal-event-converter>
-
-  <page-label-manager>
-    <!-- Uncomment to enable non sticky tabs
-    <nonStickyTabs>true</nonStickyTabs>
-    -->
-  </page-label-manager>
 
   <!--+
       | Page Labels.

Added: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/spring/event-converter.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/spring/event-converter.xml?view=auto&rev=506481
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/spring/event-converter.xml
(added)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/spring/event-converter.xml
Mon Feb 12 07:24:21 2007
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--+
+    | This is the configuration for the event converter.
+    |
+    | @version $Id$
+    +-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+
+  <!-- Event Converter -->
+  <bean name="org.apache.cocoon.portal.event.EventConverter"
+        class="org.apache.cocoon.portal.event.impl.DefaultEventConverter"
+        init-method="init" scope="singleton">
+    <!-- Map event class to keys. These keys are used to create the values
+         for the uri if that event is used. If no mapping is found a hash
+         of the event class name is used as default. -->
+    <property name="mappings">
+      <map>
+        <entry key="sizing" value="org.apache.cocoon.portal.event.coplet.CopletInstanceSizingEvent"/>
+        <entry key="lpar" value="org.apache.cocoon.portal.event.layout.LayoutChangeParameterEvent"/>
+      </map>
+    </property>
+  </bean>
+
+</beans>
\ No newline at end of file



Mime
View raw message