cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r291716 - in /cocoon: blocks/portal-sample/trunk/WEB-INF/xconf/ blocks/portal-sample/trunk/samples/ blocks/portal/trunk/WEB-INF/xconf/ blocks/portal/trunk/java/org/apache/cocoon/portal/ blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp...
Date Mon, 26 Sep 2005 19:19:06 GMT
Author: cziegeler
Date: Mon Sep 26 12:18:20 2005
New Revision: 291716

URL: http://svn.apache.org/viewcvs?rev=291716&view=rev
Log:
Use jakarta-regexp 1.4 for Maven build
More configuration cleanup for portal
Sitemap can now define an own logger for all components

Modified:
    cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf
    cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap
    cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/portal.roles
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/portal.roles
    cocoon/trunk/core/pom.xml
    cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java

Modified: cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf?rev=291716&r1=291715&r2=291716&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf (original)
+++ cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf Mon Sep 26
12:18:20 2005
@@ -416,4 +416,9 @@
              class="org.apache.cocoon.portal.coplets.basket.AddToBasketAspect"
              logger="portal"/>
 
+  <wsrp-adapter>
+     <!-- This is the WSRP configuration containing the producers etc. -->
+     <parameter name="wsrp-config" value="profiles/wsrp-config.xml"/>
+  </wsrp-adapter>
+
 </components>

Modified: cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap?rev=291716&r1=291715&r2=291716&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap (original)
+++ cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap Mon Sep 26 12:18:20 2005
@@ -19,39 +19,28 @@
 
   <!-- ========================= Components ================================ -->
 
-  <map:components>
+  <map:components logger="portal">
     <map:generators default="file">
       <map:generator name="portal" src="org.apache.cocoon.portal.generation.PortalGenerator"/>
     </map:generators>
     <map:transformers default="xslt">
       <map:transformer name="portal-coplet" 
-                       src="org.apache.cocoon.portal.transformation.CopletTransformer" 
-                       logger="sitemap.transformer.portal" />
-      <map:transformer name="htmlroot" src="org.apache.cocoon.portal.transformation.HTMLRootTransformer"
-        logger="sitemap.transformer.htmlroot" />
-      <map:transformer name="rss" src="org.apache.cocoon.portal.transformation.RSSTransformer"
-        logger="sitemap.transformer.rss" />
-      <map:transformer name="portal-proxy" src="org.apache.cocoon.portal.transformation.ProxyTransformer"
-        logger="sitemap.transformer.portal.proxy">
+                       src="org.apache.cocoon.portal.transformation.CopletTransformer"/>
+      <map:transformer name="htmlroot" src="org.apache.cocoon.portal.transformation.HTMLRootTransformer"/>
+      <map:transformer name="rss" src="org.apache.cocoon.portal.transformation.RSSTransformer"/>
+      <map:transformer name="portal-proxy" src="org.apache.cocoon.portal.transformation.ProxyTransformer">
         <parameter name="envelope-tag" value="div"/>
       </map:transformer>
-      <map:transformer name="portal-new-eventlink" src="org.apache.cocoon.portal.transformation.NewEventLinkTransformer"
-        logger="sitemap.transformer.portal.eventlink" />
-      <map:transformer name="portal-html-eventlink" src="org.apache.cocoon.portal.transformation.HTMLEventLinkTransformer"
-        logger="sitemap.transformer.portal.eventlink.html"/>
-      <map:transformer name="portal-html-linktoeventlink" src="org.apache.cocoon.portal.transformation.LinkTransformer"
-        logger="sitemap.transformer.portal.eventlink" />
+      <map:transformer name="portal-new-eventlink" src="org.apache.cocoon.portal.transformation.NewEventLinkTransformer"/>
+      <map:transformer name="portal-html-eventlink" src="org.apache.cocoon.portal.transformation.HTMLEventLinkTransformer"/>
+      <map:transformer name="portal-html-linktoeventlink" src="org.apache.cocoon.portal.transformation.LinkTransformer"/>
     </map:transformers>
     <map:readers default="resource">
