Example usage for com.liferay.portal.kernel.util PrefsParamUtil getString

List of usage examples for com.liferay.portal.kernel.util PrefsParamUtil getString

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util PrefsParamUtil getString.

Prototype

public static String getString(PortletPreferences preferences, PortletRequest portletRequest, String param,
            String defaultValue) 

Source Link

Usage

From source file:com.liferay.announcements.web.internal.display.context.DefaultAnnouncementsDisplayContext.java

License:Open Source License

protected String getSelectedScopeGroupIds() {
    Layout layout = _announcementsRequestHelper.getLayout();

    return PrefsParamUtil.getString(_announcementsRequestHelper.getPortletPreferences(),
            _announcementsRequestHelper.getRequest(), "selectedScopeGroupIds",
            String.valueOf(layout.getGroupId()));
}

From source file:com.liferay.announcements.web.internal.display.context.DefaultAnnouncementsDisplayContext.java

License:Open Source License

protected String getSelectedScopeOrganizationIds() {
    return PrefsParamUtil.getString(_announcementsRequestHelper.getPortletPreferences(),
            _announcementsRequestHelper.getRequest(), "selectedScopeOrganizationIds", StringPool.BLANK);
}

From source file:com.liferay.announcements.web.internal.display.context.DefaultAnnouncementsDisplayContext.java

License:Open Source License

protected String getSelectedScopeRoleIds() {
    return PrefsParamUtil.getString(_announcementsRequestHelper.getPortletPreferences(),
            _announcementsRequestHelper.getRequest(), "selectedScopeRoleIds", StringPool.BLANK);
}

From source file:com.liferay.announcements.web.internal.display.context.DefaultAnnouncementsDisplayContext.java

License:Open Source License

protected String getSelectedScopeUserGroupIds() {
    return PrefsParamUtil.getString(_announcementsRequestHelper.getPortletPreferences(),
            _announcementsRequestHelper.getRequest(), "selectedScopeUserGroupIds", StringPool.BLANK);
}

From source file:com.liferay.journal.web.internal.display.context.JournalDisplayContext.java

License:Open Source License

public String[] getDisplayViews() {
    if (_displayViews == null) {
        JournalWebConfiguration journalWebConfiguration = (JournalWebConfiguration) _request
                .getAttribute(JournalWebConfiguration.class.getName());

        _displayViews = StringUtil.split(PrefsParamUtil.getString(_portletPreferences, _request, "displayViews",
                StringUtil.merge(journalWebConfiguration.displayViews())));
    }/*from   w w  w .  java2 s  .  c  o m*/

    return _displayViews;
}

From source file:com.liferay.site.navigation.admin.web.internal.display.context.SiteNavigationAdminDisplayContext.java

License:Open Source License

public String[] getDisplayViews() {
    if (_displayViews == null) {
        _displayViews = StringUtil.split(PrefsParamUtil.getString(_portletPreferences, _request, "displayViews",
                "list,icon,descriptive"));
    }//from  ww  w .j ava  2  s .com

    return _displayViews;
}