Converting Channels to Portlets

If you have an existing IChannel which you'd like to rewrite as a portlet, a number of concepts need to be re-mapped.

IChannel Metaphor

Portlet Equivalent

Notes

RenderXML()

processAction(), render()

In IChannel the main method to display content is renderXML(). Portlets have a 2-phase lifecycle expressed via the processAction() and render() methods. This lifecycle is intended to:
#separate state-changing operations from non-state changing
#allow for lightweight, highly performant render() calls

IPerson

USER_INFO

Portlets provide a standard convention for getting user attributes by calling requres.getAttribute(USER_INFO) which returns a map of configured user attributes, mapped against PersonDirectory (in uPortal) via portlet.xml

deployment to uPortal/WEB-INF/classes

deployment as a WAR file

Portlets are typically packaged as separate web applications from the Portal server, and deployed using a special tool (in uPortal's case the deployPortletApp ANT target