camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Resolved: (CAMEL-1653) clobber option for FileComponent
Date Fri, 29 May 2009 13:38:50 GMT


Claus Ibsen resolved CAMEL-1653.

    Resolution: Fixed

Lets keep it to the 4 types for now, as we should focus on getting Camel 2.0 out of the door
before mid summer.

In the future we can add strategy interface for easier plugin of custom code to determine
what to do.

> clobber option for FileComponent
> --------------------------------
>                 Key: CAMEL-1653
>                 URL:
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.0.0
>            Reporter: Joe Gottman
>            Assignee: Claus Ibsen
>            Priority: Minor
> FileComponent currently has an append option, which is set to true for File Producers
to make the Producer write to the end of an existing file, and false to make it overwrite
an existing file.  However, sometimes it is an error for it to do anything to change an existing
file.  Would it be possible to add a clobber option to the FileComponent which defaults to
true but when set to false prevents the File Producer from modifying an existing file?  It
should probably throw some kind of Camel Exception when it attempts to write to a file that
already exists. If desired, the Route can then catch this Exception and handle it, for instance
by trying to write the file to a different location.
>    This option might also be useful for some other Producer components for the same reason.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message