-      <map:reader name="portal-proxy" src="org.apache.cocoon.portal.reading.ProxyReader"
-        logger="sitemap.reader.portal.proxy" />
+      <map:reader name="portal-proxy" src="org.apache.cocoon.portal.reading.ProxyReader"/>
     </map:readers>
     <map:serializers default="html">
-      <map:serializer name="html-include"
-        logger="sitemap.serializer.html"
-        mime-type="text/html"
-        pool-max="32"
-        src="org.apache.cocoon.portal.serialization.IncludingHTMLSerializer">
+      <map:serializer name="html-include" mime-type="text/html" pool-max="32"
+                      src="org.apache.cocoon.portal.serialization.IncludingHTMLSerializer">
         <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>
         <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
       </map:serializer>

Modified: cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf?rev=291716&r1=291715&r2=291716&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf (original)
+++ cocoon/blocks/portal/trunk/WEB-INF/xconf/cocoon-portal.xconf Mon Sep 26 12:18:20 2005
@@ -14,7 +14,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <!--+
     |
     | SVN $Id$
@@ -31,22 +30,16 @@
    </portals>
   </component>
   -->
-  <source-factories>
-    <!-- portal protocol -->
-    <component-instance class="org.apache.cocoon.portal.source.CopletSourceFactory" 
-                        name="coplet" logger="portal"/>
-  </source-factories>
   <input-modules>
-      <component-instance name="coplet" class="org.apache.cocoon.portal.components.modules.input.CopletModule"
logger="portal"/>
-      <component-instance name="portal-layout" class="org.apache.cocoon.portal.components.modules.input.LayoutModule"
logger="portal"/>
-      <component-instance name="portal-skin" class="org.apache.cocoon.portal.components.modules.input.SkinModule"
logger="portal"/>
       <!--  FIXME: THIS HAS TO BE PORTAL DEPENDENT AND NOT GLOBAL -->
       <component-instance name="portalpath" class="org.apache.cocoon.components.modules.input.ProjectPathModule"
logger="portal">
        	<uri-prefix>samples/blocks/portal-sample/</uri-prefix>
       </component-instance>
   </input-modules>
 
-  <component class="org.apache.cocoon.portal.event.impl.DefaultEventManager" logger="portal"
role="org.apache.cocoon.portal.event.EventManager">
+  <component class="org.apache.cocoon.portal.event.impl.DefaultEventManager"
+             logger="portal"
+             role="org.apache.cocoon.portal.event.EventManager">
     <event-aspects>
         <!--  The client should not cache the page. -->
         <aspect type="no-client-caching"/>
@@ -118,34 +111,6 @@
     <!-- Uncomment to enable non sticky tabs
     <nonStickyTabs>true</nonStickyTabs>
     -->
-  </component>
-
-  <!-- Coplet Adapter configuration -->
-  <component class="org.apache.cocoon.core.container.DefaultServiceSelector" 
-             role="org.apache.cocoon.portal.coplet.adapter.CopletAdapterSelector">
-    <!-- This is the pipeline/uri based adapter -->
-    <coplet-adapter name="uri" 
-                    class="org.apache.cocoon.portal.coplet.adapter.impl.URICopletAdapter"

