diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/TableDataPreviewDesensitizeManager.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/TableDataPreviewDesensitizeManager.java index 5c2b42c257..4fca1b49f0 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/TableDataPreviewDesensitizeManager.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/TableDataPreviewDesensitizeManager.java @@ -83,7 +83,7 @@ public class TableDataPreviewDesensitizeManager implements DesensitizationManage Collection desensitizationItems = ((DesensitizationTableData) tableData).getDesensitizationConfig().getDesensitizationItems(); if (DesentizationUtils.isCollectionNotEmpty(desensitizationItems)) { // 更新规则 - desensitizationItems = TableDataDesensitizeManager.getInstance().dealWithLastedRules(desensitizationItems); + desensitizationItems = TableDataDesensitizeManager.getInstance().dealWithlatestRules(desensitizationItems); // 对脱敏配置项集合做过滤和排序处理 List items = desensitizationItems.stream() .filter(item -> isAvaliableItem4Preview(item, model)) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java index e1dc9d7226..419299336e 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java @@ -49,10 +49,10 @@ public class DesensitizationRuleChoosePane extends JPanel { private DesensitizationRuleSource currentRuleSource; - private Map> lastedRules; + private Map> latestRules; - public DesensitizationRuleChoosePane(Map> lastedRules) { - this.lastedRules = lastedRules; + public DesensitizationRuleChoosePane(Map> latestRules) { + this.latestRules = latestRules; this.cardLayout = new CardLayout(); this.setLayout(cardLayout); serverRuleEditPane = new UITableEditorPane<>(new DesensitizationRuleChooseTableModel(this, true)); @@ -80,8 +80,8 @@ public class DesensitizationRuleChoosePane extends JPanel { * 展示当前规则 */ private void populateDesensitizationRules() { - serverRuleEditPane.populate(lastedRules.get(DesensitizationRuleSource.SERVER).values().toArray(new DesensitizationRule[0])); - customRuleEditPane.populate(lastedRules.get(DesensitizationRuleSource.CUSTOM).values().toArray(new DesensitizationRule[0])); + serverRuleEditPane.populate(latestRules.get(DesensitizationRuleSource.SERVER).values().toArray(new DesensitizationRule[0])); + customRuleEditPane.populate(latestRules.get(DesensitizationRuleSource.CUSTOM).values().toArray(new DesensitizationRule[0])); } /** @@ -147,7 +147,7 @@ public class DesensitizationRuleChoosePane extends JPanel { return DesensitizationRule.getDescription(rule); case 3: // 脱敏规则状态 - DesensitizationRuleStatus ruleStatus = DesensitizationRuleManager.getInstance().getRuleStatus(rule, lastedRules); + DesensitizationRuleStatus ruleStatus = DesensitizationRuleManager.getInstance().getRuleStatus(rule, latestRules); // 非正常状态需要标记为异常 return ruleStatus == DesensitizationRuleStatus.NORMAL ? StringUtils.EMPTY : Toolkit.i18nText("Fine-Design_Report_Desensitization_Rule_Status_Abnormal"); default: @@ -196,7 +196,7 @@ public class DesensitizationRuleChoosePane extends JPanel { * @param rule */ public void refreshRuleStatus(DesensitizationRule rule) { - DesensitizationRuleStatus ruleStatus = DesensitizationRuleManager.getInstance().getRuleStatus(rule, lastedRules); + DesensitizationRuleStatus ruleStatus = DesensitizationRuleManager.getInstance().getRuleStatus(rule, latestRules); if (ruleStatus == DesensitizationRuleStatus.NORMAL) { // 正常规则时,重置提示Label this.ruleStatusLabel.setText(StringUtils.EMPTY); diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRulePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRulePane.java index b26b288f0a..ba8b00d735 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRulePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRulePane.java @@ -33,16 +33,16 @@ public class DesensitizationRulePane extends BasicBeanPane /** * 最新的所有规则 */ - private Map> lastedRules; + private Map> latestRules; /** * 内容面板 */ private JPanel contentPane; - public DesensitizationRulePane(Map> lastedRules) { + public DesensitizationRulePane(Map> latestRules) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.lastedRules = lastedRules; + this.latestRules = latestRules; initPane(); } @@ -54,7 +54,7 @@ public class DesensitizationRulePane extends BasicBeanPane // 规则来源选择Pane ruleSourceChoosePane = new DesensitizationRuleSourceChoosePane(this); // 规则选择Pane - ruleChoosePane = new DesensitizationRuleChoosePane(lastedRules); + ruleChoosePane = new DesensitizationRuleChoosePane(latestRules); contentPane.add(ruleSourceChoosePane, BorderLayout.NORTH); contentPane.add(ruleChoosePane, BorderLayout.CENTER); } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java index 595fa4b8a8..21e96d7131 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java @@ -75,11 +75,11 @@ public class TableDataDesensitizationTableModel extends UITableModelAdapter> lastedRules = new LinkedHashMap<>(); + private Map> latestRules = new LinkedHashMap<>(); private Component parent; - public TableDataDesensitizationTableModel(DesensitizationTableData tableData, Component parent, List columnNames, Map roleMap, Map> lastedRules) { + public TableDataDesensitizationTableModel(DesensitizationTableData tableData, Component parent, List columnNames, Map roleMap, Map> latestRules) { // table相关 super(new String[]{ Toolkit.i18nText("Fine-Design_Report_Desensitization_Column"), @@ -91,7 +91,7 @@ public class TableDataDesensitizationTableModel extends UITableModelAdapter iterator = items.iterator(); while (iterator.hasNext()) { TableDataDesensitizationItem item = iterator.next(); - DesensitizationRuleStatus ruleStatus = DesensitizationRuleManager.getInstance().getRuleStatus(item.getRule(), lastedRules); + DesensitizationRuleStatus ruleStatus = DesensitizationRuleManager.getInstance().getRuleStatus(item.getRule(), latestRules); if (ruleStatus == DesensitizationRuleStatus.REMOVED) { // 规则被移除,则删除整条脱敏Item iterator.remove(); } else { // 规则被修改、禁用等,更新一下规则 - item.setRule(DesensitizationRuleManager.getInstance().getLastedDesentizationRule(item.getRule(), lastedRules)); + item.setRule(DesensitizationRuleManager.getInstance().getLastedDesentizationRule(item.getRule(), latestRules)); } } fireTableDataChanged(); diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java index 9ef6a7a2ff..a2fe6529c0 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java @@ -81,7 +81,7 @@ public class TableDataDesensitizationTablePane extends JPanel { private void initContent() { final List columnNames = new ArrayList<>(); final Map roleMap = new LinkedHashMap<>(); - final Map> lastedRules = new LinkedHashMap<>(); + final Map> latestRules = new LinkedHashMap<>(); new SwingWorker() { @Override @@ -91,14 +91,14 @@ public class TableDataDesensitizationTablePane extends JPanel { // 获取当前所有用户组 roleMap.putAll(TableDataPreviewDesensitizeManager.getInstance().getAllRoles()); // 获取当前最新的所有规则 - lastedRules.putAll(DesensitizationRuleManager.getInstance().getAllRules()); + latestRules.putAll(DesensitizationRuleManager.getInstance().getAllRules()); return null; } @Override protected void done() { contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - editorPane = new UITableEditorPane<>(new TableDataDesensitizationTableModel(tableData, parent, columnNames, roleMap, lastedRules)); + editorPane = new UITableEditorPane<>(new TableDataDesensitizationTableModel(tableData, parent, columnNames, roleMap, latestRules)); editorPane.setHeaderResizing(false); editorPane.populate(tableData.getDesensitizationConfig().getDesensitizationItems().toArray(new TableDataDesensitizationItem[0])); contentPane.add(editorPane, BorderLayout.CENTER);