@Override public String doExportData( PortletDataContext context, String portletId, PortletPreferences preferences) throws PortletDataException { long communityId = context.getScopeGroupId(); LOGGER.debug( "Exporting CRUD portlet data for portletId {}, communityId {}", portletId, communityId); try { preferences.setValue("VERSION", String.valueOf(EXPORT_VERSION)); if (configurationService.hasConfigData(portletId, communityId)) { exportRolesAndPermissions(context, portletId, preferences, communityId); exportConfig(context, portletId, communityId); preferences.store(); ConfigurationMetaData metaData = configurationService.getConfigurationMetaData(portletId, communityId); return metaData.getFileName(); } else { preferences.store(); return "Keine Konfiguration vorhanden"; } } catch (Exception e) { throw new PortletDataException("Error exporting portlet " + portletId + "/" + communityId, e); } }