Hi Lorrin

Yeah I bet we could make it easier to use the FileOperations for end
users. However they was meant for component developers.
Please feel free to create a JIRA ticket and if possible submit a patch.



On Tue, Sep 7, 2010 at 9:27 PM, Lorrin Nelson
<lhn_git...@nerdylorrin.net> wrote:
> Hi --
>
> Thanks for the pointer towards GenericFileOperations. I wrote a Processor 
> using it that seems to do the trick. But one thing I bumped into is that 
> getting my hands on the file operations requires explicitly coding for a 
> specific implementation. E.g.
>
>        RemoteFileOperations<ChannelSftp.LsEntry> ops = new SftpOperations();
>        ops.setEndpoint(endpoint);
>
> What do you think about making createRemoteFileOperations() a public (rather 
> than protected) member of the RemoteFileEndpoint interface?
>
> Similarly there's a lot of useful logic in 
> GenericFileProducer.createFileName() that would be useful when using the file 
> operations directly, so it would be nice to make that public as well.
>
> Cheers
> -Lorrin
>
> On Sep 2, 2010, at 9:41 PM, Claus Ibsen wrote:
>
>> Hi
>>
>> Please use the user forum for user questions on Camel.
>>
>> And no the FTP producer is ment for storing a file, not deleting a file.
>> However you can leverage the
>> http://camel.apache.org/maven/camel-2.2.0/camel-core/apidocs/src-html/org/apache/camel/component/file/GenericFileOperations.html#line.23
>> API to delete the file, but then you gotta do that from Java code, for
>> example from a Processor.
>>
>>
>> On Fri, Sep 3, 2010 at 1:05 AM, Lorrin Nelson
>> <lhn_git...@nerdylorrin.net> wrote:
>>> Is this possible? I don't see anything indicating how in the docs.
>>>
>>> I wonder if would be easy to interpret a null message body as a request to 
>>> delete the target file?
>>>
>>> Right now a null body results in:
>>> org.apache.camel.InvalidPayloadException: No body available of type: 
>>> java.io.InputStream on: Message: [Body is null].
>>> Caused by: No type converter available to convert from type: null to the 
>>> required type: java.io.InputStream with value null. Exchange[Message: [Body 
>>> is null]].
>>> Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type 
>>> converter available to convert from type: null to the required type: 
>>> java.io.InputStream with value null]
>>>
>>> -Lorrin
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to