@Override protected Map<String, String[]> getExportParameterMap() throws Exception { Map<String, String[]> parameterMap = super.getExportParameterMap(); MapUtil.merge(parameterMap, getBaseParameterMap(group.getGroupId(), layout.getPlid())); parameterMap.put( PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + PortletKeys.JOURNAL, new String[] {Boolean.TRUE.toString()}); return parameterMap; }
@Override protected Map<String, String[]> getImportParameterMap() throws Exception { Map<String, String[]> parameterMap = super.getImportParameterMap(); MapUtil.merge( parameterMap, getBaseParameterMap(importedGroup.getGroupId(), importedLayout.getPlid())); parameterMap.put( PortletDataHandlerKeys.DATA_STRATEGY, new String[] {PortletDataHandlerKeys.DATA_STRATEGY_MIRROR}); parameterMap.put( PortletDataHandlerKeys.DELETE_PORTLET_DATA, new String[] {Boolean.FALSE.toString()}); parameterMap.put( PortletDataHandlerKeys.USER_ID_STRATEGY, new String[] {UserIdStrategy.CURRENT_USER_ID}); return parameterMap; }
protected Map<String, Object> getData() { String portletId = (String) request.getAttribute(WebKeys.PORTLET_ID); if (portletId == null) { return _data; } Map<String, Object> attributes = new HashMap<>(); Enumeration<String> enumeration = request.getAttributeNames(); while (enumeration.hasMoreElements()) { String attributeName = enumeration.nextElement(); if (attributeName.startsWith("liferay-ui:input-editor")) { attributes.put(attributeName, request.getAttribute(attributeName)); } } attributes.put("liferay-ui:input-editor:namespace", getNamespace()); ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); EditorConfiguration editorConfiguration = EditorConfigurationFactoryUtil.getEditorConfiguration( portletId, getConfigKey(), getEditorName(request), attributes, themeDisplay, getRequestBackedPortletURLFactory()); Map<String, Object> data = editorConfiguration.getData(); if (MapUtil.isNotEmpty(_data)) { MapUtil.merge(_data, data); } return data; }