public Layout getScopeLayout() throws PortalException { if (_layout.hasScopeGroup()) { return _layout; } else if (_scopeGroup.isLayout()) { return LayoutLocalServiceUtil.getLayout(_scopeGroup.getClassPK()); } return null; }
protected Object[] fetchPlidAndPortletId( PermissionChecker permissionChecker, long groupId, String[] portletIds) throws PortalException { for (String portletId : portletIds) { ObjectValuePair<Long, String> plidAndPortletIdObjectValuePair = _getPlidPortletIdObjectValuePair(groupId, portletId); long plid = plidAndPortletIdObjectValuePair.getKey(); if (plid == LayoutConstants.DEFAULT_PLID) { continue; } Layout layout = LayoutLocalServiceUtil.getLayout(plid); if (!LayoutPermissionUtil.contains( permissionChecker, layout, ActionKeys.VIEW)) { continue; } return new Object[] { plid, plidAndPortletIdObjectValuePair.getValue() }; } return null; }
private ObjectValuePair<Long, String> _getPlidPortletIdObjectValuePair( long scopeGroupId, String portletId) throws PortalException { Group group = GroupLocalServiceUtil.getGroup(scopeGroupId); long groupId = group.getGroupId(); if (group.isLayout()) { Layout scopeLayout = LayoutLocalServiceUtil.getLayout( group.getClassPK()); groupId = scopeLayout.getGroupId(); } return _getPlidPortletIdObjectValuePair( groupId, scopeGroupId, portletId); }
Layout layout = LayoutLocalServiceUtil.getLayout( groupId, privateLayout, getLayoutId());
private List<Group> _filterLayoutGroups( List<Group> groups, Boolean privateLayout) throws Exception { if (privateLayout == null) { return groups; } List<Group> filteredGroups = new ArrayList(); for (Group group : groups) { if (!group.isLayout()) { continue; } Layout layout = LayoutLocalServiceUtil.getLayout( group.getClassPK()); if (layout.isPrivateLayout() == privateLayout) { filteredGroups.add(group); } } return filteredGroups; }
Layout layout = LayoutLocalServiceUtil.getLayout( themeDisplay.getPlid());
/** * @see com.liferay.portal.lar.ExportImportHelperImpl#getMissingParentLayouts( * Layout, long) */ protected List<Layout> getMissingRemoteParentLayouts( HttpPrincipal httpPrincipal, Layout layout, long remoteGroupId) throws PortalException { List<Layout> missingRemoteParentLayouts = new ArrayList<>(); long parentLayoutId = layout.getParentLayoutId(); while (parentLayoutId > 0) { Layout parentLayout = LayoutLocalServiceUtil.getLayout( layout.getGroupId(), layout.isPrivateLayout(), parentLayoutId); if (StagingServiceHttp.hasRemoteLayout( httpPrincipal, parentLayout.getUuid(), remoteGroupId, parentLayout.isPrivateLayout())) { // If one parent is found, all others are assumed to exist break; } missingRemoteParentLayouts.add(parentLayout); parentLayoutId = parentLayout.getParentLayoutId(); } return missingRemoteParentLayouts; }
throws Exception { Layout layout = LayoutLocalServiceUtil.getLayout( themeDisplayModel.getPlid());
Layout scopeLayout = LayoutLocalServiceUtil.getLayout( group.getClassPK());