Daily Archives: July 3, 2007

Sakai Dashboard Portlet (JSR-168)

I just finished writing a simple Sakai Dashboard JSR-168 portlet. The portlet logs into a Sakai server on behalf of a user and retrieves and RSS feed of the sites and their announcements for the user. Then the feed is displayed in the portlet – all of the links are target=_new so there are ZERO iframes in the portlet and portal.
I need to write documentation for it (of course) – but the code is here:
https://source.sakaiproject.org/contrib/portlets/trunk/
This directory now can be checked out and compiles *outside* of a Sakai source tree – it only needs the Sakai maven plugin.
maven plugin:download -DgroupId=sakaiproject -DartifactId=sakai -Dversion=2.2
This portlet configures and operates much like the Launch Portlet that we have had for a while now. It uses SakaiPortalLogin.jws like the other portlets. The Dashboard portlet can be configured via Admin-specified preferences in addition to the portlet.xml -this should make it easier to install and configure.
I use Rome to retrieve and parse the feed – all the markup is in Velocity. I have code in place to retrieve the raw feed in case someone wants to apply some XSLT to it to make it prettier.
Yes, I know the portlet is ugly – that is why all the markup is in Velocity so folks can fix it for me – or just switch to XSLT. I am going to run through some deployment scenarios in uPortal and Pluto and write some basic documentation about how to set things up.
I took the opportunity to go through the portlets and do some general cleanup and improve some patterns as I have gained more experience in writing portlets and portlet support code.
Thanks to Alves Phillipe from Pierre-Marie Curie Institute who worked with me at JA-Sig on the idea to get me started.
Comments, patches, etc needed and welcomed. I use a new mechanism to retrieve remote user, etc – so I need a parch to my lookupPortalType method in PortletHelper.java for Gridsphere and Oracle.