cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r429314 - in /cocoon/trunk: blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/impl/ blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/ blocks/cocoon-portal/cocoon-portal-...
Date Mon, 07 Aug 2006 12:15:46 GMT
Author: cziegeler
Date: Mon Aug  7 05:15:45 2006
New Revision: 429314

URL: http://svn.apache.org/viewvc?rev=429314&view=rev
Log:
Implement alias handling for simpler configuration

Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.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/xconf/cocoon-portal-sample.xconf
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java?rev=429314&r1=429313&r2=429314&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
Mon Aug  7 05:15:45 2006
@@ -109,7 +109,11 @@
 	extends AbstractComponent
     implements LayoutFactory, Configurable, Receiver {
 
+    /** All configured layouts. */
     protected final Map layouts = new HashMap();
+
+    /** All configured renderers. */
+    protected final Map renderers = new HashMap();
 
     protected static long idCounter = System.currentTimeMillis();
 

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?rev=429314&r1=429313&r2=429314&view=diff
==============================================================================
--- 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 Aug  7 05:15:45 2006
@@ -64,6 +64,12 @@
           default-class="org.apache.cocoon.portal.impl.PreloadPortalManagerAspect"/>
 
   <!--+
+      | Renderer
+      |
+      +-->
+  <alias role="org.apache.cocoon.portal.layout.renderer.Renderer" shorthand="renderer"/>
+
+  <!--+
       | Renderer Aspects
       |
       +-->

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/xconf/cocoon-portal-sample.xconf
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/xconf/cocoon-portal-sample.xconf?rev=429314&r1=429313&r2=429314&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/xconf/cocoon-portal-sample.xconf
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/xconf/cocoon-portal-sample.xconf
Mon Aug  7 05:15:45 2006
@@ -162,8 +162,6 @@
   </portal-deployment-manager>
 
   <!-- Renderer configuration -->
-  <component class="org.apache.cocoon.core.container.DefaultServiceSelector"
-             role="org.apache.cocoon.portal.layout.renderer.RendererSelector">
     <renderer name="column"
               class="org.apache.cocoon.portal.layout.renderer.impl.AspectRenderer">
       <aspects>
@@ -304,7 +302,6 @@
         </aspect>
       </aspects>
     </renderer>
-  </component>
  
   <!-- Layout factory configuration -->
   <portal-layout-factory>

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java?rev=429314&r1=429313&r2=429314&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/ConfigReader.java
Mon Aug  7 05:15:45 2006
@@ -492,10 +492,16 @@
         for( int i = 0; i < roles.length; i++ ) {
             final Configuration role = roles[i];
 
+            if ( "alias".equals(role.getName()) ) {
+                final String roleName = role.getAttribute("role");
+                final String shorthand = role.getAttribute("shorthand");
+                this.configInfo.getShorthands().put(shorthand, roleName);
+                continue;
+            }
             if (!"role".equals(role.getName())) {
                 throw new ConfigurationException("Unexpected '" + role.getName() + "' element
at " + role.getLocation());
             }
-            
+
             final String roleName = role.getAttribute("name");
             final String shorthand = role.getAttribute("shorthand", null);
             final String defaultClassName = role.getAttribute("default-class", null);



Mime
View raw message