All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.publish.simple.publish_layouts_simple.jsp Maven / Gradle / Ivy

There is a newer version: 5.0.96
Show newest version
<%--
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */
--%>

<%@ include file="/init.jsp" %>



<%
String cmd = ParamUtil.getString(request, Constants.CMD, Constants.PUBLISH_TO_LIVE);

long exportImportConfigurationId = GetterUtil.getLong(request.getAttribute("exportImportConfigurationId"), ParamUtil.getLong(request, "exportImportConfigurationId"));

ExportImportConfiguration exportImportConfiguration = ExportImportConfigurationLocalServiceUtil.getExportImportConfiguration(exportImportConfigurationId);

long selPlid = ParamUtil.getLong(request, "selPlid", LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);

boolean localPublishing = true;
String publishMessageKey = "publish-to-live";

if (exportImportConfiguration.getType() == ExportImportConfigurationConstants.TYPE_PUBLISH_LAYOUT_REMOTE) {
	cmd = Constants.PUBLISH_TO_REMOTE;

	localPublishing = false;
	publishMessageKey = "publish-to-remote-live";
}

GroupDisplayContextHelper groupDisplayContextHelper = new GroupDisplayContextHelper(request);

Map settingsMap = exportImportConfiguration.getSettingsMap();

Map parameterMap = (Map)settingsMap.get("parameterMap");
%>


	



	
	
	



	
	
	

	<%@ include file="/publish/error/error_auth_exception.jspf" %>

	<%@ include file="/publish/error/error_remote_export_exception.jspf" %>

	<%@ include file="/publish/error/error_remote_options_exception.jspf" %>

	
<% String taskExecutorClassName = localPublishing ? BackgroundTaskExecutorNames.LAYOUT_STAGING_BACKGROUND_TASK_EXECUTOR : BackgroundTaskExecutorNames.LAYOUT_REMOTE_STAGING_BACKGROUND_TASK_EXECUTOR; int incompleteBackgroundTasksCount = BackgroundTaskManagerUtil.getBackgroundTasksCount(groupDisplayContextHelper.getStagingGroupId(), taskExecutorClassName, false); if (localPublishing) { incompleteBackgroundTasksCount += BackgroundTaskManagerUtil.getBackgroundTasksCount(groupDisplayContextHelper.getLiveGroupId(), taskExecutorClassName, false); } %>
" id="incompleteProcessMessage">
    • <% Set portletDataHandlerClassNames = new HashSet(); List dataSiteLevelPortlets = ExportImportHelperUtil.getDataSiteLevelPortlets(company.getCompanyId(), false); %> <% boolean displayingChanges = false; for (Portlet portlet : dataSiteLevelPortlets) { PortletDataHandler portletDataHandler = portlet.getPortletDataHandlerInstance(); Class portletDataHandlerClass = portletDataHandler.getClass(); String portletDataHandlerClassName = portletDataHandlerClass.getName(); if (portletDataHandlerClassNames.contains(portletDataHandlerClassName)) { continue; } portletDataHandlerClassNames.add(portletDataHandlerClassName); settingsMap.put("portletId", portlet.getRootPortletId()); DateRange dateRange = ExportImportDateUtil.getDateRange(exportImportConfiguration); PortletDataContext portletDataContext = PortletDataContextFactoryUtil.createPreparePortletDataContext(company.getCompanyId(), groupDisplayContextHelper.getStagingGroupId(), ExportImportDateUtil.RANGE_FROM_LAST_PUBLISH_DATE, dateRange.getStartDate(), dateRange.getEndDate()); portletDataHandler.prepareManifestSummary(portletDataContext); ManifestSummary manifestSummary = portletDataContext.getManifestSummary(); long exportModelCount = portletDataHandler.getExportModelCount(manifestSummary); long modelDeletionCount = manifestSummary.getModelDeletionCount(portletDataHandler.getDeletionSystemEventStagedModelTypes()); UnicodeProperties liveGroupTypeSettingsUnicodeProperties = liveGroup.getTypeSettingsProperties(); %> <% displayingChanges = true; %> <%= (exportModelCount > 0) ? exportModelCount : StringPool.BLANK %> <%= (modelDeletionCount > 0) ? (modelDeletionCount + StringPool.SPACE + LanguageUtil.get(request, "deletions")) : StringPool.BLANK %>
    • <% } settingsMap.remove("portletId"); %>
    • <% int layoutsCount = 0; long layoutSetBranchId = ParamUtil.getLong(request, "layoutSetBranchId"); if (layoutSetBranchId > 0) { List approvedLayoutRevisions = LayoutRevisionLocalServiceUtil.getLayoutRevisions(layoutSetBranchId, true, WorkflowConstants.STATUS_APPROVED); List pendingLayoutRevisions = LayoutRevisionLocalServiceUtil.getLayoutRevisions(layoutSetBranchId, true, WorkflowConstants.STATUS_PENDING); layoutsCount = approvedLayoutRevisions.size() + pendingLayoutRevisions.size(); } else { LayoutSet selLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(groupDisplayContextHelper.getGroupId(), privateLayout); layoutsCount = selLayoutSet.getPageCount(); } DateRange dateRange = ExportImportDateUtil.getDateRange(exportImportConfiguration); PortletDataContext portletDataContext = PortletDataContextFactoryUtil.createPreparePortletDataContext(company.getCompanyId(), groupDisplayContextHelper.getStagingGroupId(), ExportImportDateUtil.RANGE_FROM_LAST_PUBLISH_DATE, dateRange.getStartDate(), dateRange.getEndDate()); long layoutModelDeletionCount = ExportImportHelperUtil.getLayoutModelDeletionCount(portletDataContext, privateLayout); %> <%= (layoutModelDeletionCount > 0) ? (layoutModelDeletionCount + StringPool.SPACE + LanguageUtil.get(request, "deletions")) : StringPool.BLANK %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy