Type Converter (when using wrapper/holder objects) it should be possible to
delegate the type converter to the embedded object/body that is wrapped
---------------------------------------------------------------------------------------------------------------------------------------------------
Key: CAMEL-1300
URL: https://issues.apache.org/activemq/browse/CAMEL-1300
Project: Apache Camel
Issue Type: New Feature
Components: camel-core
Reporter: Claus Ibsen
Fix For: Future
During the work with the Camel VFS we use
org.apache.camel.component.file.GenericFile<T> as a wrapper object of the
actual type (such as java.io.File, some FTP file, or whatever)
As java.io.File is central in many components we have type converters that can
convert to/from java.io.File.
I am tired of adding copy of java.io.File converter methods with the signature
of GenericFile<File> and delegate to the java.io.File method.
What is needed is type converter registry to be able to indirect/delegate to
the wrapped object automatically.
For instance if we could implement some interface in GenericFile and it could
just return the body and then we are home free.
Ticket created to remind me to look into it.
Maybe the camel-cxf component could use this as well for some of the POJO
payloads as its uses some internal CXF ValueListHolder or what the class was
named
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.