4.6.11 PortletApplicationSettings object

This object is best thought of as wrapping the information defined in the <concrete-portlet-app> section of the portlet.xml deployment descriptor. It is used to encapsulate the information pertaining to all concrete portlets\ deployed as part of the same concrete portlet application. The context parameters defined in the concrete portlet application section of the portlet.xml are available through this object's getAttribute method. These parameters can be adjusted and new ones added only while a portlet is in configure mode.

getAttribute/setAttribute/removeAttribute: these methods provide access to attributes of the concrete portlet application.

Example 4-10 Working with PortletApplicationSettings

PortletApplicationSettings portletAppSettings = 
    request.getPortletSettings().getApplicationSettings(); 
String attribute = portletAppSettings.getAttribute("attribute"):

//Only available in doConfigure:
portletAppSettings.setAttribute("attribute", "Some Value");
portletAppSettings.store();


Redbooks
ibm.com/redbooks