You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/04/21 01:27:03 UTC
[shardingsphere] branch master updated: Change the interface AuthorityProvideAlgorithm to AuthorityProviderAlgorithm #16955 (#16968)
This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new d5065aaf6ff Change the interface AuthorityProvideAlgorithm to AuthorityProviderAlgorithm #16955 (#16968)
d5065aaf6ff is described below
commit d5065aaf6fff7a6a2730464ccfaea442d3cb29c6
Author: Cracker <45...@users.noreply.github.com>
AuthorDate: Thu Apr 21 09:26:48 2022 +0800
Change the interface AuthorityProvideAlgorithm to AuthorityProviderAlgorithm #16955 (#16968)
---
...orityProvideAlgorithm.java => AuthorityProviderAlgorithm.java} | 2 +-
.../provider/natived/NativeAuthorityProviderAlgorithm.java | 4 ++--
.../SchemaPrivilegesPermittedAuthorityProviderAlgorithm.java | 4 ++--
.../simple/AllPrivilegesPermittedAuthorityProviderAlgorithm.java | 4 ++--
.../org/apache/shardingsphere/authority/rule/AuthorityRule.java | 8 ++++----
...pache.shardingsphere.authority.spi.AuthorityProviderAlgorithm} | 0
.../provider/natived/NativeAuthorityProviderAlgorithmTest.java | 6 +++---
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProvideAlgorithm.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProviderAlgorithm.java
similarity index 96%
rename from shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProvideAlgorithm.java
rename to shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProviderAlgorithm.java
index 49cc5a233db..16949b0e45c 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProvideAlgorithm.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/spi/AuthorityProviderAlgorithm.java
@@ -30,7 +30,7 @@ import java.util.Optional;
/**
* Authority provide algorithm.
*/
-public interface AuthorityProvideAlgorithm extends ShardingSphereAlgorithm {
+public interface AuthorityProviderAlgorithm extends ShardingSphereAlgorithm {
/**
* Initialize authority.
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/natived/NativeAuthorityProviderAlgorithm.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/natived/NativeAuthorityProviderAlgorithm.java
index 82ec458b439..4be5b6fccbb 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/natived/NativeAuthorityProviderAlgorithm.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/natived/NativeAuthorityProviderAlgorithm.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.authority.provider.natived;
import org.apache.shardingsphere.authority.model.ShardingSpherePrivileges;
import org.apache.shardingsphere.authority.provider.natived.builder.StoragePrivilegeBuilder;
-import org.apache.shardingsphere.authority.spi.AuthorityProvideAlgorithm;
+import org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.user.Grantee;
import org.apache.shardingsphere.infra.metadata.user.ShardingSphereUser;
@@ -36,7 +36,7 @@ import java.util.concurrent.ConcurrentHashMap;
* @deprecated This algorithm will be removed in a future version.
*/
@Deprecated
-public final class NativeAuthorityProviderAlgorithm implements AuthorityProvideAlgorithm {
+public final class NativeAuthorityProviderAlgorithm implements AuthorityProviderAlgorithm {
private final Map<ShardingSphereUser, ShardingSpherePrivileges> userPrivilegeMap = new ConcurrentHashMap<>();
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/schema/SchemaPrivilegesPermittedAuthorityProviderAlgorithm.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/schema/SchemaPrivilegesPermittedAuthorityProviderAlgorithm.java
index b20de4ae980..6c11e3fb252 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/schema/SchemaPrivilegesPermittedAuthorityProviderAlgorithm.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/schema/SchemaPrivilegesPermittedAuthorityProviderAlgorithm.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.authority.provider.schema;
import org.apache.shardingsphere.authority.model.ShardingSpherePrivileges;
import org.apache.shardingsphere.authority.provider.schema.builder.SchemaPrivilegeBuilder;
-import org.apache.shardingsphere.authority.spi.AuthorityProvideAlgorithm;
+import org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.user.Grantee;
import org.apache.shardingsphere.infra.metadata.user.ShardingSphereUser;
@@ -30,7 +30,7 @@ import java.util.Optional;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
-public final class SchemaPrivilegesPermittedAuthorityProviderAlgorithm implements AuthorityProvideAlgorithm {
+public final class SchemaPrivilegesPermittedAuthorityProviderAlgorithm implements AuthorityProviderAlgorithm {
public static final String PROP_USER_SCHEMA_MAPPINGS = "user-schema-mappings";
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPrivilegesPermittedAuthorityProviderAlgorithm.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPrivilegesPermittedAuthorityProviderAlgorithm.java
index 419b09c7bde..e697847b547 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPrivilegesPermittedAuthorityProviderAlgorithm.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/provider/simple/AllPrivilegesPermittedAuthorityProviderAlgorithm.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.authority.provider.simple;
import org.apache.shardingsphere.authority.model.AccessSubject;
import org.apache.shardingsphere.authority.model.PrivilegeType;
import org.apache.shardingsphere.authority.model.ShardingSpherePrivileges;
-import org.apache.shardingsphere.authority.spi.AuthorityProvideAlgorithm;
+import org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.user.Grantee;
import org.apache.shardingsphere.infra.metadata.user.ShardingSphereUser;
@@ -32,7 +32,7 @@ import java.util.Optional;
/**
* All privileges permitted authority provider algorithm.
*/
-public final class AllPrivilegesPermittedAuthorityProviderAlgorithm implements AuthorityProvideAlgorithm {
+public final class AllPrivilegesPermittedAuthorityProviderAlgorithm implements AuthorityProviderAlgorithm {
private static final ShardingSpherePrivileges INSTANCE = new AllPrivilegesPermittedShardingSpherePrivileges();
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/rule/AuthorityRule.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/rule/AuthorityRule.java
index b7bc71536e4..e7a26c4c09d 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/rule/AuthorityRule.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/java/org/apache/shardingsphere/authority/rule/AuthorityRule.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.authority.rule;
import org.apache.shardingsphere.authority.config.AuthorityRuleConfiguration;
import org.apache.shardingsphere.authority.model.ShardingSpherePrivileges;
-import org.apache.shardingsphere.authority.spi.AuthorityProvideAlgorithm;
+import org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm;
import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmFactory;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.user.Grantee;
@@ -37,15 +37,15 @@ import java.util.Optional;
public final class AuthorityRule implements GlobalRule {
static {
- ShardingSphereServiceLoader.register(AuthorityProvideAlgorithm.class);
+ ShardingSphereServiceLoader.register(AuthorityProviderAlgorithm.class);
}
- private final AuthorityProvideAlgorithm provider;
+ private final AuthorityProviderAlgorithm provider;
private final Collection<ShardingSphereUser> users;
public AuthorityRule(final AuthorityRuleConfiguration config, final Map<String, ShardingSphereMetaData> metaDataMap) {
- provider = ShardingSphereAlgorithmFactory.createAlgorithm(config.getProvider(), AuthorityProvideAlgorithm.class);
+ provider = ShardingSphereAlgorithmFactory.createAlgorithm(config.getProvider(), AuthorityProviderAlgorithm.class);
provider.init(metaDataMap, config.getUsers());
users = config.getUsers();
}
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/resources/META-INF/services/org.apache.shardingsphere.authority.spi.AuthorityProvideAlgorithm b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/resources/META-INF/services/org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm
similarity index 100%
rename from shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/resources/META-INF/services/org.apache.shardingsphere.authority.spi.AuthorityProvideAlgorithm
rename to shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/main/resources/META-INF/services/org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm
diff --git a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/provider/natived/NativeAuthorityProviderAlgorithmTest.java b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/provider/natived/NativeAuthorityProviderAlgorithmTest.java
index 394c92c3220..827d7db4a01 100644
--- a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/provider/natived/NativeAuthorityProviderAlgorithmTest.java
+++ b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-core/src/test/java/org/apache/shardingsphere/authority/provider/natived/NativeAuthorityProviderAlgorithmTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.authority.provider.natived;
import org.apache.shardingsphere.authority.model.PrivilegeType;
import org.apache.shardingsphere.authority.model.ShardingSpherePrivileges;
-import org.apache.shardingsphere.authority.spi.AuthorityProvideAlgorithm;
+import org.apache.shardingsphere.authority.spi.AuthorityProviderAlgorithm;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.user.Grantee;
import org.apache.shardingsphere.infra.metadata.user.ShardingSphereUser;
@@ -49,12 +49,12 @@ public final class NativeAuthorityProviderAlgorithmTest {
@BeforeClass
public static void setUp() {
- ShardingSphereServiceLoader.register(AuthorityProvideAlgorithm.class);
+ ShardingSphereServiceLoader.register(AuthorityProviderAlgorithm.class);
}
@Test
public void assertAlgorithmType() {
- Optional<AuthorityProvideAlgorithm> algorithm = TypedSPIRegistry.findRegisteredService(AuthorityProvideAlgorithm.class, "NATIVE", new Properties());
+ Optional<AuthorityProviderAlgorithm> algorithm = TypedSPIRegistry.findRegisteredService(AuthorityProviderAlgorithm.class, "NATIVE", new Properties());
assertTrue(algorithm.isPresent());
assertThat(algorithm.get().getType(), is("NATIVE"));
}