protected PortletDataContext getPortletDataContext(ExportImportConfiguration exportImportConfiguration) throws PortalException { Map<String, Serializable> settingsMap = exportImportConfiguration.getSettingsMap(); long companyId = MapUtil.getLong(settingsMap, "companyId"); long sourceGroupId = MapUtil.getLong(settingsMap, "sourceGroupId"); String portletId = MapUtil.getString(settingsMap, "portletId"); Map<String, String[]> parameterMap = (Map<String, String[]>) settingsMap.get("parameterMap"); DateRange dateRange = ExportImportDateUtil.getDateRange(exportImportConfiguration); ZipWriter zipWriter = ExportImportHelperUtil.getPortletZipWriter(portletId); PortletDataContext portletDataContext = PortletDataContextFactoryUtil.createExportPortletDataContext(companyId, sourceGroupId, parameterMap, dateRange.getStartDate(), dateRange.getEndDate(), zipWriter); portletDataContext.setPortletId(portletId); return portletDataContext; }
protected PortletDataContext getPortletDataContext(ExportImportConfiguration exportImportConfiguration) throws PortalException { Map<String, Serializable> settingsMap = exportImportConfiguration.getSettingsMap(); long companyId = MapUtil.getLong(settingsMap, "companyId"); long sourceGroupId = MapUtil.getLong(settingsMap, "sourceGroupId"); String portletId = MapUtil.getString(settingsMap, "portletId"); Map<String, String[]> parameterMap = (Map<String, String[]>) settingsMap.get("parameterMap"); DateRange dateRange = ExportImportDateUtil.getDateRange(exportImportConfiguration); ZipWriter zipWriter = ExportImportHelperUtil.getPortletZipWriter(portletId); PortletDataContext portletDataContext = PortletDataContextFactoryUtil.createExportPortletDataContext( companyId, sourceGroupId, parameterMap, dateRange.getStartDate(), dateRange.getEndDate(), zipWriter); portletDataContext.setPortletId(portletId); return portletDataContext; }
protected PortletDataContext getPortletDataContext(ExportImportConfiguration exportImportConfiguration) throws PortalException { Map<String, Serializable> settingsMap = exportImportConfiguration.getSettingsMap(); // String fileName = MapUtil.getString(settingsMap, "fileName"); long sourcePlid = MapUtil.getLong(settingsMap, "sourcePlid"); long sourceGroupId = MapUtil.getLong(settingsMap, "sourceGroupId"); String portletId = MapUtil.getString(settingsMap, "portletId"); Map<String, String[]> parameterMap = (Map<String, String[]>) settingsMap.get("parameterMap"); DateRange dateRange = ExportImportDateUtil.getDateRange(exportImportConfiguration); Layout layout = _layoutLocalService.getLayout(sourcePlid); ZipWriter zipWriter = ExportImportHelperUtil.getPortletZipWriter(portletId); PortletDataContext portletDataContext = PortletDataContextFactoryUtil.createExportPortletDataContext( layout.getCompanyId(), sourceGroupId, parameterMap, dateRange.getStartDate(), dateRange.getEndDate(), zipWriter); portletDataContext.setOldPlid(sourcePlid); portletDataContext.setPlid(sourcePlid); portletDataContext.setPortletId(portletId); return portletDataContext; }