cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r425476 - in /cocoon/trunk/blocks/cocoon-portal: cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/ cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdata/ cocoon-portal-sample/src/main/resources/COB-...
Date Tue, 25 Jul 2006 18:20:59 GMT
Author: cziegeler
Date: Tue Jul 25 11:20:59 2006
New Revision: 425476

URL: http://svn.apache.org/viewvc?rev=425476&view=rev
Log:
Fix portal sample

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/profiles/copletdata/portal.xml
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletinstancedata/portal-user-cocoon.xml
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/layout/portal-user-cocoon.xml

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=425476&r1=425475&r2=425476&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
Tue Jul 25 11:20:59 2006
@@ -84,10 +84,12 @@
     throws ConverterException {
         try {
             this.idResolver.setObjectMap(references);
-            Unmarshaller unmarshaller = (Unmarshaller)((Object[])this.mappings.get(mappingName))[1];
-            Object result = unmarshaller.unmarshal(new InputSource(stream));
+            final Unmarshaller unmarshaller = (Unmarshaller)((Object[])this.mappings.get(mappingName))[1];
+            final Object result = unmarshaller.unmarshal(new InputSource(stream));
             stream.close();
             return result;
+        } catch (IllegalStateException ise) {
+            throw new ConverterException("Unable to unmarshal objects for mapping " + mappingName,
ise);
         } catch (Exception e) {
             throw new ConverterException(e.getMessage(), e);
         } finally {
@@ -241,8 +243,11 @@
          * @see org.exolab.castor.xml.IDResolver#resolve(java.lang.String)
          */
         public Object resolve(String refId) {
-            // TODO - Should we throw an exception if the reference is not available?
-            return ((Map)this.threadLocalMap.get()).get(refId);
+            final Object o = ((Map)this.threadLocalMap.get()).get(refId);
+            if ( o == null ) {
+                throw new IllegalStateException("Referenced object with id " + refId + "
is not found.");
+            }
+            return o;
         }
     }
 }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdata/portal.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdata/portal.xml?rev=425476&r1=425475&r2=425476&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdata/portal.xml
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdata/portal.xml
Tue Jul 25 11:20:59 2006
@@ -512,7 +512,7 @@
    <!-- Example for the application coplet -->
    <coplet-data id="Google">
       <title>Application</title>
-      <coplet-base-data>Application</coplet-base-data>
+      <coplet-base-data>URICoplet</coplet-base-data>
       <attribute>
          <name>uri</name>
          <value xsi:type="java:java.lang.String">cocoon:/coplets/html/app-coplet</value>

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletinstancedata/portal-user-cocoon.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletinstancedata/portal-user-cocoon.xml?rev=425476&r1=425475&r2=425476&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletinstancedata/portal-user-cocoon.xml
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletinstancedata/portal-user-cocoon.xml
Tue Jul 25 11:20:59 2006
@@ -38,12 +38,12 @@
    <coplet-instance-data id="GalleryViewer_1">
       <coplet-data>GalleryViewer</coplet-data>
    </coplet-instance-data>
-
+<!-- 
    <coplet-instance-data id="Portlet_1">
       <coplet-data>testsuite_TestPortlet1</coplet-data>
    </coplet-instance-data>
 
-   <coplet-instance-data id="Portlet-2">
+   <coplet-instance-data id="Portlet_2">
       <coplet-data>testsuite_TestPortlet2</coplet-data>
    </coplet-instance-data>
 
@@ -57,11 +57,12 @@
    <coplet-instance-data id="Petstore_1">
       <coplet-data>jpetstore_JPetstorePortlet</coplet-data>
    </coplet-instance-data>
+ -->
 
    <coplet-instance-data id="app_test_1">
       <coplet-data>app_test_one</coplet-data>
    </coplet-instance-data>
-   <coplet-instance-data id="app_test-2">
+   <coplet-instance-data id="app_test_2">
       <coplet-data>app_test_one</coplet-data>
    </coplet-instance-data>
    <coplet-instance-data id="app_test_3">
@@ -74,12 +75,13 @@
       <coplet-data>Google</coplet-data>
    </coplet-instance-data>
 
-   <!-- wsrp example -->
+   <!-- wsrp example
    <coplet-instance-data id="WSRP_Calc_1">
       <coplet-data>wsrp_calc_portlet</coplet-data>
    </coplet-instance-data>
    <coplet-instance-data id="WSRP_Test_1">
       <coplet-data>wsrp_test_portlet</coplet-data>
    </coplet-instance-data>
+    -->
 
 </coplets>

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/layout/portal-user-cocoon.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/layout/portal-user-cocoon.xml?rev=425476&r1=425475&r2=425476&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/layout/portal-user-cocoon.xml
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/layout/portal-user-cocoon.xml
Tue Jul 25 11:20:59 2006
@@ -37,6 +37,7 @@
       </item>
     </composite-layout>
   </named-item>
+<!-- 
 
   <named-item name="JSR-168">
     <composite-layout name="row">
@@ -87,6 +88,7 @@
       </item>
     </composite-layout>
   </named-item>
+ -->
 
   <named-item name="Apps">
     <composite-layout name="row">



Mime
View raw message