cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1067709 - in /cocoon/cocoon3/trunk: cocoon-sample/src/main/resources/COB-INF/ cocoon-sax/src/main/java/org/apache/cocoon/sax/component/ cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/
Date Sun, 06 Feb 2011 17:34:29 GMT
Author: simonetripodi
Date: Sun Feb  6 17:34:28 2011
New Revision: 1067709

URL: http://svn.apache.org/viewvc?rev=1067709&view=rev
Log:
COCOON3-59 The org.apache.cocoon.sax.component.LogTransformer has to be integrated in the
sitemap - patches provided by Francesco Chicchiriccò

Modified:
    cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LogTransformer.java
    cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml

Modified: cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/sitemap.xmap?rev=1067709&r1=1067708&r2=1067709&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/sitemap.xmap Sun Feb  6
17:34:28 2011
@@ -48,6 +48,9 @@
         <map:transform type="logasxml">
           <map:parameter name="logfile" value="logasxml.log" />
         </map:transform>
+        <map:transform type="log">
+          <map:parameter name="logfile" value="logsaxevents.log" />
+        </map:transform>
         <map:serialize />
       </map:match>
       <map:match equals="sax-pipeline/simple-1">

Modified: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LogTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LogTransformer.java?rev=1067709&r1=1067708&r2=1067709&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LogTransformer.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LogTransformer.java
Sun Feb  6 17:34:28 2011
@@ -38,7 +38,7 @@ import org.xml.sax.SAXException;
  * Transformer that can be plugged into a pipeline to print the SAX events which
  * passes through this transformer in a readable form to a file or sysout.
  *
- * This class is not thread-safety!
+ * This class is not thread-safe!
  */
 public final class LogTransformer extends AbstractSAXTransformer {
 
@@ -89,8 +89,13 @@ public final class LogTransformer extend
     }
 
     @Override
+    public void setConfiguration(Map<String, ? extends Object> configuration) {
+        this.setup((Map<String, Object>) configuration);
+    }
+
+    @Override
     public void setup(Map<String, Object> parameters) {
-        if (parameters == null) {
+        if (parameters == null || parameters.isEmpty()) {
             return;
         }
 

Modified: cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml?rev=1067709&r1=1067708&r2=1067709&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml
(original)
+++ cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml
Sun Feb  6 17:34:28 2011
@@ -50,5 +50,7 @@
 
   <bean name="transformer:logasxml" class="org.apache.cocoon.sax.component.LogAsXMLTransformer"
scope="prototype" />
 
+  <bean name="transformer:log" class="org.apache.cocoon.sax.component.LogTransformer"
scope="prototype" />
+
   <bean name="reader:file" class="org.apache.cocoon.sitemap.component.FileReaderComponent"
scope="prototype" />
 </beans>



Mime
View raw message