@Override public boolean isStagedRemotely() { return _group.isStagedRemotely(); }
@Override public Group getLiveGroup(Group group) { if (group == null) { return null; } if (group.isStagingGroup() && !group.isStagedRemotely()) { return group.getLiveGroup(); } return group; }
@Override public boolean isGroupAccessible(Group group, Group fromGroup) { if (group.equals(fromGroup)) { return true; } if (group.isStaged() && !group.isStagedRemotely() && group.isStagingGroup()) { return false; } if (group.hasStagingGroup() && fromGroup.equals(group.getStagingGroup())) { return false; } return true; }
@Override public Group getStagingGroup(long groupId) { Group group = _groupLocalService.fetchGroup(groupId); if (group == null) { return null; } Group stagingGroup = group; if (!group.isStagedRemotely() && group.hasStagingGroup()) { stagingGroup = group.getStagingGroup(); } return stagingGroup; }
protected int getStagingType( PortletRequest portletRequest, Group liveGroup) { String stagingType = portletRequest.getParameter("stagingType"); if (stagingType != null) { return GetterUtil.getInteger(stagingType); } if (liveGroup.isStagedRemotely()) { return StagingConstants.TYPE_REMOTE_STAGING; } if (liveGroup.hasStagingGroup()) { return StagingConstants.TYPE_LOCAL_STAGING; } return StagingConstants.TYPE_NOT_STAGED; }
@Override public Group getLiveGroup(long groupId) { if (groupId <= 0) { return null; } Group group = _groupLocalService.fetchGroup(groupId); if (group == null) { return null; } if (group.isStagingGroup() && !group.isStagedRemotely()) { return group.getLiveGroup(); } return group; }
pageContext.setAttribute("stagingGroupId", 0L); if (!group.isStaged() && !group.isStagedRemotely() && !group.hasLocalOrRemoteStagingGroup()) { if (!group.hasRemoteStagingGroup() || group.isStagedRemotely()) { stagingGroup = StagingUtil.getStagingGroup(group.getGroupId()); boolean stagedPortlet = liveGroup.isStagedPortlet(_portletId); if (group.isStagedRemotely()) { stagedPortlet = stagingGroup.isStagedPortlet(_portletId);
if ((sourceGroup == null) || !sourceGroup.isStagedRemotely()) { return false;
@Override public void addPortletPermissions(String resourceName) throws PortalException { long groupId = getGroupId(); Group group = GroupLocalServiceUtil.getGroup(groupId); if (group.isStagingGroup()) { if (group.isStagedRemotely()) { groupId = group.getLiveGroupId(); } else { return; } } addPermissions(resourceName, groupId); }
protected void updateScheduledPublications(Group group) throws PortalException { try (LoggingTimer loggingTimer = new LoggingTimer( String.valueOf(group.getGroupId()))) { boolean localStaging = true; if (group.isStagedRemotely() || group.hasRemoteStagingGroup()) { localStaging = false; } List<SchedulerResponse> scheduledJobs = _schedulerEngineHelper.getScheduledJobs( getSchedulerGroupName(group.getGroupId(), localStaging), StorageType.PERSISTED); for (SchedulerResponse schedulerResponse : scheduledJobs) { if (localStaging) { updateScheduledLocalPublication(schedulerResponse); } else { updateScheduleRemotePublication(schedulerResponse); } } } }
throws PortalException { if (!stagingGroup.isStagedRemotely()) { return StringPool.BLANK;
@Override public long publishPortlet( long userId, long sourceGroupId, long targetGroupId, long sourcePlid, long targetPlid, String portletId, Map<String, String[]> parameterMap) throws PortalException { User user = _userLocalService.getUser(userId); Map<String, Serializable> publishPortletSettingsMap = _exportImportConfigurationSettingsMapFactory. buildPublishPortletSettingsMap( userId, sourceGroupId, sourcePlid, targetGroupId, targetPlid, portletId, parameterMap, user.getLocale(), user.getTimeZone()); Group sourceGroup = _groupLocalService.getGroup(sourceGroupId); int type = ExportImportConfigurationConstants.TYPE_PUBLISH_PORTLET_LOCAL; if (sourceGroup.isStagedRemotely()) { type = ExportImportConfigurationConstants.TYPE_PUBLISH_PORTLET_REMOTE; } ExportImportConfiguration exportImportConfiguration = _exportImportConfigurationLocalService. addDraftExportImportConfiguration( userId, type, publishPortletSettingsMap); return publishPortlet(userId, exportImportConfiguration); }
if (group.isStagedRemotely()) { liveGroupId = group.getRemoteLiveGroupId();
if (!group.isStagedRemotely() && group.hasStagingGroup()) { try { PermissionChecker permissionChecker =
boolean isStagingGroup = false; if (group.isStagingGroup() && !group.isStagedRemotely()) { isStagingGroup = true; (!group.isStagedRemotely() && !isStagingGroup)) {
private String _getDescriptiveName() { ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute( WebKeys.THEME_DISPLAY); StringBundler sb = new StringBundler(5); try { String descriptiveName = HtmlUtil.escape( _group.getDescriptiveName(themeDisplay.getLocale())); sb.append(descriptiveName); if (_group.isStaged() && !_group.isStagedRemotely() && _group.isStagingGroup()) { sb.append(StringPool.SPACE); sb.append(StringPool.OPEN_PARENTHESIS); sb.append(LanguageUtil.get(request, "staging")); sb.append(StringPool.CLOSE_PARENTHESIS); } } catch (PortalException pe) { if (_log.isDebugEnabled()) { _log.debug(pe, pe); } } return sb.toString(); }
if (liveGroup.hasStagingGroup() || liveGroup.isStagedRemotely()) { _stagingLocalService.disableStaging( portletRequest, liveGroup, serviceContext);
if (group.isStaged() && !group.isStagedRemotely() && !group.isStagedPortlet(JournalPortletKeys.JOURNAL)) {
stagingGroup = _groupLocalService.fetchGroup(scopeGroupId); if (stagingGroup.isStagedRemotely()) { targetGroupId = stagingGroup.getRemoteLiveGroupId(); stagingGroup = sourceLayout.getGroup(); if (stagingGroup.isStagedRemotely()) { targetGroupId = stagingGroup.getRemoteLiveGroupId();