Liferay: Get a list of Colour schemes for a theme in Portlet

Just trying to work out how to set theme colour schemes in a portlet, and I’m no step closer, but I did find out how to get a list of colour schemes in a portlet, and it goes a bit like this:

ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
List<ColorScheme> colors = themeDisplay.getTheme().getColorSchemes();
for(ColorScheme color : colors) {
System.out.println(“color: “+color.getName()+ “(“+color.getColorSchemeId()+”)”);
}

I know, I know, there’s a system.out in the code, it’s only for people to see, I would never do that in a production portlet ;-)

Rss Feed, Client retrieval or Server Retrieval

I have been tasked write the technical specification for an RSS (Really Simple Syndication) feed portlet for a Liferay! This is an Agile development, so I will be producing a very small amount of documentation based on features.

Sounds easy, and it will be to build, the difficulty is deciding how.  The first consideration is:

  • Retrieving RSS feed by the Client (browser)?
  • or do I get the Server to retrieve the RSS feed?

Lets look at the pros and cons I guess.