Provide equivalent functionality proposed in previous commit but based on Settings API instead of in PortletPreferences.