cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r454576 - in /cocoon/trunk/blocks/cocoon-portal: cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/ cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/ cocoon-portal-sample/src/mai...
Date Tue, 10 Oct 2006 00:51:37 GMT
Author: cziegeler
Date: Mon Oct  9 17:51:36 2006
New Revision: 454576

URL: http://svn.apache.org/viewvc?view=rev&rev=454576
Log:
Add some debugging code and start fixing samples

Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/AbstractModule.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/URICopletAdapter.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdefinition/portal.xml

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/AbstractModule.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/AbstractModule.java?view=diff&rev=454576&r1=454575&r2=454576
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/AbstractModule.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/AbstractModule.java
Mon Oct  9 17:51:36 2006
@@ -29,11 +29,13 @@
 import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.cocoon.components.modules.input.InputModule;
 import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * @version $Id$
  */
-public abstract class AbstractModule 
+public abstract class AbstractModule
+    extends AbstractLogEnabled
     implements InputModule, Serviceable, ThreadSafe, Disposable {
 
     /** The service manager. */

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java?view=diff&rev=454576&r1=454575&r2=454576
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java
Mon Oct  9 17:51:36 2006
@@ -74,12 +74,18 @@
         if (copletId == null) {
             return null;
         }
-        
+
         // return the coplet id
+        final Object value;
         if ( name.equals("#") ) {
-            return copletId;
+            value = copletId;
+        } else {
+            JXPathContext jxpathContext = JXPathContext.newContext(portalService.getProfileManager().getCopletInstance(copletId));
+            value = jxpathContext.getValue(name);
         }
-        JXPathContext jxpathContext = JXPathContext.newContext(portalService.getProfileManager().getCopletInstance(copletId));
-        return jxpathContext.getValue(name);
+        if ( this.getLogger().isDebugEnabled() ) {
+            this.getLogger().debug("Getting '" + name + "' for coplet instance with id: "
+ copletId + " : " + value);
+        }
+        return value;
     }
 }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/URICopletAdapter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/URICopletAdapter.java?view=diff&rev=454576&r1=454575&r2=454576
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/URICopletAdapter.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/URICopletAdapter.java
Mon Oct  9 17:51:36 2006
@@ -71,6 +71,9 @@
                                  final String uri,
                                  final ContentHandler contentHandler)
     throws SAXException {
+        if ( this.getLogger().isDebugEnabled() ) {
+            this.getLogger().debug("Streaming coplet instance + " + coplet + " using uri:
" + uri);
+        }
 		Source copletSource = null;
 		try {
 			if (uri.startsWith("cocoon:")) {

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdefinition/portal.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdefinition/portal.xml?view=diff&rev=454576&r1=454575&r2=454576
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdefinition/portal.xml
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/profiles/copletdefinition/portal.xml
Mon Oct  9 17:51:36 2006
@@ -272,7 +272,7 @@
       <coplet-type>URICoplet</coplet-type>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/content</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/content</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="BasketAdmin">
@@ -280,7 +280,7 @@
       <coplet-type>URICoplet</coplet-type>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/basket-admin</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/basket-admin</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="Basket">
@@ -288,7 +288,7 @@
       <coplet-type>URICoplet</coplet-type>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/basket</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/basket</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="Basket_admin">
@@ -296,7 +296,7 @@
       <coplet-type>URICoplet</coplet-type>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/basket.admin</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/basket.admin</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="BasketSampleStaticCoplet">
@@ -308,7 +308,7 @@
       </attribute>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/staticcoplet.add.preflow</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/staticcoplet.add.preflow</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="BasketSampleCopletWithAttribute">
@@ -320,7 +320,7 @@
       </attribute>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/copletwithattr.add.preflow</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/copletwithattr.add.preflow</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="BasketSampleCopletWithInlineProcess">
@@ -332,7 +332,7 @@
       </attribute>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/copletwithinline.add.preflow</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/copletwithinline.add.preflow</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="BasketSampleCopletWithInputProcess">
@@ -352,11 +352,11 @@
       </attribute>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/application</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/application</value>
       </attribute>
       <attribute>
          <name>temporary:application-uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/copletwithinput.add.flow</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/copletwithinput.add.flow</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="BasketSampleCopletWithInputProcessShow">
@@ -368,7 +368,7 @@
       </attribute>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/copletwithinputshow.changeTitle.preflow</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/copletwithinputshow.changeTitle.preflow</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="BasketSampleCopletWithApp">
@@ -388,11 +388,11 @@
       </attribute>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/application</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/application</value>
       </attribute>
       <attribute>
          <name>temporary:application-uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/copletwithapp.add.flow</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/copletwithapp.add.flow</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="BasketSampleCopletList">
@@ -412,11 +412,11 @@
       </attribute>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/application</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/application</value>
       </attribute>
       <attribute>
          <name>temporary:application-uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/copletlist</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/copletlist</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="BasketSampleCopletWithUpload">
@@ -428,7 +428,7 @@
       </attribute>
       <attribute>
          <name>uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/basket/copletwithupload.add.preflow</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/basket/copletwithupload.add.preflow</value>
       </attribute>
    </coplet-definition>
 
@@ -486,7 +486,7 @@
       </attribute>
       <attribute>
          <name>temporary:application-uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/portal-sample/coplets/samples/form</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-portal-sample/coplets/samples/form</value>
       </attribute>
    </coplet-definition>
    <coplet-definition id="app_test_two">
@@ -506,7 +506,7 @@
       </attribute>
       <attribute>
          <name>temporary:application-uri</name>
-         <value xsi:type="java:java.lang.String">cocoon://samples/blocks/core-samples-main/flow/jxcalc/</value>
+         <value xsi:type="java:java.lang.String">cocoon://blocks/cocoon-core-main-sample/flow/jxcalc/</value>
       </attribute>
    </coplet-definition>
 



Mime
View raw message