You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2008/09/23 10:32:52 UTC
[jira] Commented: (CAMEL-930) file expression language,
file-producer: date and bean expressions should be possible without the
need to have a FileExchange
[ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45902#action_45902 ]
Claus Ibsen commented on CAMEL-930:
-----------------------------------
Daria a good idea.
bullet #1 is doable, and then the simple language in general will be improved with this feature
+1
bullet #2 java.io.File is required for FileExchange so I doubt its easy to abstract a remote FTP file
-1
bullet #3 as bullet #2 the file language needs access to java.io.File so you can use all the file methods such as: getName, getCanoicalName, getPath etc.
-1
> file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-930
> URL: https://issues.apache.org/activemq/browse/CAMEL-930
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 1.5.0
> Environment: Windows XP, JDK 5, Apache Camel Snapshot
> Reporter: Dario Sanna
>
> the file expression language , file-producer: date and bean expressions are very usefull, but works only with a FileExchange.
> example:
> from("sftp://user@host//path?password=password&consumer.setNames=true").
> .setHeader(FileComponent.HEADER_FILE_NAME, file("${date:now:yyyyMMMdd}.out"))
> to("file://output_dir");
> The above code will result in a ClassCastException, because the file expresssion language relies on having a FileExchange.
> Proposal:
> - move the date:now and bean: expression from file to simple
> - let sftp send FileExchange, rather than DefaultExchange
> - let the file expression language work with DefaultExchange (use header-entries instead of FileExchange.getFile())
> With best regards, Dario
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.