From 6fef48938c09950fc802a268d3b819c9437747b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvan-=E6=AC=A7=E9=98=B3=E5=B8=86?= Date: Thu, 13 Oct 2022 16:32:11 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-75091=20-=20=E6=95=B0=E6=8D=AE=E8=84=B1?= =?UTF-8?q?=E6=95=8F=EF=BC=88=E6=8A=A5=E8=A1=A8=EF=BC=89=20=E3=80=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E7=94=A8AbstractDesensitizationTabledata=E6=8A=BD=E8=B1=A1?= =?UTF-8?q?=E7=B1=BB=E4=BD=9C=E4=B8=BA=E6=89=80=E6=9C=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E7=9A=84=E9=A1=B6=E5=B1=82=E6=8A=BD=E8=B1=A1=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E5=9C=A8=E8=AF=BB=E5=86=99=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E6=9C=89=E7=82=B9=E8=86=88=E5=BA=94=EF=BC=8C=E4=B8=BB?= =?UTF-8?q?=E8=A6=81=E6=98=AF=E5=8F=AF=E8=83=BD=E5=AF=BC=E8=87=B4=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=86=97=E4=BD=99=EF=BC=8C=E6=88=96=E8=80=85=E7=A0=B4?= =?UTF-8?q?=E5=9D=8F=E5=8E=9F=E6=9C=89=E8=AF=BB=E5=86=99=E5=A7=94=E6=89=98?= =?UTF-8?q?=E7=9A=84=E5=B1=82=E7=BA=A7=20=E3=80=90=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=E6=80=9D=E8=B7=AF=E3=80=91=E7=8E=B0=E5=9C=A8=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=B8=BADesensitizationTableData=E6=8E=A5=E5=8F=A3=EF=BC=8CAbs?= =?UTF-8?q?tractTableData=E5=AE=9E=E7=8E=B0=E6=AD=A4=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E5=9C=A8=E5=86=85=E9=83=A8=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E8=AF=BB=E5=86=99=E7=9A=84=E5=B7=A5=E5=85=B7=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E5=AD=90=E7=B1=BB=E7=BB=9F=E4=B8=80=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E5=B7=A5=E5=85=B7=E6=96=B9=E6=B3=95=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E6=9D=A5=E8=AF=BB=E5=8F=96=E8=84=B1=E6=95=8F?= =?UTF-8?q?=E8=A7=84=E5=88=99=E4=BF=A1=E6=81=AF=20=E3=80=90review=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/preview/PreviewTablePane.java | 10 +++++----- .../TableDataPreviewDesensitizeManager.java | 10 +++++----- .../TableDataDesensitizationSettingPane.java | 14 +++++++------- .../TableDataDesensitizationTableModel.java | 6 +++--- .../setting/TableDataDesensitizationTablePane.java | 8 ++++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java index 6665c6f772..dc3bc6ed8d 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java @@ -6,7 +6,7 @@ package com.fr.design.data.datapane.preview; import com.fr.base.TableData; import com.fr.base.svg.IconUtils; import com.fr.data.TableDataSource; -import com.fr.data.desensitize.base.AbstractDesensitizationTableData; +import com.fr.data.desensitize.base.DesensitizationTableData; import com.fr.data.impl.DBTableData; import com.fr.data.impl.EmbeddedTableData; import com.fr.data.impl.NameDataModel; @@ -236,8 +236,8 @@ public class PreviewTablePane extends BasicPane { desensitizationLabel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - TableDataDesensitizationSettingPane settingPane = new TableDataDesensitizationSettingPane((AbstractDesensitizationTableData) tableData); - settingPane.populateBean((AbstractDesensitizationTableData) tableData); + TableDataDesensitizationSettingPane settingPane = new TableDataDesensitizationSettingPane((DesensitizationTableData) tableData); + settingPane.populateBean((DesensitizationTableData) tableData); BasicDialog dialog = settingPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(PreviewTablePane.this), new DialogActionAdapter() { @Override public void doOk() { @@ -775,7 +775,7 @@ public class PreviewTablePane extends BasicPane { * @return */ private boolean isDesensitizeOpened() { - return tableData instanceof AbstractDesensitizationTableData && - ((AbstractDesensitizationTableData) tableData).getDesensitizeOpen(); + return tableData instanceof DesensitizationTableData && + ((DesensitizationTableData) tableData).isDesensitizeOpen(); } } 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 9cc82dfdda..0632de3e65 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 @@ -2,7 +2,7 @@ package com.fr.design.data.datapane.preview.desensitization; import com.fr.base.TableData; -import com.fr.data.desensitize.base.AbstractDesensitizationTableData; +import com.fr.data.desensitize.base.DesensitizationTableData; import com.fr.data.desensitize.base.TableDataDesensitizationBean; import com.fr.data.desensitize.manage.DesensitizationManager; import com.fr.data.desensitize.util.DesentizationUtils; @@ -62,9 +62,9 @@ public class TableDataPreviewDesensitizeManager implements DesensitizationManage * @return */ public boolean needDesensitize(TableData tableData) { - return tableData instanceof AbstractDesensitizationTableData && - DesentizationUtils.isCollectionNotEmpty(((AbstractDesensitizationTableData) tableData).getDesensitizationBeans()) && - ((AbstractDesensitizationTableData) tableData).getDesensitizationBeans().stream().noneMatch(TableDataDesensitizationBean::invalid); + return tableData instanceof DesensitizationTableData && + DesentizationUtils.isCollectionNotEmpty(((DesensitizationTableData) tableData).getDesensitizationBeans()) && + ((DesensitizationTableData) tableData).getDesensitizationBeans().stream().noneMatch(TableDataDesensitizationBean::invalid); } /** @@ -77,7 +77,7 @@ public class TableDataPreviewDesensitizeManager implements DesensitizationManage Map desensitizationBeanMap = new LinkedHashMap<>(); // 获取此数据集的所有脱敏信息 - Collection desensitizationBeans = ((AbstractDesensitizationTableData) tableData).getDesensitizationBeans(); + Collection desensitizationBeans = ((DesensitizationTableData) tableData).getDesensitizationBeans(); // 去除被禁用的规则 + 排序 List sortedBeans = desensitizationBeans .stream() diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationSettingPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationSettingPane.java index 91119b4083..a706efb2fb 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationSettingPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationSettingPane.java @@ -1,6 +1,6 @@ package com.fr.design.data.datapane.preview.desensitization.view.setting; -import com.fr.data.desensitize.base.AbstractDesensitizationTableData; +import com.fr.data.desensitize.base.DesensitizationTableData; import com.fr.data.desensitize.base.TableDataDesensitizationBean; import com.fr.design.beans.BasicBeanPane; import com.fr.design.data.datapane.preview.desensitization.view.common.DesensitizationOpenPane; @@ -18,19 +18,19 @@ import java.util.List; * @version 11.0 * Created by Yvan on 2022/9/8 */ -public class TableDataDesensitizationSettingPane extends BasicBeanPane { +public class TableDataDesensitizationSettingPane extends BasicBeanPane { /** * 设置针对的数据集 */ - private AbstractDesensitizationTableData tableData; + private DesensitizationTableData tableData; private DesensitizationOpenPane desensitizationOpenPane; private TableDataDesensitizationTablePane tableDataDesensitizationTablePane; - public TableDataDesensitizationSettingPane(AbstractDesensitizationTableData tableData) { + public TableDataDesensitizationSettingPane(DesensitizationTableData tableData) { this.tableData = tableData; initComponents(); } @@ -67,14 +67,14 @@ public class TableDataDesensitizationSettingPane extends BasicBeanPane editorPane; - public TableDataDesensitizationTablePane(AbstractDesensitizationTableData tableData, Component parent) { + public TableDataDesensitizationTablePane(DesensitizationTableData tableData, Component parent) { this.tableData = tableData; this.parent = parent; initComponent(); @@ -52,7 +52,7 @@ public class TableDataDesensitizationTablePane extends JPanel { * * @param tableData */ - public void populateDesensitizationSetting(AbstractDesensitizationTableData tableData) { + public void populateDesensitizationSetting(DesensitizationTableData tableData) { this.tableData = tableData; editorPane.populate(tableData.getDesensitizationBeans().toArray(new TableDataDesensitizationBean[0])); }