Example usage for com.liferay.portal.kernel.settings TypedSettings getBooleanValue

List of usage examples for com.liferay.portal.kernel.settings TypedSettings getBooleanValue

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.settings TypedSettings getBooleanValue.

Prototype

public boolean getBooleanValue(String key) 

Source Link

Usage

From source file:blade.document.action.displaycontext.BladeActionDisplayContext.java

License:Apache License

/**
 * Read settings from page Documents And Media portlet "Show Actions" portlet configuration.<br/>
 * But for Documents And Media admin portlet, it will always be true.
 *//*from w w w  .j a  v  a  2s . c  om*/
private boolean _showAction() throws SettingsException {
    PortletDisplay portletDisplay = _themeDisplay.getPortletDisplay();

    String portletName = portletDisplay.getPortletName();

    if (portletName.equals(PortletKeys.DOCUMENT_LIBRARY_ADMIN)) {
        return true;
    }

    Settings settings = SettingsFactoryUtil
            .getSettings(new PortletInstanceSettingsLocator(_themeDisplay.getLayout(), portletDisplay.getId()));

    TypedSettings typedSettings = new TypedSettings(settings);

    return typedSettings.getBooleanValue("showActions");
}