You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Seb Auvray (JIRA)" <ji...@apache.org> on 2008/10/21 17:42:52 UTC

[jira] Issue Comment Edited: (CAMEL-990) TypeConverter support with @Converter meta-annotation and not only @Converter

    [ https://issues.apache.org/activemq/browse/CAMEL-990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46626#action_46626 ] 

sauvray edited comment on CAMEL-990 at 10/21/08 8:40 AM:
------------------------------------------------------------

The original need is the following:
Let's say I build a Routing System based on Camel. Of course my System will depend on Camel. But I don't want the end user of my System (who will be responsible for adding routes, converters...) to depend on any camel jar.
Your solution is better (and also more time consuming than my simple metaannotation patch :)), will think about it.

      was (Author: sauvray):
    The original need is the following:
Let's say I build a Routing System based on Camel. Of course my System will depend on Camel. But I don't want the end user of my System (who will be responsible for adding routes, converters...) to depend on any camel jar.
Your solution is better (and also more time consuming than my simple metaannotation match :)), will think about it.
  
> TypeConverter support with @Converter meta-annotation and not only @Converter
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-990
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-990
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Seb Auvray
>             Fix For: 1.5.0, 2.0.0, Future
>
>         Attachments: typeconverter-meta-annotation-support.patch
>
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> Today TypeConverter detection is based on org.apache.camel.@Converter annotation.
> Allow user to override this by using meta-annotation. This can be useful to hide camel dependencies, when extending the framework.
> ie, this can be done:
> package some.package.of.mine;
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE, ElementType.METHOD })
> @org.apache.camel.Converter
> public @interface OwnConverterAnnotation {
> }
> import some.package.of.mine.OwnConverterAnnotation;
> @OwnConverterAnnotation
> public class FileToXXXConverter {
>     @OwnConverterAnnotation 
>     public static XXX toWorkflowEntry(File file) throws IOException {
>         return new XXX();            
>     }
> }

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