Having trouble with PrivateStorage class

I am not sure if I am just doing something wrong or there is an issue in this class.

I have written a simple plugin so that I can set/get private data for jabber users via an http request.

When I use the add method in the PrivateStorage class to add a new element it doesn’'t seem to store in the Jabber database correctly.

Although I am setting a namespace it isn’'t being entered into the namespace column in the jivePrivate table.

privateStorage.add(username, privatedata);

privatedata is an xml element which looks like <test4 xmlns=“http://www.mysite.com/privatestore”>value4</test4>.

In the jivePrivate table…

username: StaticVortex

name: test4

namespace: (totally blank???)

value: <test4 xmlns=“http://www.mysite.com/privatestore”>value4</test4>

Also when I add another element to the private store it wipes out the existing one even though the name is different,

however this doesn’'t happen if the namespace is different (assuming I enter the namespace directly in the database

because as described above it is setting it to blank for some reason).

Can anyone point out the obvious?



Been looking into this further - seems to be some problems with the class…

In the wildfire java class it states that it is checking both the name and namespace for a match however

this isn’'t the case…

private static final String LOAD_PRIVATE =

“SELECT value FROM jivePrivate WHERE username=? AND namespace=?”;

There is no check for name in the query?

There seems to be a number of issues with this class - obviously not tested

I will have to create my own copy of this class in the Plugin and remake it.


Message was edited by: StaticVortex