You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Henryk Konsek <he...@gmail.com> on 2010/09/24 10:26:53 UTC

[XStream] Omitting fields configuration patch

Hi

I posted that message yesterday using the Nabble but it is still
marked as 'pending'
(http://camel.465427.n5.nabble.com/XStream-Omit-fields-configuration-patch-td2851421.html#a2851421).
So now I try send it directly to the mailing list.

So... XStream allows to ignore selected fields for particular classes
(kind of "transient" fields). This feature is descibed here - Tweaking
XStream output (http://xstream.codehaus.org/manual-tweaking-output.html).

I needed to use that functionality in the Camel XStream data
transformation. AbstractXStreamWrapper provides support for aliases
and implicit collections but doesn't for XStream#omitField.

At this moment this problem can be handled with custom XStream Spring
FactoryBean and AbstractXStreamWrapper#setXStream method (just like I
did). However this solution is quite verbose. I think that if
AbstractXStreamWrapper supports both aliases and implicit collections
configuration, it should also supports fields omitting.

I've created patch for AbstractXStreamWrapper and unit test for it.
Maybe somebody could submit it to the codebase?

Kind regards.

-- 
Henryk Konsek

Re: [XStream] Omitting fields configuration patch

Posted by Henryk Konsek <he...@gmail.com>.
On Fri, Sep 24, 2010 at 10:38 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Can you create a ticket in JIRA with the patch and assign the file,
> and remember to tick [x] for granting license to Apache.
> Otherwise we can accept and use the patch in the code base if no
> license accepted.

Done - https://issues.apache.org/activemq/browse/CAMEL-3153 .

-- 
Henryk Konsek

Re: [XStream] Omitting fields configuration patch

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Can you create a ticket in JIRA with the patch and assign the file,
and remember to tick [x] for granting license to Apache.
Otherwise we can accept and use the patch in the code base if no
license accepted.

Link to JIRA from here (issue tracker)
http://camel.apache.org/support.html

On Fri, Sep 24, 2010 at 10:26 AM, Henryk Konsek <he...@gmail.com> wrote:
> Hi
>
> I posted that message yesterday using the Nabble but it is still
> marked as 'pending'
> (http://camel.465427.n5.nabble.com/XStream-Omit-fields-configuration-patch-td2851421.html#a2851421).
> So now I try send it directly to the mailing list.
>
> So... XStream allows to ignore selected fields for particular classes
> (kind of "transient" fields). This feature is descibed here - Tweaking
> XStream output (http://xstream.codehaus.org/manual-tweaking-output.html).
>
> I needed to use that functionality in the Camel XStream data
> transformation. AbstractXStreamWrapper provides support for aliases
> and implicit collections but doesn't for XStream#omitField.
>
> At this moment this problem can be handled with custom XStream Spring
> FactoryBean and AbstractXStreamWrapper#setXStream method (just like I
> did). However this solution is quite verbose. I think that if
> AbstractXStreamWrapper supports both aliases and implicit collections
> configuration, it should also supports fields omitting.
>
> I've created patch for AbstractXStreamWrapper and unit test for it.
> Maybe somebody could submit it to the codebase?
>
> Kind regards.
>
> --
> Henryk Konsek
>



-- 
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