You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Dario Sanna (JIRA)" <ji...@apache.org> on 2008/09/23 09:46:52 UTC

[jira] Created: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

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.


[jira] Commented: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46033#action_46033 ] 

Claus Ibsen commented on CAMEL-930:
-----------------------------------

Added file:length as well. And file:absoute is renamed to file:absolute.path to be consistent.

I have added it as headers to the IN message using the Camel 2.0 style pattern.
This allows us to let the ftp/sftp components as well use these headers and thus the file language support as well.

> 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
>             Fix For: 1.5.0
>
>
> 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.


[jira] Commented: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45987#action_45987 ] 

Claus Ibsen commented on CAMEL-930:
-----------------------------------

Commited first part: move stuff from file language to simple language so we can do the *date* and *bean* on the simple language now.

Still to do the File parts to get rid of FileExchange

> 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
>             Fix For: 1.5.0
>
>
> 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.


[jira] Updated: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Dario Sanna (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dario Sanna updated CAMEL-930:
------------------------------


Hello Claus,

we edit this in paralel, so that i haven't seen your second answer before.
By the way, ther is a small "bug", my name is Dario :-)



> 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.


[jira] Updated: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Dario Sanna (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dario Sanna updated CAMEL-930:
------------------------------


Hello Claus

thank you for your fast reply.

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.

The SFTP component allready can set the FileComponent.HEADER_FILE_NAME (consumer.setNames=true) , so it can be accessed in following steps.
Why not set all the file attributes (like name, canonicalName, path, creationDate etc.) as headers and let the file expression language work with this headers. This would make it possible to "simulate" a file exchange from every component and route, also it would be possible to let a "virtual" file travel (with all its attributes) over any channel.

With best regards, Dario


> 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.


[jira] Work started: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-930 started by Claus Ibsen.

> 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
>             Fix For: 1.5.0
>
>
> 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.


[jira] Commented: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45944#action_45944 ] 

Claus Ibsen commented on CAMEL-930:
-----------------------------------

Ups sorry Daria is maybe a girls name ;)

I will give the headers a 2nd thought. It is after all very flexible and friendly for future changes/new integrations.

> 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.


[jira] Assigned: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-930:
---------------------------------

    Assignee: Claus Ibsen

> 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.


[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

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Resolved: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-930.
-------------------------------

    Resolution: Fixed

> 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
>             Fix For: 1.5.0
>
>
> 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.


[jira] Commented: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-930:
------------------------------

    Fix Version/s: 1.5.0

> 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
>             Fix For: 1.5.0
>
>
> 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.


[jira] Commented: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45939#action_45939 ] 

Claus Ibsen commented on CAMEL-930:
-----------------------------------

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.


[jira] Commented: (CAMEL-930) file expression language, file-producer: date and bean expressions should be possible without the need to have a FileExchange

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45995#action_45995 ] 

Claus Ibsen commented on CAMEL-930:
-----------------------------------

TODO: bean language as ${bean:MyBean} should be able to be used just as .bean(MyBeanClass.class} = just giving the classname and Camel will instantiate it automatically.

> 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
>             Fix For: 1.5.0
>
>
> 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.