You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/09/05 13:32:46 UTC
[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 <da...@apache.org>
Authored: Thu Sep 5 13:06:58 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
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<T> extends GenericFileEndpoint<T> {
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());