* commit 'cfe162b7da351692badb1071754527175fcf5f98': REPORT-138579 fix:esd工具条布局修复 REPORT-138311 【fr-fbp冒烟】【数据源】关联数据集选择后预览 无法弹出参数的弹窗,直接报错或者空白 无JIRA任务 改了前端bug,更新一波js 无jira 启动页视觉图换新 无jira 启动页视觉图换新 REPORT-138690 fix: 富文本编辑器工具条缺失元素补充fbp/release
@ -0,0 +1,100 @@
|
||||
package com.fanruan.data; |
||||
|
||||
import com.fanruan.config.impl.data.TableDataConfigProvider; |
||||
import com.fr.base.TableData; |
||||
import com.fr.decision.webservice.bean.dataset.ServerDataSetBean; |
||||
import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper; |
||||
import com.fr.design.data.datapane.preview.TableDataBeanHelper; |
||||
import com.fr.file.TableDataConfig; |
||||
import com.fr.log.FineLoggerFactory; |
||||
import com.fr.transaction.Configurations; |
||||
import com.fr.transaction.WorkerAdaptor; |
||||
import com.fr.workspace.WorkContext; |
||||
import com.fr.workspace.server.repository.tabledata.TableDataRepository; |
||||
import org.jetbrains.annotations.Nullable; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 设计器的TableData配置Wrapper |
||||
* <p>防止底层错误调用</p> |
||||
* |
||||
* @author Destiny.Lin |
||||
* @since 11.0 |
||||
* Created on 2024/10/25 |
||||
*/ |
||||
public class DesignTableDataConfigWrapper implements TableDataConfigProvider { |
||||
@Override |
||||
public Map<String, TableData> getTableDatas() { |
||||
return TableDataConfig.getInstance().getTableDatas(); |
||||
} |
||||
|
||||
@Override |
||||
public void removeTableData(String tableDataName) { |
||||
Configurations.update(new WorkerAdaptor(TableDataConfig.class) { |
||||
@Override |
||||
public void run() { |
||||
TableDataConfig.getInstance().removeTableData(tableDataName); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
@Nullable |
||||
@Override |
||||
public TableData getTableData(String name) { |
||||
if (WorkContext.getCurrent().isLocal()) { |
||||
return TableDataConfig.getInstance().getTableData(name); |
||||
} |
||||
ServerDataSetBean bean = TableDataRepository.getInstance().getTableData(name); |
||||
try { |
||||
if (bean == null) { |
||||
return null; |
||||
} |
||||
return TableDataBeanHelper.getTableDataSet(ConnectionInfoBeanHelper.getCurrentConnectionMap(), bean.getDatasetType(), bean.getDatasetData()); |
||||
} catch (Exception e) { |
||||
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
||||
return null; |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void addTableData(String name, TableData tableData) { |
||||
Configurations.update(new WorkerAdaptor(TableDataConfig.class) { |
||||
@Override |
||||
public void run() { |
||||
TableDataConfig.getInstance().addTableData(name, tableData); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
@Override |
||||
public void renameTableData(String oldName, String newName) { |
||||
Configurations.update(new WorkerAdaptor(TableDataConfig.class) { |
||||
@Override |
||||
public void run() { |
||||
TableDataConfig.getInstance().renameTableData(oldName, newName); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
@Override |
||||
public void updateTableData(String tableDataName, TableData tableData) { |
||||
Configurations.update(new WorkerAdaptor(TableDataConfig.class) { |
||||
@Override |
||||
public void run() { |
||||
TableDataConfig.getInstance().removeTableData(tableDataName); |
||||
TableDataConfig.getInstance().addTableData(tableDataName, tableData); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
@Override |
||||
public void removeAllTableData() { |
||||
Configurations.update(new WorkerAdaptor(TableDataConfig.class) { |
||||
@Override |
||||
public void run() { |
||||
TableDataConfig.getInstance().removeAllTableData(); |
||||
} |
||||
}); |
||||
} |
||||
} |
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 252 KiB |
Before Width: | Height: | Size: 870 KiB After Width: | Height: | Size: 869 KiB |
Before Width: | Height: | Size: 870 KiB After Width: | Height: | Size: 869 KiB |
Before Width: | Height: | Size: 870 KiB After Width: | Height: | Size: 868 KiB |
Before Width: | Height: | Size: 870 KiB After Width: | Height: | Size: 868 KiB |
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 252 KiB |
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |