<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Kommentare zu: Confluence Persistenz mit Bandana &#8211; Fallstricke</title>
	<atom:link href="http://www.communardo.de/home/techblog/2009/01/30/confluence-persistenz-mit-bandana-fallstricke/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.communardo.de/home/techblog/2009/01/30/confluence-persistenz-mit-bandana-fallstricke/</link>
	<description></description>
	<lastBuildDate>Thu, 25 Feb 2010 09:24:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Von: Keith Brophy</title>
		<link>http://www.communardo.de/home/techblog/2009/01/30/confluence-persistenz-mit-bandana-fallstricke/comment-page-1/#comment-37</link>
		<dc:creator>Keith Brophy</dc:creator>
		<pubDate>Thu, 30 Apr 2009 10:07:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.communardo.de/techblog/?p=980#comment-37</guid>
		<description>Hi,

Apologies that I am commenting in English - but my German is quite rusty. You may find the following article of interest in relation to enums and persisting such data in Bandana: http://tr.im/k5dv.

Also, and forgive me if I am misunderstanding the post (relying on Google translate!), it is possible to store plugin defined classes within Bandana. In order to achieve this, it is necessary to set the classloader of XStream to the classloader of the plugin and convert the objects to be persisted into XML (as noted here: http://confluence.atlassian.com/display/DOC/Persistence+in+Confluence?focusedCommentId=185062#comment-185062):


// Store the object
XStream xStream = new XStream();
xStream.setClassLoader(getClass().getClassLoader());

String xml = xStream.toXml(myObject);
bandanaManager.setValue(ctx, key, xml);

// Later, retrieve the object
myObject = (MyObjectClass)xStream.fromXml(bandandaManager.getValue(ctx, key));</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Apologies that I am commenting in English &#8211; but my German is quite rusty. You may find the following article of interest in relation to enums and persisting such data in Bandana: <a href="http://tr.im/k5dv" rel="nofollow">http://tr.im/k5dv</a>.</p>
<p>Also, and forgive me if I am misunderstanding the post (relying on Google translate!), it is possible to store plugin defined classes within Bandana. In order to achieve this, it is necessary to set the classloader of XStream to the classloader of the plugin and convert the objects to be persisted into XML (as noted here: <a href="http://confluence.atlassian.com/display/DOC/Persistence+in+Confluence?focusedCommentId=185062#comment-185062)" rel="nofollow">http://confluence.atlassian.com/display/DOC/Persistence+in+Confluence?focusedCommentId=185062#comment-185062)</a>:</p>
<p>// Store the object<br />
XStream xStream = new XStream();<br />
xStream.setClassLoader(getClass().getClassLoader());</p>
<p>String xml = xStream.toXml(myObject);<br />
bandanaManager.setValue(ctx, key, xml);</p>
<p>// Later, retrieve the object<br />
myObject = (MyObjectClass)xStream.fromXml(bandandaManager.getValue(ctx, key));</p>
]]></content:encoded>
	</item>
</channel>
</rss>
