@ -1,10 +1,11 @@
package com.fr.design.mainframe.cell.settingpane.desensitization.model ;
import com.fr.data.desensitize.rule.DesensitizationRuleManager ;
import com.fr.data.desensitize.rule.base.DesensitizationRule ;
import com.fr.data.desensitize.rule.base.DesensitizationRuleSource ;
import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository ;
import javax.swing.* ;
import javax.swing.SwingWorker ;
import java.util.HashMap ;
import java.util.Map ;
import java.util.concurrent.ExecutionException ;
@ -25,8 +26,9 @@ public class UpdateDataWorker extends SwingWorker<Map<String, Object>, Void> {
protected Map < String , Object > doInBackground ( ) {
Map < String , Object > result = new HashMap < > ( ) ;
Map < String , String > allRoles = RemoteAuthorityRepository . getInstance ( ) . getAllRoles4Desensitization ( ) ;
Map < DesensitizationRuleSource , Map < String , DesensitizationRule > > allRules = RemoteAuthorityRepository . getInstance ( ) . getAllRoles ( ) . getSourceRuleMap ( ) ;
Map < DesensitizationRuleSource , Map < String , DesensitizationRule > > allRules = new HashMap < > ( ) ;
allRules . put ( DesensitizationRuleSource . SERVER , RemoteAuthorityRepository . getInstance ( ) . getAllRoles ( ) . getSourceRuleMap ( ) . get ( DesensitizationRuleSource . SERVER ) ) ;
allRules . put ( DesensitizationRuleSource . CUSTOM , DesensitizationRuleManager . getInstance ( ) . getRulesBySource ( DesensitizationRuleSource . CUSTOM ) ) ;
result . put ( ROLE_KEY , allRoles ) ;
result . put ( RULE_KEY , allRules ) ;