On Tue, Jan 22, 2013 at 12:47 AM, Andreas Guth <[email protected]> wrote: > Hi, > > I'm currently running into some problems while integrating the ROLE > IWC and I hope that someone can answer a few questions about the Rave > code. I'm guessing most of my problems are due to the fact that I > never developed with the Spring framework before. > > 1. > I tried to alter the User model to include a second password used only > for IWC. To create this I also use the password hashing function that > is used for the normal password. After I added this all the tests for > User creation stated failing because I was running the password > hashing function twice. I'm think I can make the tests pass again by > altering all User creation tests but I guess my question is if there > is a better way to fix this.
Rave uses EasyMock[1] to create mock dependencies. You only need to add another expectation to the mock so that it knows that it will be called more than once. > > 2. > I see that Rave is using Spring to load Properties from a .Properties > file for configuration. My plan is to include the XMPP options in the > same way as tho mongodb options in the Properties file. I couldn't > find the code that actually loads and uses these values in the Java > code though. I'm guessing I just overlooked it, so if someone could > tell me which file/function/line I have to look up to see how you do > this, that would be great. The Mongo bean creation is managed by a Spring XML context, which is why you don't see it in Java. MongoDB's configuration is currently required at startup time and must stay in properties (at least without rework of how we load beans). For the XMPP server though, you might want to consider letting it be database driven via the PortalPreferences in the admin section. In general, I think we need to put more of the configuration into the portal properties and less in properties files. This gives us the greatest flexibility in deployment. And for those who would like to keep all configuration in properties files, all they have to do is implement the PortalPreferences repository to load from properties. > > 2. > In ROLE the XMPP credentials are provided to the client via a call to > the opensocial API and the XMPP host/port via a static JavaScript > file. Because Rave does not seem to have the same API in place and > because there are many possible ways to send data to the user, my > question here is what would be the most straightforward way to get > this data from the backend to the user in the Rave framework. Again, a > pointer to some code that does something similar would be great. You might need to create a new API endpoint in Rave itself. On the shindig side, you should be able to use a feature with static js or make a call to the Rave endpoint. > > Thanks, > Andreas [1]:http://www.easymock.org/EasyMock2_2_Documentation.html
