From 5e24ee97c6e90c14a8ea701a6a183a3a78bb5743 Mon Sep 17 00:00:00 2001 From: Liang Zhang Date: Thu, 4 Jun 2020 22:15:53 +0800 Subject: [PATCH] Refactor encrypt java API package structure (#5922) * refactor package of org.apache.shardingsphere.encrypt.api.config * refactor EncryptColumnRuleConfiguration * update doc --- .../configuration/java-api/encrypt.cn.md | 54 +++++++++--------- .../configuration/java-api/encrypt.en.md | 56 +++++++++---------- .../local/LocalEncryptConfiguration.java | 8 +-- .../config/EncryptDatabasesConfiguration.java | 10 ++-- .../resources/META-INF/encrypt-databases.yaml | 8 +-- .../EncryptShadowDatabasesConfiguration.java | 14 ++--- .../META-INF/encrypt-shadow-databases.yaml | 8 +-- .../core/configcenter/ConfigCenterTest.java | 2 +- .../listener/SchemaChangedListenerTest.java | 2 +- .../api/config/EncryptRuleConfiguration.java | 2 + .../EncryptColumnRuleConfiguration.java | 8 +-- .../EncryptTableRuleConfiguration.java | 2 +- .../EncryptStrategyConfiguration.java | 2 +- .../EncryptStrategyConfigurationTest.java | 1 + .../encrypt/rule/EncryptRule.java | 6 +- .../encrypt/rule/EncryptTable.java | 6 +- .../YamlEncryptColumnRuleConfiguration.java | 6 +- ...yptColumnRuleConfigurationYamlSwapper.java | 6 +- .../EncryptRuleConfigurationYamlSwapper.java | 4 +- ...cryptStrategyConfigurationYamlSwapper.java | 2 +- ...ryptTableRuleConfigurationYamlSwapper.java | 8 +-- .../log/EncryptConfigurationLoggerTest.java | 6 +- .../encrypt/rule/EncryptRuleTest.java | 6 +- .../encrypt/rule/EncryptTableTest.java | 4 +- .../EncryptRuleBeanDefinitionParser.java | 6 +- .../OrchestrationSpringBootEncryptTest.java | 2 +- ...strationSpringBootRegistryEncryptTest.java | 2 +- .../OrchestrationEncryptNamespaceTest.java | 6 +- 28 files changed, 125 insertions(+), 122 deletions(-) rename shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/{ => rule}/EncryptColumnRuleConfiguration.java (92%) rename shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/{ => rule}/EncryptTableRuleConfiguration.java (95%) rename shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/{ => strategy}/EncryptStrategyConfiguration.java (95%) diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/encrypt.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/encrypt.cn.md index 3f75467740..6f0583ab35 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/encrypt.cn.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/encrypt.cn.md @@ -11,12 +11,37 @@ weight = 3 | *名称* | *数据类型* | *说明* | | --------------------- | ------------------------------------------- | ------------ | -| tables (+) | Collection\ | 加密表规则列表 | | encryptStrategies (+) | Collection\ | 加解密策略列表 | +| tables (+) | Collection\ | 加密表规则列表 | + +## 加密表规则配置 + +类名称:org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration + +可配置属性: + +| *名称* | *数据类型* | *说明* | +| ----------- | -------------------------------------------- | ------------ | +| name | String | 表名称 | +| columns (+) | Collection\ | 加密列规则列表 | + +### 加密列规则配置 + +类名称:org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration + +可配置属性: + +| *名称* | *数据类型* | *说明* | +| ----------------------- | -------- | ------------- | +| logicColumn | String | 逻辑列名称 | +| cipherColumn | String | 密文列名称 | +| assistedQueryColumn (?) | String | 查询辅助列名称 | +| plainColumn (?) | String | 原文列名称 | +| encryptStrategyName | String | 加密策略名称 | ## 加解密策略配置 -类名称:org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration +类名称:org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration 可配置属性: @@ -53,28 +78,3 @@ Apache ShardingSphere 内置的加解密算法实现类包括: | *名称* | *数据类型* | *说明* | | ------------- | --------- | ------------- | | rc4.key.value | String | RC4 使用的 KEY | - -## 加密表规则配置 - -类名称:org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration - -可配置属性: - -| *名称* | *数据类型* | *说明* | -| ----------- | -------------------------------------------- | --------- | -| name | String | 表名称 | -| columns (+) | Collection\ | 加密列列表 | - -### 加密列规则配置 - -类名称:org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration - -可配置属性: - -| *名称* | *数据类型* | *说明* | -| ----------------------- | -------- | ------------- | -| name | String | 逻辑列名称 | -| plainColumn (?) | String | 原文列名称 | -| cipherColumn | String | 密文列名称 | -| assistedQueryColumn (?) | String | 查询辅助列名称 | -| encryptStrategyName | String | 加密策略名称 | diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/encrypt.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/encrypt.en.md index 845629c0a4..5bb2f7b680 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/encrypt.en.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/encrypt.en.md @@ -11,12 +11,37 @@ Attributes: | *Name* | *DataType* | *Description* | | --------------------- | ------------------------------------------- | ------------------- | -| tables (+) | Collection\ | Encrypt table rules | | encryptStrategies (+) | Collection\ | Encrypt strategies | +| tables (+) | Collection\ | Encrypt table rules | + +## Encrypt Table Rule Configuration + +Class name: org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration + +Attributes: + +| *Name* | *DataType* | *Description* | +| ----------- | -------------------------------------------- | -------------------- | +| name | String | Table name | +| columns (+) | Collection\ | Encrypt column rules | + +### Encrypt Column Rule Configuration + +Class name: org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration + +Attributes: + +| *Name* | *DataType* | *Description* | +| ----------------------- | ---------- | -------------------------- | +| logicColumn | String | Logic column name | +| cipherColumn | String | Cipher column name | +| assistedQueryColumn (?) | String | Assisted query column name | +| plainColumn (?) | String | Plain column name | +| encryptStrategyName | String | Encrypt strategy name | ## Encrypt Strategy Configuration -Class name: org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration +Class name: org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration Attributes: @@ -52,29 +77,4 @@ Attributes: | *Name* | *DataType* | *Description* | | ------------- | ---------- | ------------- | -| rc4.key.value | String | RC4 KEY | - -## Encrypt Table Rule Configuration - -Class name: org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration - -Attributes: - -| *Name* | *DataType* | *Description* | -| ----------- | -------------------------------------------- | --------------- | -| name | String | Table name | -| columns (+) | Collection\ | Encrypt columns | - -### Encrypt Column Rule Configuration - -Class name: org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration - -Attributes: - -| *Name* | *DataType* | *Description* | -| ----------------------- | ---------- | -------------------------- | -| name | String | Logic column name | -| plainColumn (?) | String | Plain column name | -| cipherColumn | String | Cipher column name | -| assistedQueryColumn (?) | String | Assisted query column name | -| encryptStrategyName | String | Encrypt strategy name | +| rc4.key.value | String | RC4 KEY | \ No newline at end of file diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalEncryptConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalEncryptConfiguration.java index d3e914f820..6676155e0f 100644 --- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalEncryptConfiguration.java +++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalEncryptConfiguration.java @@ -18,10 +18,10 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc.config.local; import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingSphereDataSourceFactory; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.example.config.ExampleConfiguration; import org.apache.shardingsphere.example.core.api.DataSourceUtil; import org.apache.shardingsphere.orchestration.center.config.CenterConfiguration; @@ -55,7 +55,7 @@ public final class LocalEncryptConfiguration implements ExampleConfiguration { Properties properties = new Properties(); properties.setProperty("aes.key.value", "123456"); EncryptStrategyConfiguration aesRuleConfiguration = new EncryptStrategyConfiguration("status_encrypt_strategy", "aes", properties); - EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("status", "", "status", "", "status_encrypt_strategy"); + EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("status", "status", "", "", "status_encrypt_strategy"); EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration("t_order", Collections.singleton(columnConfigAes)); return new EncryptRuleConfiguration(Collections.singleton(aesRuleConfiguration), Collections.singleton(tableConfig)); } diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/table/raw/jdbc/config/EncryptDatabasesConfiguration.java b/examples/shardingsphere-jdbc-example/other-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/table/raw/jdbc/config/EncryptDatabasesConfiguration.java index fbcb231f9e..6350a0680e 100644 --- a/examples/shardingsphere-jdbc-example/other-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/table/raw/jdbc/config/EncryptDatabasesConfiguration.java +++ b/examples/shardingsphere-jdbc-example/other-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/table/raw/jdbc/config/EncryptDatabasesConfiguration.java @@ -18,10 +18,10 @@ package org.apache.shardingsphere.example.encrypt.table.raw.jdbc.config; import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.example.config.ExampleConfiguration; import org.apache.shardingsphere.example.core.api.DataSourceUtil; @@ -40,8 +40,8 @@ public final class EncryptDatabasesConfiguration implements ExampleConfiguration Properties properties = new Properties(); properties.setProperty("aes.key.value", "123456"); properties.setProperty("query.with.cipher.column", "true"); - EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("user_name", "user_name_plain", "user_name", "", "name_encrypt_strategy"); - EncryptColumnRuleConfiguration columnConfigTest = new EncryptColumnRuleConfiguration("pwd", "", "pwd", "assisted_query_pwd", "pwd_encrypt_strategy"); + EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("user_name", "user_name", "", "user_name_plain", "name_encrypt_strategy"); + EncryptColumnRuleConfiguration columnConfigTest = new EncryptColumnRuleConfiguration("pwd", "pwd", "assisted_query_pwd", "", "pwd_encrypt_strategy"); EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration("t_user", Arrays.asList(columnConfigAes, columnConfigTest)); Collection encryptStrategyConfigurations = new LinkedList<>(); encryptStrategyConfigurations.add(new EncryptStrategyConfiguration("name_encrypt_strategy", "aes", properties)); diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/META-INF/encrypt-databases.yaml b/examples/shardingsphere-jdbc-example/other-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/META-INF/encrypt-databases.yaml index 326226433f..1de7a2e7ce 100644 --- a/examples/shardingsphere-jdbc-example/other-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/META-INF/encrypt-databases.yaml +++ b/examples/shardingsphere-jdbc-example/other-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/META-INF/encrypt-databases.yaml @@ -25,11 +25,11 @@ dataSources: rules: - !ENCRYPT encryptStrategies: - name_encryptror: + name_encrypt_strategy: type: aes props: aes.key.value: 123456 - pwd_encryptror: + pwd_encrypt_strategy: type: assistedTest tables: t_user: @@ -37,11 +37,11 @@ rules: user_name: plainColumn: user_name_plain cipherColumn: user_name - encryptStrategyName: name_encryptror + encryptStrategyName: name_encrypt_strategy pwd: cipherColumn: pwd assistedQueryColumn: assisted_query_pwd - encryptStrategyName: pwd_encryptror + encryptStrategyName: pwd_encrypt_strategy props: query.with.cipher.column: true diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/shadow/table/raw/jdbc/config/EncryptShadowDatabasesConfiguration.java b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/shadow/table/raw/jdbc/config/EncryptShadowDatabasesConfiguration.java index e1f27b6621..f333ea5582 100644 --- a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/shadow/table/raw/jdbc/config/EncryptShadowDatabasesConfiguration.java +++ b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/shadow/table/raw/jdbc/config/EncryptShadowDatabasesConfiguration.java @@ -18,10 +18,10 @@ package org.apache.shardingsphere.example.shadow.table.raw.jdbc.config; import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.example.config.ExampleConfiguration; import org.apache.shardingsphere.example.core.api.DataSourceUtil; import org.apache.shardingsphere.shadow.api.config.ShadowRuleConfiguration; @@ -55,8 +55,8 @@ public final class EncryptShadowDatabasesConfiguration implements ExampleConfigu Collection result = new LinkedList<>(); Properties properties = new Properties(); properties.setProperty("aes.key.value", "123456"); - EncryptStrategyConfiguration nameEncryptStrategyConfiguration = new EncryptStrategyConfiguration("name_encryptror", "aes", properties); - EncryptStrategyConfiguration pwdEncryptStrategyConfiguration = new EncryptStrategyConfiguration("pwd_encryptror", "assistedTest", null); + EncryptStrategyConfiguration nameEncryptStrategyConfiguration = new EncryptStrategyConfiguration("name_encrypt_strategy", "aes", properties); + EncryptStrategyConfiguration pwdEncryptStrategyConfiguration = new EncryptStrategyConfiguration("pwd_encrypt_strategy", "assistedTest", null); result.add(nameEncryptStrategyConfiguration); result.add(pwdEncryptStrategyConfiguration); return result; @@ -65,8 +65,8 @@ public final class EncryptShadowDatabasesConfiguration implements ExampleConfigu private Collection getEncryptTableRuleConfigurations() { Collection result = new LinkedList<>(); Collection columns = new LinkedList<>(); - columns.add(new EncryptColumnRuleConfiguration("user_name", "user_name_plain", "user_name", "", "name_encryptror")); - columns.add(new EncryptColumnRuleConfiguration("pwd", "", "pwd", "assisted_query_pwd", "pwd_encryptror")); + columns.add(new EncryptColumnRuleConfiguration("user_name", "user_name", "", "user_name_plain", "name_encrypt_strategy")); + columns.add(new EncryptColumnRuleConfiguration("pwd", "pwd", "assisted_query_pwd", "", "pwd_encrypt_strategy")); result.add(new EncryptTableRuleConfiguration("t_user", columns)); return result; } diff --git a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/resources/META-INF/encrypt-shadow-databases.yaml b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/resources/META-INF/encrypt-shadow-databases.yaml index 60777cbffa..f29625f3e7 100644 --- a/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/resources/META-INF/encrypt-shadow-databases.yaml +++ b/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-raw-jdbc-example/src/main/resources/META-INF/encrypt-shadow-databases.yaml @@ -35,11 +35,11 @@ rules: - !ENCRYPT encryptStrategies: - name_encryptror: + name_encrypt_strategy: type: aes props: aes.key.value: 123456 - pwd_encryptror: + pwd_encrypt_strategy: type: assistedTest tables: t_user: @@ -47,11 +47,11 @@ rules: user_name: plainColumn: user_name_plain cipherColumn: user_name - encryptStrategyName: name_encryptror + encryptStrategyName: name_encrypt_strategy pwd: cipherColumn: pwd assistedQueryColumn: assisted_query_pwd - encryptStrategyName: pwd_encryptror + encryptStrategyName: pwd_encrypt_strategy props: query.with.cipher.column: true diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-configcenter/src/test/java/org/apache/shardingsphere/orchestration/core/configcenter/ConfigCenterTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-configcenter/src/test/java/org/apache/shardingsphere/orchestration/core/configcenter/ConfigCenterTest.java index a53390b09d..2b78f8063d 100644 --- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-configcenter/src/test/java/org/apache/shardingsphere/orchestration/core/configcenter/ConfigCenterTest.java +++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-configcenter/src/test/java/org/apache/shardingsphere/orchestration/core/configcenter/ConfigCenterTest.java @@ -19,7 +19,7 @@ package org.apache.shardingsphere.orchestration.core.configcenter; import org.apache.commons.dbcp2.BasicDataSource; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.masterslave.api.config.MasterSlaveRuleConfiguration; import org.apache.shardingsphere.orchestration.center.ConfigCenterRepository; import org.apache.shardingsphere.orchestration.core.configuration.YamlDataSourceConfiguration; diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-configcenter/src/test/java/org/apache/shardingsphere/orchestration/core/configcenter/listener/SchemaChangedListenerTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-configcenter/src/test/java/org/apache/shardingsphere/orchestration/core/configcenter/listener/SchemaChangedListenerTest.java index 80f1085ba1..589f7121c8 100644 --- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-configcenter/src/test/java/org/apache/shardingsphere/orchestration/core/configcenter/listener/SchemaChangedListenerTest.java +++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-configcenter/src/test/java/org/apache/shardingsphere/orchestration/core/configcenter/listener/SchemaChangedListenerTest.java @@ -19,7 +19,7 @@ package org.apache.shardingsphere.orchestration.core.configcenter.listener; import lombok.SneakyThrows; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.infra.config.RuleConfiguration; import org.apache.shardingsphere.masterslave.api.config.MasterSlaveRuleConfiguration; import org.apache.shardingsphere.orchestration.center.ConfigCenterRepository; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptRuleConfiguration.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptRuleConfiguration.java index 0fff9a5a2c..a265b51555 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptRuleConfiguration.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptRuleConfiguration.java @@ -19,6 +19,8 @@ package org.apache.shardingsphere.encrypt.api.config; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.infra.config.RuleConfiguration; import java.util.Collection; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptColumnRuleConfiguration.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/rule/EncryptColumnRuleConfiguration.java similarity index 92% rename from shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptColumnRuleConfiguration.java rename to shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/rule/EncryptColumnRuleConfiguration.java index 8e926a3b49..8145afe830 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptColumnRuleConfiguration.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/rule/EncryptColumnRuleConfiguration.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.encrypt.api.config; +package org.apache.shardingsphere.encrypt.api.config.rule; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -27,13 +27,13 @@ import lombok.RequiredArgsConstructor; @Getter public final class EncryptColumnRuleConfiguration { - private final String name; - - private final String plainColumn; + private final String logicColumn; private final String cipherColumn; private final String assistedQueryColumn; + private final String plainColumn; + private final String encryptStrategyName; } diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptTableRuleConfiguration.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/rule/EncryptTableRuleConfiguration.java similarity index 95% rename from shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptTableRuleConfiguration.java rename to shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/rule/EncryptTableRuleConfiguration.java index f1c4ecfbeb..f4d1935dd9 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptTableRuleConfiguration.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/rule/EncryptTableRuleConfiguration.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.encrypt.api.config; +package org.apache.shardingsphere.encrypt.api.config.rule; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptStrategyConfiguration.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/strategy/EncryptStrategyConfiguration.java similarity index 95% rename from shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptStrategyConfiguration.java rename to shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/strategy/EncryptStrategyConfiguration.java index 6e282188c2..2e2e48a29f 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptStrategyConfiguration.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/main/java/org/apache/shardingsphere/encrypt/api/config/strategy/EncryptStrategyConfiguration.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.encrypt.api.config; +package org.apache.shardingsphere.encrypt.api.config.strategy; import lombok.Getter; import org.apache.shardingsphere.infra.config.TypedSPIConfiguration; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/test/java/org/apache/shardingsphere/encrypt/api/config/EncryptStrategyConfigurationTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/test/java/org/apache/shardingsphere/encrypt/api/config/EncryptStrategyConfigurationTest.java index e29edfa28b..7fac6ecaef 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/test/java/org/apache/shardingsphere/encrypt/api/config/EncryptStrategyConfigurationTest.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-api/src/test/java/org/apache/shardingsphere/encrypt/api/config/EncryptStrategyConfigurationTest.java @@ -17,6 +17,7 @@ package org.apache.shardingsphere.encrypt.api.config; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.junit.Test; import java.util.Properties; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java index be62a7a910..f9c4b94da2 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java @@ -19,10 +19,10 @@ package org.apache.shardingsphere.encrypt.rule; import com.google.common.base.Preconditions; import com.google.common.base.Strings; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.encrypt.strategy.spi.EncryptAlgorithm; import org.apache.shardingsphere.encrypt.strategy.spi.QueryAssistedEncryptAlgorithm; import org.apache.shardingsphere.infra.rule.ShardingSphereRule; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptTable.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptTable.java index a698891711..0f914698b8 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptTable.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptTable.java @@ -18,8 +18,8 @@ package org.apache.shardingsphere.encrypt.rule; import com.google.common.collect.Maps; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; import org.apache.shardingsphere.infra.exception.ShardingSphereException; import java.util.Collection; @@ -39,7 +39,7 @@ public final class EncryptTable { public EncryptTable(final EncryptTableRuleConfiguration config) { columns = new LinkedHashMap<>(config.getColumns().size()); for (EncryptColumnRuleConfiguration each : config.getColumns()) { - columns.put(each.getName(), new EncryptColumn(each.getCipherColumn(), each.getAssistedQueryColumn(), each.getPlainColumn(), each.getEncryptStrategyName())); + columns.put(each.getLogicColumn(), new EncryptColumn(each.getCipherColumn(), each.getAssistedQueryColumn(), each.getPlainColumn(), each.getEncryptStrategyName())); } } diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/config/YamlEncryptColumnRuleConfiguration.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/config/YamlEncryptColumnRuleConfiguration.java index f51d2885d4..f7281aaf37 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/config/YamlEncryptColumnRuleConfiguration.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/config/YamlEncryptColumnRuleConfiguration.java @@ -28,13 +28,13 @@ import org.apache.shardingsphere.infra.yaml.config.YamlConfiguration; @Setter public final class YamlEncryptColumnRuleConfiguration implements YamlConfiguration { - private String logicName; - - private String plainColumn; + private String logicColumn; private String cipherColumn; private String assistedQueryColumn; + private String plainColumn; + private String encryptStrategyName; } diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptColumnRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptColumnRuleConfigurationYamlSwapper.java index 3fafac9d0b..5d8c890e21 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptColumnRuleConfigurationYamlSwapper.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptColumnRuleConfigurationYamlSwapper.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.encrypt.yaml.swapper; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptColumnRuleConfiguration; import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper; @@ -38,7 +38,7 @@ public final class EncryptColumnRuleConfigurationYamlSwapper implements YamlSwap @Override public EncryptColumnRuleConfiguration swap(final YamlEncryptColumnRuleConfiguration yamlConfiguration) { - return new EncryptColumnRuleConfiguration(yamlConfiguration.getLogicName(), - yamlConfiguration.getPlainColumn(), yamlConfiguration.getCipherColumn(), yamlConfiguration.getAssistedQueryColumn(), yamlConfiguration.getEncryptStrategyName()); + return new EncryptColumnRuleConfiguration(yamlConfiguration.getLogicColumn(), + yamlConfiguration.getCipherColumn(), yamlConfiguration.getAssistedQueryColumn(), yamlConfiguration.getPlainColumn(), yamlConfiguration.getEncryptStrategyName()); } } diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationYamlSwapper.java index 1be0ffa4d6..5760078ad8 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationYamlSwapper.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationYamlSwapper.java @@ -18,8 +18,8 @@ package org.apache.shardingsphere.encrypt.yaml.swapper; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.encrypt.constant.EncryptOrder; import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptRuleConfiguration; import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptTableRuleConfiguration; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptStrategyConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptStrategyConfigurationYamlSwapper.java index 8540e0921a..54cf61af36 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptStrategyConfigurationYamlSwapper.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptStrategyConfigurationYamlSwapper.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.encrypt.yaml.swapper; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptStrategyConfiguration; import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptTableRuleConfigurationYamlSwapper.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptTableRuleConfigurationYamlSwapper.java index 207643fa1b..7ab3f52d33 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptTableRuleConfigurationYamlSwapper.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptTableRuleConfigurationYamlSwapper.java @@ -17,8 +17,8 @@ package org.apache.shardingsphere.encrypt.yaml.swapper; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptTableRuleConfiguration; import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper; @@ -38,7 +38,7 @@ public final class EncryptTableRuleConfigurationYamlSwapper implements YamlSwapp public YamlEncryptTableRuleConfiguration swap(final EncryptTableRuleConfiguration data) { YamlEncryptTableRuleConfiguration result = new YamlEncryptTableRuleConfiguration(); for (EncryptColumnRuleConfiguration each : data.getColumns()) { - result.getColumns().put(each.getName(), encryptColumnRuleConfigurationYamlSwapper.swap(each)); + result.getColumns().put(each.getLogicColumn(), encryptColumnRuleConfigurationYamlSwapper.swap(each)); } return result; } @@ -48,7 +48,7 @@ public final class EncryptTableRuleConfigurationYamlSwapper implements YamlSwapp Collection columns = new LinkedList<>(); for (Entry entry : yamlConfiguration.getColumns().entrySet()) { YamlEncryptColumnRuleConfiguration yamlEncryptColumnRuleConfiguration = entry.getValue(); - yamlEncryptColumnRuleConfiguration.setLogicName(entry.getKey()); + yamlEncryptColumnRuleConfiguration.setLogicColumn(entry.getKey()); columns.add(encryptColumnRuleConfigurationYamlSwapper.swap(yamlEncryptColumnRuleConfiguration)); } return new EncryptTableRuleConfiguration(yamlConfiguration.getName(), columns); diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/log/EncryptConfigurationLoggerTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/log/EncryptConfigurationLoggerTest.java index b21093eb2c..4a416802e5 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/log/EncryptConfigurationLoggerTest.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/log/EncryptConfigurationLoggerTest.java @@ -18,10 +18,10 @@ package org.apache.shardingsphere.encrypt.log; import lombok.SneakyThrows; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.infra.log.ConfigurationLogger; import org.junit.Before; import org.junit.Test; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptRuleTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptRuleTest.java index 5c91263033..c8a657b12b 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptRuleTest.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptRuleTest.java @@ -17,10 +17,10 @@ package org.apache.shardingsphere.encrypt.rule; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.junit.Before; import org.junit.Test; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java index 2734a7dff1..d203ff8fcf 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/test/java/org/apache/shardingsphere/encrypt/rule/EncryptTableTest.java @@ -17,8 +17,8 @@ package org.apache.shardingsphere.encrypt.rule; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; import org.apache.shardingsphere.infra.exception.ShardingSphereException; import org.junit.Before; import org.junit.Test; diff --git a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-spring/shardingsphere-encrypt-spring-namespace/src/main/java/org/apache/shardingsphere/encrypt/spring/namespace/parser/EncryptRuleBeanDefinitionParser.java b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-spring/shardingsphere-encrypt-spring-namespace/src/main/java/org/apache/shardingsphere/encrypt/spring/namespace/parser/EncryptRuleBeanDefinitionParser.java index af99355515..c00a2bbf2f 100644 --- a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-spring/shardingsphere-encrypt-spring-namespace/src/main/java/org/apache/shardingsphere/encrypt/spring/namespace/parser/EncryptRuleBeanDefinitionParser.java +++ b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-spring/shardingsphere-encrypt-spring-namespace/src/main/java/org/apache/shardingsphere/encrypt/spring/namespace/parser/EncryptRuleBeanDefinitionParser.java @@ -17,10 +17,10 @@ package org.apache.shardingsphere.encrypt.spring.namespace.parser; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.encrypt.spring.namespace.tag.EncryptRuleBeanDefinitionTag; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.AbstractBeanDefinition; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/type/OrchestrationSpringBootEncryptTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/type/OrchestrationSpringBootEncryptTest.java index 841e785d65..312d9bf42f 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/type/OrchestrationSpringBootEncryptTest.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/type/OrchestrationSpringBootEncryptTest.java @@ -22,7 +22,7 @@ import org.apache.commons.dbcp2.BasicDataSource; import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource; import org.apache.shardingsphere.driver.orchestration.internal.datasource.OrchestrationShardingSphereDataSource; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.spring.boot.orchestration.util.EmbedTestingServer; import org.junit.BeforeClass; import org.junit.Test; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/type/OrchestrationSpringBootRegistryEncryptTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/type/OrchestrationSpringBootRegistryEncryptTest.java index aae5166187..8af0e7c18a 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/type/OrchestrationSpringBootRegistryEncryptTest.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/type/OrchestrationSpringBootRegistryEncryptTest.java @@ -21,7 +21,7 @@ import org.apache.commons.dbcp2.BasicDataSource; import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource; import org.apache.shardingsphere.driver.orchestration.internal.datasource.OrchestrationShardingSphereDataSource; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.spring.boot.orchestration.registry.TestCenterRepository; import org.apache.shardingsphere.spring.boot.orchestration.util.EmbedTestingServer; import org.junit.BeforeClass; diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/orchestration/OrchestrationEncryptNamespaceTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/orchestration/OrchestrationEncryptNamespaceTest.java index 96210f7e7f..b55c05c126 100644 --- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/orchestration/OrchestrationEncryptNamespaceTest.java +++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/orchestration/OrchestrationEncryptNamespaceTest.java @@ -18,10 +18,10 @@ package org.apache.shardingsphere.spring.namespace.orchestration; import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource; -import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration; import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration; -import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration; +import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration; +import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration; import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties; import org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKey; import org.apache.shardingsphere.spring.namespace.orchestration.util.EmbedTestingServer; -- GitLab