Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C32CA17214 for ; Mon, 26 Jan 2015 13:54:46 +0000 (UTC) Received: (qmail 91550 invoked by uid 500); 26 Jan 2015 13:54:47 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 91430 invoked by uid 500); 26 Jan 2015 13:54:47 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 91411 invoked by uid 99); 26 Jan 2015 13:54:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2015 13:54:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E0C80E03F8; Mon, 26 Jan 2015 13:54:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Mon, 26 Jan 2015 13:54:47 -0000 Message-Id: <0cc0d76964de49e1993331ee5d856bd2@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/3] camel git commit: CAMEL-8279: added backwards compatibility 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 Authored: Sun Jan 25 20:02:47 2015 +0100 Committer: Claus Ibsen 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()