You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/03/11 06:48:40 UTC

[jira] Created: (CAMEL-1446) Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter

Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter
-----------------------------------------------------------------------------------------------------

                 Key: CAMEL-1446
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1446
             Project: Apache Camel
          Issue Type: New Feature
          Components: camel-core
            Reporter: Claus Ibsen
             Fix For: 2.0.0


See this article page 4, listening 6
http://architects.dzone.com/articles/fuse-esb-4-osgi-based?page=0,3

He wants to transform the body to a StringSource, and does it directly
{code} 
public Object transform(Object body) {
  return new StringSource(body);
}
{code}

We could add an @TypeConverter annotation, so you can let Camel handle it better
{code} 
public StringSource transform(Object body, @TypeConverter TypeConverter converter) {
  return converter.convertTo(StringSource.class, body);
}
{code}

This allows you to get easily access to Camels type converter feature, instead of dealing with it yourself and maybe need to import extra classes and deal with exception handling and such.

And btw I think StringSource should be moved to org.apache.camel so it does not reside in the subpackage: org.apache.camel.converter.jaxp.StringSource

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


[jira] Resolved: (CAMEL-1446) Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1446.
--------------------------------

    Resolution: Fixed

Just define a parameter as TypeConverter and you will get it from Camel

{code}
public String foo(String body, TypeConverter tc) {
   return tc.convetTo(Integer.class, "123");
}

Committed revision 753284.

> Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1446
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1446
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>
> See this article page 4, listening 6
> http://architects.dzone.com/articles/fuse-esb-4-osgi-based?page=0,3
> He wants to transform the body to a StringSource, and does it directly
> {code} 
> private Object value;
> public Object transform(Object notUsed) {
>   return new StringSource(body);
> }
> {code}
> We could add an @TypeConverter annotation, so you can let Camel handle it better
> {code}
> private Object value;
>  
> public StringSource transform(Object notUsed, @TypeConverter TypeConverter converter) {
>   return converter.convertTo(StringSource.class, value);
> }
> {code}
> This allows you to get easily access to Camels type converter feature, instead of dealing with it yourself and maybe need to import extra classes and deal with exception handling and such.
> And btw I think StringSource should be moved to org.apache.camel so it does not reside in the subpackage: org.apache.camel.converter.jaxp.StringSource

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


[jira] Issue Comment Edited: (CAMEL-1446) Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50521#action_50521 ] 

Claus Ibsen edited comment on CAMEL-1446 at 3/13/09 7:40 AM:
-------------------------------------------------------------

Just define a parameter as TypeConverter and you will get it from Camel

{code}
public String foo(String body, TypeConverter tc) {
   return tc.convetTo(Integer.class, "123");
}
{code}

Committed revision 753284.

      was (Author: davsclaus):
    Just define a parameter as TypeConverter and you will get it from Camel

{code}
public String foo(String body, TypeConverter tc) {
   return tc.convetTo(Integer.class, "123");
}

Committed revision 753284.
  
> Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1446
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1446
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>
> See this article page 4, listening 6
> http://architects.dzone.com/articles/fuse-esb-4-osgi-based?page=0,3
> He wants to transform the body to a StringSource, and does it directly
> {code} 
> private Object value;
> public Object transform(Object notUsed) {
>   return new StringSource(body);
> }
> {code}
> We could add an @TypeConverter annotation, so you can let Camel handle it better
> {code}
> private Object value;
>  
> public StringSource transform(Object notUsed, @TypeConverter TypeConverter converter) {
>   return converter.convertTo(StringSource.class, value);
> }
> {code}
> This allows you to get easily access to Camels type converter feature, instead of dealing with it yourself and maybe need to import extra classes and deal with exception handling and such.
> And btw I think StringSource should be moved to org.apache.camel so it does not reside in the subpackage: org.apache.camel.converter.jaxp.StringSource

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


[jira] Commented: (CAMEL-1446) Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50415#action_50415 ] 

Claus Ibsen commented on CAMEL-1446:
------------------------------------

In fact we dont even need the @TypeConverter annotation, we could just pass in the type converter if the end user have defined a parameter with the TypeConverter type.
{code}
public StringSource transform(Object notUsed, TypeConverter converter) 
{code}

> Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1446
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1446
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>             Fix For: 2.0.0
>
>
> See this article page 4, listening 6
> http://architects.dzone.com/articles/fuse-esb-4-osgi-based?page=0,3
> He wants to transform the body to a StringSource, and does it directly
> {code} 
> private Object value;
> public Object transform(Object notUsed) {
>   return new StringSource(body);
> }
> {code}
> We could add an @TypeConverter annotation, so you can let Camel handle it better
> {code}
> private Object value;
>  
> public StringSource transform(Object notUsed, @TypeConverter TypeConverter converter) {
>   return converter.convertTo(StringSource.class, value);
> }
> {code}
> This allows you to get easily access to Camels type converter feature, instead of dealing with it yourself and maybe need to import extra classes and deal with exception handling and such.
> And btw I think StringSource should be moved to org.apache.camel so it does not reside in the subpackage: org.apache.camel.converter.jaxp.StringSource

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


[jira] Updated: (CAMEL-1446) Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1446:
-------------------------------

    Description: 
See this article page 4, listening 6
http://architects.dzone.com/articles/fuse-esb-4-osgi-based?page=0,3

He wants to transform the body to a StringSource, and does it directly
{code} 
private Object value;

public Object transform(Object notUsed) {
  return new StringSource(body);
}
{code}

We could add an @TypeConverter annotation, so you can let Camel handle it better
{code}
private Object value;
 
public StringSource transform(Object notUsed, @TypeConverter TypeConverter converter) {
  return converter.convertTo(StringSource.class, value);
}
{code}

This allows you to get easily access to Camels type converter feature, instead of dealing with it yourself and maybe need to import extra classes and deal with exception handling and such.

And btw I think StringSource should be moved to org.apache.camel so it does not reside in the subpackage: org.apache.camel.converter.jaxp.StringSource

  was:
See this article page 4, listening 6
http://architects.dzone.com/articles/fuse-esb-4-osgi-based?page=0,3

He wants to transform the body to a StringSource, and does it directly
{code} 
public Object transform(Object body) {
  return new StringSource(body);
}
{code}

We could add an @TypeConverter annotation, so you can let Camel handle it better
{code} 
public StringSource transform(Object body, @TypeConverter TypeConverter converter) {
  return converter.convertTo(StringSource.class, body);
}
{code}

This allows you to get easily access to Camels type converter feature, instead of dealing with it yourself and maybe need to import extra classes and deal with exception handling and such.

And btw I think StringSource should be moved to org.apache.camel so it does not reside in the subpackage: org.apache.camel.converter.jaxp.StringSource


> Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1446
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1446
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>             Fix For: 2.0.0
>
>
> See this article page 4, listening 6
> http://architects.dzone.com/articles/fuse-esb-4-osgi-based?page=0,3
> He wants to transform the body to a StringSource, and does it directly
> {code} 
> private Object value;
> public Object transform(Object notUsed) {
>   return new StringSource(body);
> }
> {code}
> We could add an @TypeConverter annotation, so you can let Camel handle it better
> {code}
> private Object value;
>  
> public StringSource transform(Object notUsed, @TypeConverter TypeConverter converter) {
>   return converter.convertTo(StringSource.class, value);
> }
> {code}
> This allows you to get easily access to Camels type converter feature, instead of dealing with it yourself and maybe need to import extra classes and deal with exception handling and such.
> And btw I think StringSource should be moved to org.apache.camel so it does not reside in the subpackage: org.apache.camel.converter.jaxp.StringSource

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


[jira] Assigned: (CAMEL-1446) Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-1446:
----------------------------------

    Assignee: Claus Ibsen

> Bean Binding - Add annotation @TypeConverter so end users easily can get access to the type converter
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1446
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1446
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>
> See this article page 4, listening 6
> http://architects.dzone.com/articles/fuse-esb-4-osgi-based?page=0,3
> He wants to transform the body to a StringSource, and does it directly
> {code} 
> private Object value;
> public Object transform(Object notUsed) {
>   return new StringSource(body);
> }
> {code}
> We could add an @TypeConverter annotation, so you can let Camel handle it better
> {code}
> private Object value;
>  
> public StringSource transform(Object notUsed, @TypeConverter TypeConverter converter) {
>   return converter.convertTo(StringSource.class, value);
> }
> {code}
> This allows you to get easily access to Camels type converter feature, instead of dealing with it yourself and maybe need to import extra classes and deal with exception handling and such.
> And btw I think StringSource should be moved to org.apache.camel so it does not reside in the subpackage: org.apache.camel.converter.jaxp.StringSource

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