camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/3] camel git commit: CAMEL-8279: added backwards compatibility
Date Mon, 26 Jan 2015 13:54:47 GMT
CAMEL-8279: added backwards compatibility


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/15683fe5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/15683fe5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/15683fe5

Branch: refs/heads/camel-2.14.x
Commit: 15683fe5e90bbed696cd38966dbe1249609e99ec
Parents: 79472f6
Author: Ranil Wijeyratne <me@ranil.ch>
Authored: Sun Jan 25 20:02:47 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Jan 26 14:54:34 2015 +0100

----------------------------------------------------------------------
 .../processor/aggregate/zipfile/ZipAggregationStrategy.java  | 8 ++++++++
 .../zipfile/AggregationStrategyWithFilenameHeaderTest.java   | 2 +-
 .../zipfile/AggregationStrategyWithPreservationTest.java     | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/15683fe5/components/camel-zipfile/src/main/java/org/apache/camel/processor/aggregate/zipfile/ZipAggregationStrategy.java
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/main/java/org/apache/camel/processor/aggregate/zipfile/ZipAggregationStrategy.java
b/components/camel-zipfile/src/main/java/org/apache/camel/processor/aggregate/zipfile/ZipAggregationStrategy.java
index b1105fa..a6b7a0c 100644
--- a/components/camel-zipfile/src/main/java/org/apache/camel/processor/aggregate/zipfile/ZipAggregationStrategy.java
+++ b/components/camel-zipfile/src/main/java/org/apache/camel/processor/aggregate/zipfile/ZipAggregationStrategy.java
@@ -55,6 +55,14 @@ public class ZipAggregationStrategy implements AggregationStrategy {
     public ZipAggregationStrategy() {
         this(false, false);
     }
+
+    /**
+     * @param preserveFolderStructure if true, the folder structure is preserved when the
source is
+     * a type of {@link GenericFileMessage}.  If used with a file, use recursive=true.
+     */
+    public ZipAggregationStrategy(boolean preserveFolderStructure) {
+        this(preserveFolderStructure, false);
+    }
     
     /**
      * @param preserveFolderStructure if true, the folder structure is preserved when the
source is

http://git-wip-us.apache.org/repos/asf/camel/blob/15683fe5/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithFilenameHeaderTest.java
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithFilenameHeaderTest.java
b/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithFilenameHeaderTest.java
index 2d31722..6e1403a 100644
--- a/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithFilenameHeaderTest.java
+++ b/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithFilenameHeaderTest.java
@@ -67,7 +67,7 @@ public class AggregationStrategyWithFilenameHeaderTest extends CamelTestSupport
                 final ZipEntry entry = entries.nextElement();
                 assertTrue("Zip entry file name should be on of: " + FILE_NAMES, FILE_NAMES.contains(entry.getName()));
               
             }
-            assertEquals("Zip file should contains " + FILE_NAMES.size() + " files", FILE_NAMES.size(),
fileCount);
+            assertEquals("Zip file should contain " + FILE_NAMES.size() + " files", FILE_NAMES.size(),
fileCount);
         } finally {
             IOHelper.close(file);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/15683fe5/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithPreservationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithPreservationTest.java
b/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithPreservationTest.java
index 4fc6ac7..9c40cad 100644
--- a/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithPreservationTest.java
+++ b/components/camel-zipfile/src/test/java/org/apache/camel/processor/aggregate/zipfile/AggregationStrategyWithPreservationTest.java
@@ -78,7 +78,7 @@ public class AggregationStrategyWithPreservationTest extends CamelTestSupport
{
             public void configure() throws Exception {
                 // Unzip file and Split it according to FileEntry
                 from("file:src/test/resources/org/apache/camel/aggregate/zipfile/data?consumer.delay=1000&noop=true&recursive=true")
-                    .aggregate(new ZipAggregationStrategy(true, false))
+                    .aggregate(new ZipAggregationStrategy(true))
                         .constant(true)
                         .completionFromBatchConsumer()
                         .eagerCheckCompletion()


Mime
View raw message