List of usage examples for com.liferay.portal.kernel.util PortalUtil getSharedContentSiteGroupIds
public static long[] getSharedContentSiteGroupIds(long companyId, long groupId, long userId) throws PortalException
From source file:com.liferay.asset.browser.web.internal.display.context.AssetBrowserDisplayContext.java
License:Open Source License
public long[] getSelectedGroupIds() throws PortalException { long[] selectedGroupIds = StringUtil.split(ParamUtil.getString(_request, "selectedGroupIds"), 0L); if (selectedGroupIds.length > 0) { return selectedGroupIds; }//w w w. j a v a 2s . c om ThemeDisplay themeDisplay = (ThemeDisplay) _request.getAttribute(WebKeys.THEME_DISPLAY); long selectedGroupId = ParamUtil.getLong(_request, "selectedGroupId"); return PortalUtil.getSharedContentSiteGroupIds(themeDisplay.getCompanyId(), selectedGroupId, themeDisplay.getUserId()); }
From source file:com.liferay.journal.content.web.internal.display.context.JournalContentDisplayContext.java
License:Open Source License
public long[] getSelectedGroupIds() throws PortalException { ThemeDisplay themeDisplay = (ThemeDisplay) _portletRequest.getAttribute(WebKeys.THEME_DISPLAY); Group scopeGroup = themeDisplay.getScopeGroup(); if (scopeGroup.isStagingGroup() && !scopeGroup.isInStagingPortlet(JournalPortletKeys.JOURNAL)) { return new long[] { scopeGroup.getLiveGroupId() }; }/*from ww w . j a v a2 s . co m*/ if (themeDisplay.getScopeGroupId() == themeDisplay.getSiteGroupId()) { return PortalUtil.getSharedContentSiteGroupIds(themeDisplay.getCompanyId(), themeDisplay.getScopeGroupId(), themeDisplay.getUserId()); } return new long[] { themeDisplay.getScopeGroupId() }; }