Example usage for com.liferay.portal.util PropsValues THEME_PORTLET_SHARING_DEFAULT

List of usage examples for com.liferay.portal.util PropsValues THEME_PORTLET_SHARING_DEFAULT

Introduction

In this page you can find the example usage for com.liferay.portal.util PropsValues THEME_PORTLET_SHARING_DEFAULT.

Prototype

boolean THEME_PORTLET_SHARING_DEFAULT

To view the source code for com.liferay.portal.util PropsValues THEME_PORTLET_SHARING_DEFAULT.

Click Source Link

Usage

From source file:com.liferay.portlet.configuration.sharing.web.internal.portlet.configuration.icon.WidgetPortletConfigurationIcon.java

License:Open Source License

@Override
public boolean isShow(PortletRequest portletRequest) {
    ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);

    PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

    PortletPreferences portletSetup = portletDisplay.getPortletSetup();

    boolean lfrWidgetShowAddAppLink = GetterUtil.getBoolean(
            portletSetup.getValue("lfrWidgetShowAddAppLink", null), PropsValues.THEME_PORTLET_SHARING_DEFAULT);

    if (lfrWidgetShowAddAppLink) {
        return true;
    }/*from   w  ww.j a  v a2 s.co m*/

    return false;
}