-                    logger="portal"/>
-    <!-- This is the JSR-168 adapter -->
-    <coplet-adapter name="portlet"
-                    class="org.apache.cocoon.portal.coplet.adapter.impl.PortletAdapter" 
-                    logger="portal"/>
-    <!-- This is an extension of the uri adapter -->
-    <coplet-adapter name="caching-uri"
-                    class="org.apache.cocoon.portal.coplet.adapter.impl.CachingURICopletAdapter"
-                    logger="portal"/>
-    <!-- This is the application adapter -->
-    <coplet-adapter name="application"
-                    class="org.apache.cocoon.portal.coplet.adapter.impl.ApplicationCopletAdapter"
-                    logger="portal"/>
-    <!-- This is the wsrp adapter -->
-    <coplet-adapter name="wsrp"
-                    class="org.apache.cocoon.portal.wsrp.adapter.WSRPAdapter"
-                    logger="portal">
-      <!-- This is the wsrp configuration containing the producers etc. -->
-      <parameter name="wsrp-config" value="profiles/wsrp-config.xml"/>
-    </coplet-adapter>
   </component>
 
 </components>

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/portal.roles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/portal.roles?rev=291716&r1=291715&r2=291716&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/portal.roles (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/portal.roles Mon Sep 26 12:18:20
2005
@@ -158,6 +158,7 @@
   <!--+
       | Event Factory configuration
       | The events that can be marshalled. The name must match the Event's request parameter.
+      |
       +-->
     <!-- Legacy service selector. -->
     <role name="org.apache.cocoon.portal.event.ConvertableEventFactorySelector"
@@ -172,6 +173,7 @@
 
   <!--+
       | Components.
+      |
       +-->
     <role name="org.apache.cocoon.components.persistence.CastorSourceConverter"
           default-class="org.apache.cocoon.components.persistence.CastorSourceConverter"/>
@@ -181,5 +183,58 @@
 
     <role name="org.apache.cocoon.components.variables.VariableResolverFactory"
           default-class="org.apache.cocoon.components.variables.DefaultVariableResolverFactory"/>
+
+
+  <!--+
+      | Coplet Adapters
+      |
+      +-->
+    <!-- Legacy service selector. -->
+    <role name="org.apache.cocoon.portal.coplet.adapter.CopletAdapterSelector"
+          default-class="org.apache.cocoon.core.container.DefaultServiceSelector"/>
+
+    <!--+
+        | This is the pipeline/uri based adapter.
+        +-->
+    <role name="org.apache.cocoon.portal.coplet.adapter.CopletAdapter/uri"
+          default-class="org.apache.cocoon.portal.coplet.adapter.impl.URICopletAdapter"/>
+
+    <!--+
+        | This is the JSR-168 adapter.
+        +-->
+    <role name="org.apache.cocoon.portal.coplet.adapter.CopletAdapter/portlet"
+          default-class="org.apache.cocoon.portal.coplet.adapter.impl.PortletAdapter"/>
+
+    <!--+
+        | This is an extension of the uri adapter supporting caching the content.
+        +-->
+    <role name="org.apache.cocoon.portal.coplet.adapter.CopletAdapter/caching-uri"
+          default-class="org.apache.cocoon.portal.coplet.adapter.impl.CachingURICopletAdapter"/>
+
+    <!--+
+        |  This is the application adapter.
+        +-->
+    <role name="org.apache.cocoon.portal.coplet.adapter.CopletAdapter/application"
+          default-class="org.apache.cocoon.portal.coplet.adapter.impl.ApplicationCopletAdapter"/>
+
+
+  <!--+
+      | Coplet Adapters.
+      |
+      +-->
+    <role name="org.apache.excalibur.source.SourceFactory/coplet"
+          default-class="org.apache.cocoon.portal.source.CopletSourceFactory"/>
+
+
+  <!--+
+      | Input Modules.
+      |
+      +-->
+    <role name="org.apache.cocoon.components.modules.input.InputModule/coplet"
+          default-class="org.apache.cocoon.portal.components.modules.input.CopletModule"/>
+    <role name="org.apache.cocoon.components.modules.input.InputModule/portal-layout"
+          default-class="org.apache.cocoon.portal.components.modules.input.LayoutModule"/>
+    <role name="org.apache.cocoon.components.modules.input.InputModule/portal-skin"
+          default-class="org.apache.cocoon.portal.components.modules.input.SkinModule"/>
 
 </role-list>

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/portal.roles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/portal.roles?rev=291716&r1=291715&r2=291716&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/portal.roles (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/wsrp/portal.roles Mon Sep 26
12:18:20 2005
@@ -40,4 +40,15 @@
   <role name="org.apache.cocoon.portal.wsrp.consumer.UserContextProvider"
         default-class="org.apache.cocoon.portal.wsrp.consumer.UserContextProviderImpl"/>
 
+  <!--+
+      | Coplet Adapters
+      |
+      +-->
+    <!--+
+        |  This is the WSRP coplet adapter.
+        +-->
+    <role name="org.apache.cocoon.portal.coplet.adapter.CopletAdapter/wsrp"
+          default-class="org.apache.cocoon.portal.wsrp.adapter.WSRPAdapter"
+          shorthand="wsrp-adapter"/>
+
 </role-list>

Modified: cocoon/trunk/core/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/pom.xml?rev=291716&r1=291715&r2=291716&view=diff
==============================================================================
--- cocoon/trunk/core/pom.xml (original)
+++ cocoon/trunk/core/pom.xml Mon Sep 26 12:18:20 2005
@@ -288,9 +288,9 @@
       <version>1.2.11</version>
     </dependency>
     <dependency>
-      <groupId>regexp</groupId>
-      <artifactId>regexp</artifactId>
-      <version>1.3</version>
+      <groupId>jakarta-regexp</groupId>
+      <artifactId>jakarta-regexp</artifactId>
+      <version>1.4</version>
     </dependency>
     <dependency>
       <groupId>rhino</groupId>

Modified: cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java?rev=291716&r1=291715&r2=291716&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SitemapLanguage.java
Mon Sep 26 12:18:20 2005
@@ -29,6 +29,7 @@
 import org.apache.avalon.framework.container.ContainerUtil;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.DefaultContext;
+import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.cocoon.Constants;
 import org.apache.cocoon.components.LifecycleHelper;
@@ -96,8 +97,14 @@
         
         newManager = new CocoonServiceManager(this.parentProcessorManager, classloader);
 
+        // It's possible to define a logger on a per sitemap base.
+        // This is the default logger for all components defined with this sitemap.
+        Logger sitemapLogger = this.getLogger();
+        if ( config.getAttribute("logger", null) != null) {
+            sitemapLogger = sitemapLogger.getChildLogger(config.getAttribute("logger"));
+        }
         // Go through the component lifecycle
-        ContainerUtil.enableLogging(newManager, this.getLogger());
+        ContainerUtil.enableLogging(newManager, sitemapLogger);
         ContainerUtil.contextualize(newManager, context);
         // before we pass the configuration we have to strip the
         // additional configuration parts, like classpath etc. as these
@@ -121,7 +128,7 @@
 
             final ComponentLocator cl = (ComponentLocator)ClassUtils.newInstance(clazzName);

             // Go through the component lifecycle
-            LifecycleHelper.setupComponent(cl, this.getLogger(), context, newManager, appContainer);
+            LifecycleHelper.setupComponent(cl, sitemapLogger, context, newManager, appContainer);
 
             this.applicationContainer = cl;
 
@@ -138,7 +145,7 @@
             final Configuration[] listeners = listenersWrapper.getChildren("listener"); 
              
             for(int i = 0; i < listeners.length; i++) {
                 final Configuration current = listeners[i];
-                final TreeBuilder.EventComponent listener = this.createListener(newManager,
context, current);
+                final TreeBuilder.EventComponent listener = this.createListener(newManager,
sitemapLogger, context, current);
                 if ( !(listener.component instanceof SitemapListener) ) {
                     throw new ConfigurationException("Listener must implement the SitemapListener
interface.");
                 }
@@ -152,7 +159,10 @@
     /**
      * Create a listener
      */
-    protected TreeBuilder.EventComponent createListener(ServiceManager manager, Context context,
Configuration config) 
+    protected TreeBuilder.EventComponent createListener(ServiceManager manager,
+                                                        Logger sitemapLogger,
+                                                        Context context,
+                                                        Configuration config) 
     throws Exception {
         // role or class?
         final String role = config.getAttribute("role", null);
@@ -162,7 +172,7 @@
         final String className = config.getAttribute("class");
         final Object component = ClassUtils.newInstance(className);
 
-        LifecycleHelper.setupComponent(component, this.getLogger(), context, manager, config);
+        LifecycleHelper.setupComponent(component, sitemapLogger, context, manager, config);
 
         return new TreeBuilder.EventComponent(component, false);
     }



Mime
View raw message