camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange
Date Wed, 24 Sep 2008 07:59:52 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45939#action_45939
] 

davsclaus edited comment on CAMEL-930 at 9/24/08 12:58 AM:
-------------------------------------------------------------

Dario I have given it some more though.

I think you are right about bullet #2 and #3 in that sense I would like Camel FileLanguage
to support other file transports than just java.io.File. So I am thinking about introducing
either some kind of Camel FileInfo interface that exposes methods for the information you
can use in the file language and then have implementations for this in camel-core with java.io.File
and in camel-ftp with the two FTP types for regular ftp and sftp. 

I am not to keen on adding a bunch of headers with the file information to the message as
just String values.



      was (Author: davsclaus):
    Daria I have given it some more though.

I think you are right about bullet #2 and #3 in that sense I would like Camel FileLanguage
to support other file transports than just java.io.File. So I am thinking about introducing
either some kind of Camel FileInfo interface that exposes methods for the information you
can use in the file language and then have implementations for this in camel-core with java.io.File
and in camel-ftp with the two FTP types for regular ftp and sftp. 

I am not to keen on adding a bunch of headers with the file information to the message as
just String values.


  
> 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
>            Assignee: Claus Ibsen
>
> 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.


Mime
View raw message