You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/07/21 14:50:52 UTC

svn commit: r424291 - in /cocoon/trunk/blocks/cocoon-portal: cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java cocoon-portal-sample/src/main/resources/COB-INF/config/xconf/cocoon-portal-sample.xconf

Author: cziegeler
Date: Fri Jul 21 05:50:52 2006
New Revision: 424291

URL: http://svn.apache.org/viewvc?rev=424291&view=rev
Log:
Make samples work with portlet and wsrp

Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/xconf/cocoon-portal-sample.xconf

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java?rev=424291&r1=424290&r2=424291&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java (original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java Fri Jul 21 05:50:52 2006
@@ -38,6 +38,7 @@
 import org.apache.cocoon.components.source.SourceUtil;
 import org.apache.cocoon.portal.persistence.Converter;
 import org.apache.cocoon.portal.persistence.ConverterException;
+import org.apache.cocoon.util.ClassUtils;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
 import org.exolab.castor.mapping.Mapping;
@@ -153,7 +154,16 @@
         this.mappingSources.put("copletbasedata", prefix + "copletbasedata.xml");
         this.mappingSources.put("copletdata", prefix + "copletdata.xml");
         this.mappingSources.put("copletinstancedata", prefix + "copletinstancedata.xml");
-        this.mappingSources.put("portletpreferences", prefix + "pluto.xml");
+        boolean plutoAvailable = false;
+        try {
+            ClassUtils.loadClass("org.apache.cocoon.portal.pluto.adapter.PortletAdapter");
+            plutoAvailable = true;
+        } catch (Exception ignore) {
+            this.getLogger().info("Pluto is not available - no default mapping for castor loaded.");
+        }
+        if ( plutoAvailable ) {
+            this.mappingSources.put("portletpreferences", prefix + "pluto.xml");
+        }
 
         // the custom configuration might overwrite the default config
         Configuration[] children = config.getChildren("mapping-source");

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=424291&r1=424290&r2=424291&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 Fri Jul 21 05:50:52 2006
@@ -93,10 +93,12 @@
   -->
   <portal-manager>
     <aspects>
-      <!-- JSR-168 support: -->
+      <!-- JSR-168 support: 
       <aspect adapter="portlet"/>
-      <!-- wsrp support: -->
+      -->
+      <!-- wsrp support: 
       <aspect adapter="wsrp"/>
+      -->
     </aspects>
   </portal-manager>
 
@@ -166,7 +168,7 @@
     <!-- Scan the provided directories every minute: -->
     <scanning-delay>60000</scanning-delay>
     <!-- Scan the following locations (comma-separated): -->
-    <deployment-sources>conf/deploy</deployment-sources>
+    <deployment-sources>config/deploy</deployment-sources>
     <!-- Turn on/off hot deployment: -->
     <hot-deployment>true</hot-deployment>
   </portal-deployment-manager>
@@ -302,6 +304,7 @@
         </aspect>
       </aspects>
     </renderer>
+    <!--
     <renderer name="portlet-window"
               class="org.apache.cocoon.portal.layout.renderer.impl.AspectRenderer">
       <aspects>
@@ -338,6 +341,7 @@
         <aspect type="coplet-cinclude"/>
       </aspects>
     </renderer>
+    -->
     <renderer name="link" 
               class="org.apache.cocoon.portal.layout.renderer.impl.DefaultLinkRenderer"/>
     <renderer name="decorated-frame"
@@ -433,10 +437,10 @@
   <!-- This is the special basket renderer -->
   <component role="org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect/basket"
              class="org.apache.cocoon.portal.coplets.basket.AddToBasketAspect"/>
-
+<!--
   <wsrp-adapter>
-     <!-- This is the WSRP configuration containing the producers etc. -->
+     This is the WSRP configuration containing the producers etc. 
      <parameter name="wsrp-config" value="profiles/wsrp-config.xml"/>
   </wsrp-adapter>
-
+-->
 </components>