@ -1,7 +1,8 @@
package com.fr.design.actions.server ;
package com.fr.design.actions.server ;
import com.fanruan.config.impl.data.TableDataConfigProviderFactory ;
import com.fr.base.TableData ;
import com.fr.base.TableData ;
import com.fr.decision.webservice.bean.dataset.ServerDataSetBean ;
import com.fr.decision.webservice.v10.datasource.dataset.processor.impl.DataSetProcessorFactory ;
import com.fr.design.DesignModelAdapter ;
import com.fr.design.DesignModelAdapter ;
import com.fr.design.actions.UpdateAction ;
import com.fr.design.actions.UpdateAction ;
import com.fr.design.data.DesignTableDataManager ;
import com.fr.design.data.DesignTableDataManager ;
@ -22,6 +23,7 @@ import com.fr.esd.event.DsNameTarget;
import com.fr.esd.event.StrategyEventsNotifier ;
import com.fr.esd.event.StrategyEventsNotifier ;
import com.fr.report.LockItem ;
import com.fr.report.LockItem ;
import com.fr.security.encryption.transmission.TransmissionEncryptionManager ;
import com.fr.workspace.server.entity.tabledata.TableDataBean ;
import com.fr.workspace.server.entity.tabledata.TableDataBean ;
import com.fr.workspace.server.repository.tabledata.TableDataRepository ;
import com.fr.workspace.server.repository.tabledata.TableDataRepository ;
@ -29,6 +31,7 @@ import javax.swing.KeyStroke;
import java.awt.Dimension ;
import java.awt.Dimension ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionEvent ;
import java.util.HashMap ;
import java.util.HashMap ;
import java.util.List ;
import java.util.Map ;
import java.util.Map ;
/ * *
/ * *
@ -77,11 +80,19 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
}
}
// 锁定成功,执行后续操作
// 锁定成功,执行后续操作
final DesignerFrame designerFrame = DesignerContext . getDesignerFrame ( ) ;
final DesignerFrame designerFrame = DesignerContext . getDesignerFrame ( ) ;
final TableDataBean [ ] beans = TableDataRepository . getInstance ( ) . getAllTableData ( ) ;
final List < ServerDataSetBean > beans = TableDataRepository . getInstance ( ) . getAllTableData ( ) ;
final Map < String , TableData > tableDataMap = new HashMap < > ( ) ;
final Map < String , TableData > tableDataMap = new HashMap < > ( ) ;
for ( TableDataBean bean : beans ) {
try {
tableDataMap . put ( bean . getName ( ) , bean . getTableData ( ) ) ;
TransmissionEncryptionManager . setTransEncryptionLevel ( 1 ) ;
for ( ServerDataSetBean bean : beans ) {
tableDataMap . put ( bean . getDatasetName ( ) , DataSetProcessorFactory . getTableDataSet ( bean . getDatasetType ( ) , bean . getDatasetData ( ) ) ) ;
}
} catch ( Exception e ) {
throw new RuntimeException ( e ) ;
} finally {
TransmissionEncryptionManager . removeTransEncryptionLevel ( ) ;
}
}
final TableDataManagerPane globalTableDataPane = new TableDataManagerPane ( ) {
final TableDataManagerPane globalTableDataPane = new TableDataManagerPane ( ) {
public void complete ( ) {
public void complete ( ) {
populate ( tableDataMap ) ;
populate ( tableDataMap ) ;