[
https://issues.apache.org/activemq/browse/CAMEL-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49014#action_49014
]
Claus Ibsen commented on CAMEL-1300:
------------------------------------
davsclaus:(svn)camel[trunk:738760]/$ svn commit --message "CAMEL-1300: Add
@FallbackConverter for registering a fallback converter. Used by
GenericFileConverter to allow us to delegte the from type to the wrapped body
instead of the GenericFile that is just the wrapper class."
Adding camel-core/src/main/java/org/apache/camel/FallbackConverter.java
Sending
camel-core/src/main/java/org/apache/camel/component/file/GenericFileConverter.java
Sending
camel-core/src/main/java/org/apache/camel/converter/IOConverter.java
Sending
camel-core/src/main/java/org/apache/camel/converter/NIOConverter.java
Sending
camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
Sending
camel-core/src/main/java/org/apache/camel/impl/ReportingTypeConverterRegistry.java
Sending
camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
Sending
camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java
Adding
camel-core/src/main/java/org/apache/camel/impl/converter/InstanceMethodFallbackTypeConverter.java
Sending
camel-core/src/main/java/org/apache/camel/impl/converter/InstanceMethodTypeConverter.java
Adding
camel-core/src/main/java/org/apache/camel/impl/converter/StaticMethodFallbackTypeConverter.java
Sending
camel-core/src/main/java/org/apache/camel/spi/TypeConverterRegistry.java
Deleting
components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConverter.java
Sending
components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
Transmitting file data .............
Committed revision 738826.
> 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
> Assignee: 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.