Example usage for com.liferay.portal.kernel.portlet PortletPreferencesFactoryUtil getExistingPortletSetup

List of usage examples for com.liferay.portal.kernel.portlet PortletPreferencesFactoryUtil getExistingPortletSetup

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.portlet PortletPreferencesFactoryUtil getExistingPortletSetup.

Prototype

public static PortletPreferences getExistingPortletSetup(PortletRequest portletRequest) throws PortalException 

Source Link

Usage

From source file:com.liferay.blogs.web.internal.portlet.action.TrackbackMVCActionCommand.java

License:Open Source License

protected boolean isCommentsEnabled(ActionRequest actionRequest) throws Exception {

    PortletPreferences portletPreferences = PortletPreferencesFactoryUtil
            .getExistingPortletSetup(actionRequest);

    if (portletPreferences == null) {
        portletPreferences = actionRequest.getPreferences();
    }//from  w ww  .j  av a  2 s .  c  o  m

    return GetterUtil.getBoolean(portletPreferences.getValue("enableComments", null), true);
}