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 AA4471068E for ; Thu, 5 Sep 2013 11:32:51 +0000 (UTC) Received: (qmail 65813 invoked by uid 500); 5 Sep 2013 11:32:51 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 65592 invoked by uid 500); 5 Sep 2013 11:32:50 -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 65565 invoked by uid 99); 5 Sep 2013 11:32:44 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Sep 2013 11:32:44 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3B23D90109D; Thu, 5 Sep 2013 11:32:44 +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: Thu, 05 Sep 2013 11:32:46 -0000 Message-Id: In-Reply-To: <0447d4d4b8554becb4a22c307af23f2f@git.apache.org> References: <0447d4d4b8554becb4a22c307af23f2f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/3] git commit: CAMEL-6671: FTP consumer. Added useList and ignoreFileNotFound options to allow to download a single file without using FTP LIST command which is needed in some use-cases, such as user has no permission to do FTP LIST. CAMEL-6671: FTP consumer. Added useList and ignoreFileNotFound options to allow to download a single file without using FTP LIST command which is needed in some use-cases, such as user has no permission to do FTP LIST. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/93176a32 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/93176a32 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/93176a32 Branch: refs/heads/camel-2.12.x Commit: 93176a32394d03116e1a7811bc3ff3a0f8106d9c Parents: 8ab6909 Author: Claus Ibsen Authored: Thu Sep 5 13:06:58 2013 +0200 Committer: Claus Ibsen Committed: Thu Sep 5 13:22:49 2013 +0200 ---------------------------------------------------------------------- .../apache/camel/component/file/remote/RemoteFileEndpoint.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/93176a32/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java index 1951143..6ceaa01 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java @@ -103,6 +103,10 @@ public abstract class RemoteFileEndpoint extends GenericFileEndpoint { idempotentRepository = MemoryIdempotentRepository.memoryIdempotentRepository(DEFAULT_IDEMPOTENT_CACHE_SIZE); } + if (!getConfiguration().isUseList() && getFileName() == null) { + throw new IllegalArgumentException("Endpoint is configured with useList=false, then fileName must be configured also"); + } + // set max messages per poll consumer.setMaxMessagesPerPoll(getMaxMessagesPerPoll()); consumer.setEagerLimitMaxMessagesPerPoll(isEagerMaxMessagesPerPoll());