test_class.declarator: DATA_SOURCE_YAM = "yaml/configCenter/data-source.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String DATA_SOURCE_YAM = "yaml/configCenter/data-source.yaml";
test_class.type: String
test_class.var_name: DATA_SOURCE_YAM
test_class.declarator: SHARDING_RULE_YAML = "yaml/configCenter/data-sharding-rule.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String SHARDING_RULE_YAML = "yaml/configCenter/data-sharding-rule.yaml";
test_class.type: String
test_class.var_name: SHARDING_RULE_YAML
test_class.declarator: SHARDING_AND_ENCRYPT_RULE_YAML = "yaml/configCenter/data-sharding-encrypt-rule.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String SHARDING_AND_ENCRYPT_RULE_YAML = "yaml/configCenter/data-sharding-encrypt-rule.yaml";
test_class.type: String
test_class.var_name: SHARDING_AND_ENCRYPT_RULE_YAML
test_class.declarator: PRIMARY_REPLICA_REPLICATION_RULE_YAML = "yaml/configCenter/data-primary-replica-replication-rule.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String PRIMARY_REPLICA_REPLICATION_RULE_YAML = "yaml/configCenter/data-primary-replica-replication-rule.yaml";
test_class.type: String
test_class.var_name: PRIMARY_REPLICA_REPLICATION_RULE_YAML
test_class.declarator: ENCRYPT_RULE_YAML = "yaml/configCenter/data-encrypt-rule.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String ENCRYPT_RULE_YAML = "yaml/configCenter/data-encrypt-rule.yaml";
test_class.type: String
test_class.var_name: ENCRYPT_RULE_YAML
test_class.declarator: SHADOW_RULE_YAML = "yaml/configCenter/data-shadow-rule.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String SHADOW_RULE_YAML = "yaml/configCenter/data-shadow-rule.yaml";
test_class.type: String
test_class.var_name: SHADOW_RULE_YAML
test_class.declarator: AUTHENTICATION_YAML = "yaml/configCenter/data-authentication.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String AUTHENTICATION_YAML = "yaml/configCenter/data-authentication.yaml";
test_class.type: String
test_class.var_name: AUTHENTICATION_YAML
test_class.declarator: PROPS_YAML = ConfigurationPropertyKey.SQL_SHOW.getKey() + ": false\n"
test_class.modifier: private static final
test_class.original_string: private static final String PROPS_YAML = ConfigurationPropertyKey.SQL_SHOW.getKey() + ": false\n";
test_class.type: String
test_class.var_name: PROPS_YAML
test_class.declarator: DATA_SOURCE_YAML_WITH_CONNECTION_INIT_SQL = "yaml/configCenter/data-source-init-sql.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String DATA_SOURCE_YAML_WITH_CONNECTION_INIT_SQL = "yaml/configCenter/data-source-init-sql.yaml";
test_class.type: String
test_class.var_name: DATA_SOURCE_YAML_WITH_CONNECTION_INIT_SQL
test_class.declarator: META_DATA_YAML = "yaml/metadata.yaml"
test_class.modifier: private static final
test_class.original_string: private static final String META_DATA_YAML = "yaml/metadata.yaml";
test_class.type: String
test_class.var_name: META_DATA_YAML
test_class.declarator: configurationRepository
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationRepository configurationRepository;
test_class.type: ConfigurationRepository
test_class.var_name: configurationRepository
test_class.file: shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/test/java/org/apache/shardingsphere/governance/core/config/ConfigCenterTest.java
test_class.identifier: ConfigCenterTest
test_case.body: @Test
      public void assertLoadShardingAndEncryptRuleConfiguration() {
          when(configurationRepository.get("/schemas/sharding_db/rule")).thenReturn(readYAML(SHARDING_AND_ENCRYPT_RULE_YAML));
          ConfigCenter configCenter = new ConfigCenter(configurationRepository);
          Collection<RuleConfiguration> ruleConfigurations = configCenter.loadRuleConfigurations("sharding_db");
          assertThat(ruleConfigurations.size(), is(2));
          for (RuleConfiguration each : ruleConfigurations) {
              if (each instanceof ShardingRuleConfiguration) {
                  ShardingRuleConfiguration shardingRuleConfig = (ShardingRuleConfiguration) each;
                  assertThat(shardingRuleConfig.getTables().size(), is(1));
                  assertThat(shardingRuleConfig.getTables().iterator().next().getLogicTable(), is("t_order"));
              } else if (each instanceof EncryptRuleConfiguration) {
                  EncryptRuleConfiguration encryptRuleConfig = (EncryptRuleConfiguration) each;
                  assertThat(encryptRuleConfig.getEncryptors().size(), is(2));
                  ShardingSphereAlgorithmConfiguration encryptAlgorithmConfig = encryptRuleConfig.getEncryptors().get("aes_encryptor");
                  assertThat(encryptAlgorithmConfig.getType(), is("AES"));
                  assertThat(encryptAlgorithmConfig.getProps().get("aes-key-value").toString(), is("123456abcd"));
              }
          }
      }
test_case.class_method_signature: ConfigCenterTest.assertLoadShardingAndEncryptRuleConfiguration()
test_case.full_signature: @Test public void assertLoadShardingAndEncryptRuleConfiguration()
test_case.identifier: assertLoadShardingAndEncryptRuleConfiguration
test_case.invocations: thenReturn when get readYAML loadRuleConfigurations assertThat size is assertThat size getTables is assertThat getLogicTable next iterator getTables is assertThat size getEncryptors is get getEncryptors assertThat getType is assertThat toString get getProps is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertLoadShardingAndEncryptRuleConfiguration()
focal_class.declarator: node
focal_class.modifier: private final
focal_class.original_string: private final ConfigCenterNode node;
focal_class.type: ConfigCenterNode
focal_class.var_name: node
focal_class.declarator: repository
focal_class.modifier: private final
focal_class.original_string: private final ConfigurationRepository repository;
focal_class.type: ConfigurationRepository
focal_class.var_name: repository
focal_class.file: shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-config/src/main/java/org/apache/shardingsphere/governance/core/config/ConfigCenter.java
focal_class.identifier: ConfigCenter
focal_class.class_method_signature: ConfigCenter.ConfigCenter(final ConfigurationRepository repository)
focal_class.full_signature: public  ConfigCenter(final ConfigurationRepository repository)
focal_class.identifier: ConfigCenter
focal_class.modifiers: public
focal_class.parameters: (final ConfigurationRepository repository)
focal_class.signature:  ConfigCenter(final ConfigurationRepository repository)
focal_class.class_method_signature: ConfigCenter.persistConfigurations(final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigs,
                                        final Collection<RuleConfiguration> ruleConfigurations, final boolean isOverwrite)
focal_class.full_signature: public void persistConfigurations(final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigs,
                                        final Collection<RuleConfiguration> ruleConfigurations, final boolean isOverwrite)
focal_class.identifier: persistConfigurations
focal_class.modifiers: public
focal_class.parameters: (final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigs,
                                        final Collection<RuleConfiguration> ruleConfigurations, final boolean isOverwrite)
focal_class.return: void
focal_class.signature: void persistConfigurations(final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigs,
                                        final Collection<RuleConfiguration> ruleConfigurations, final boolean isOverwrite)
focal_class.class_method_signature: ConfigCenter.persistGlobalConfiguration(final Authentication authentication, final Properties props, final boolean isOverwrite)
focal_class.full_signature: public void persistGlobalConfiguration(final Authentication authentication, final Properties props, final boolean isOverwrite)
focal_class.identifier: persistGlobalConfiguration
focal_class.modifiers: public
focal_class.parameters: (final Authentication authentication, final Properties props, final boolean isOverwrite)
focal_class.return: void
focal_class.signature: void persistGlobalConfiguration(final Authentication authentication, final Properties props, final boolean isOverwrite)
focal_class.class_method_signature: ConfigCenter.renew(final DataSourcePersistEvent event)
focal_class.full_signature: @Subscribe public synchronized void renew(final DataSourcePersistEvent event)
focal_class.identifier: renew
focal_class.modifiers: @Subscribe public synchronized
focal_class.parameters: (final DataSourcePersistEvent event)
focal_class.return: void
focal_class.signature: void renew(final DataSourcePersistEvent event)
focal_class.class_method_signature: ConfigCenter.renew(final RulePersistEvent event)
focal_class.full_signature: @Subscribe public synchronized void renew(final RulePersistEvent event)
focal_class.identifier: renew
focal_class.modifiers: @Subscribe public synchronized
focal_class.parameters: (final RulePersistEvent event)
focal_class.return: void
focal_class.signature: void renew(final RulePersistEvent event)
focal_class.class_method_signature: ConfigCenter.renew(final SchemaNamePersistEvent event)
focal_class.full_signature: @Subscribe public synchronized void renew(final SchemaNamePersistEvent event)
focal_class.identifier: renew
focal_class.modifiers: @Subscribe public synchronized
focal_class.parameters: (final SchemaNamePersistEvent event)
focal_class.return: void
focal_class.signature: void renew(final SchemaNamePersistEvent event)
focal_class.class_method_signature: ConfigCenter.renew(final MetaDataPersistEvent event)
focal_class.full_signature: @Subscribe public synchronized void renew(final MetaDataPersistEvent event)
focal_class.identifier: renew
focal_class.modifiers: @Subscribe public synchronized
focal_class.parameters: (final MetaDataPersistEvent event)
focal_class.return: void
focal_class.signature: void renew(final MetaDataPersistEvent event)
focal_class.class_method_signature: ConfigCenter.persistDataSourceConfigurations(final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigurations, final boolean isOverwrite)
focal_class.full_signature: private void persistDataSourceConfigurations(final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigurations, final boolean isOverwrite)
focal_class.identifier: persistDataSourceConfigurations
focal_class.modifiers: private
focal_class.parameters: (final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigurations, final boolean isOverwrite)
focal_class.return: void
focal_class.signature: void persistDataSourceConfigurations(final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigurations, final boolean isOverwrite)
focal_class.class_method_signature: ConfigCenter.persistDataSourceConfigurations(final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigurations)
focal_class.full_signature: private void persistDataSourceConfigurations(final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigurations)
focal_class.identifier: persistDataSourceConfigurations
focal_class.modifiers: private
focal_class.parameters: (final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigurations)
focal_class.return: void
focal_class.signature: void persistDataSourceConfigurations(final String schemaName, final Map<String, DataSourceConfiguration> dataSourceConfigurations)
focal_class.class_method_signature: ConfigCenter.persistRuleConfigurations(final String schemaName, final Collection<RuleConfiguration> ruleConfigurations, final boolean isOverwrite)
focal_class.full_signature: private void persistRuleConfigurations(final String schemaName, final Collection<RuleConfiguration> ruleConfigurations, final boolean isOverwrite)
focal_class.identifier: persistRuleConfigurations
focal_class.modifiers: private
focal_class.parameters: (final String schemaName, final Collection<RuleConfiguration> ruleConfigurations, final boolean isOverwrite)
focal_class.return: void
focal_class.signature: void persistRuleConfigurations(final String schemaName, final Collection<RuleConfiguration> ruleConfigurations, final boolean isOverwrite)
focal_class.class_method_signature: ConfigCenter.persistRuleConfigurations(final String schemaName, final Collection<RuleConfiguration> ruleConfigurations)
focal_class.full_signature: private void persistRuleConfigurations(final String schemaName, final Collection<RuleConfiguration> ruleConfigurations)
focal_class.identifier: persistRuleConfigurations
focal_class.modifiers: private
focal_class.parameters: (final String schemaName, final Collection<RuleConfiguration> ruleConfigurations)
focal_class.return: void
focal_class.signature: void persistRuleConfigurations(final String schemaName, final Collection<RuleConfiguration> ruleConfigurations)
focal_class.class_method_signature: ConfigCenter.hasAvailableTableConfigurations(final ShardingRuleConfiguration config)
focal_class.full_signature: private boolean hasAvailableTableConfigurations(final ShardingRuleConfiguration config)
focal_class.identifier: hasAvailableTableConfigurations
focal_class.modifiers: private
focal_class.parameters: (final ShardingRuleConfiguration config)
focal_class.return: boolean
focal_class.signature: boolean hasAvailableTableConfigurations(final ShardingRuleConfiguration config)
focal_class.class_method_signature: ConfigCenter.hasAvailableTableConfigurations(final AlgorithmProvidedShardingRuleConfiguration config)
focal_class.full_signature: private boolean hasAvailableTableConfigurations(final AlgorithmProvidedShardingRuleConfiguration config)
focal_class.identifier: hasAvailableTableConfigurations
focal_class.modifiers: private
focal_class.parameters: (final AlgorithmProvidedShardingRuleConfiguration config)
focal_class.return: boolean
focal_class.signature: boolean hasAvailableTableConfigurations(final AlgorithmProvidedShardingRuleConfiguration config)
focal_class.class_method_signature: ConfigCenter.persistAuthentication(final Authentication authentication, final boolean isOverwrite)
focal_class.full_signature: private void persistAuthentication(final Authentication authentication, final boolean isOverwrite)
focal_class.identifier: persistAuthentication
focal_class.modifiers: private
focal_class.parameters: (final Authentication authentication, final boolean isOverwrite)
focal_class.return: void
focal_class.signature: void persistAuthentication(final Authentication authentication, final boolean isOverwrite)
focal_class.class_method_signature: ConfigCenter.persistProperties(final Properties props, final boolean isOverwrite)
focal_class.full_signature: private void persistProperties(final Properties props, final boolean isOverwrite)
focal_class.identifier: persistProperties
focal_class.modifiers: private
focal_class.parameters: (final Properties props, final boolean isOverwrite)
focal_class.return: void
focal_class.signature: void persistProperties(final Properties props, final boolean isOverwrite)
focal_class.class_method_signature: ConfigCenter.hasProperties()
focal_class.full_signature: private boolean hasProperties()
focal_class.identifier: hasProperties
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasProperties()
focal_class.class_method_signature: ConfigCenter.persistSchemaName(final String schemaName)
focal_class.full_signature: private void persistSchemaName(final String schemaName)
focal_class.identifier: persistSchemaName
focal_class.modifiers: private
focal_class.parameters: (final String schemaName)
focal_class.return: void
focal_class.signature: void persistSchemaName(final String schemaName)
focal_class.class_method_signature: ConfigCenter.persistSchema(final String schemaName, final boolean isDrop)
focal_class.full_signature: private void persistSchema(final String schemaName, final boolean isDrop)
focal_class.identifier: persistSchema
focal_class.modifiers: private
focal_class.parameters: (final String schemaName, final boolean isDrop)
focal_class.return: void
focal_class.signature: void persistSchema(final String schemaName, final boolean isDrop)
focal_class.class_method_signature: ConfigCenter.loadDataSourceConfigurations(final String schemaName)
focal_class.full_signature: public Map<String, DataSourceConfiguration> loadDataSourceConfigurations(final String schemaName)
focal_class.identifier: loadDataSourceConfigurations
focal_class.modifiers: public
focal_class.parameters: (final String schemaName)
focal_class.return: Map<String, DataSourceConfiguration>
focal_class.signature: Map<String, DataSourceConfiguration> loadDataSourceConfigurations(final String schemaName)
focal_class.class_method_signature: ConfigCenter.loadRuleConfigurations(final String schemaName)
focal_class.full_signature: public Collection<RuleConfiguration> loadRuleConfigurations(final String schemaName)
focal_class.identifier: loadRuleConfigurations
focal_class.modifiers: public
focal_class.parameters: (final String schemaName)
focal_class.return: Collection<RuleConfiguration>
focal_class.signature: Collection<RuleConfiguration> loadRuleConfigurations(final String schemaName)
focal_class.class_method_signature: ConfigCenter.loadAuthentication()
focal_class.full_signature: public Authentication loadAuthentication()
focal_class.identifier: loadAuthentication
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Authentication
focal_class.signature: Authentication loadAuthentication()
focal_class.class_method_signature: ConfigCenter.loadProperties()
focal_class.full_signature: public Properties loadProperties()
focal_class.identifier: loadProperties
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Properties
focal_class.signature: Properties loadProperties()
focal_class.class_method_signature: ConfigCenter.getAllSchemaNames()
focal_class.full_signature: public Collection<String> getAllSchemaNames()
focal_class.identifier: getAllSchemaNames
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<String>
focal_class.signature: Collection<String> getAllSchemaNames()
focal_class.class_method_signature: ConfigCenter.hasRuleConfiguration(final String schemaName)
focal_class.full_signature: public boolean hasRuleConfiguration(final String schemaName)
focal_class.identifier: hasRuleConfiguration
focal_class.modifiers: public
focal_class.parameters: (final String schemaName)
focal_class.return: boolean
focal_class.signature: boolean hasRuleConfiguration(final String schemaName)
focal_class.class_method_signature: ConfigCenter.hasDataSourceConfiguration(final String schemaName)
focal_class.full_signature: public boolean hasDataSourceConfiguration(final String schemaName)
focal_class.identifier: hasDataSourceConfiguration
focal_class.modifiers: public
focal_class.parameters: (final String schemaName)
focal_class.return: boolean
focal_class.signature: boolean hasDataSourceConfiguration(final String schemaName)
focal_class.class_method_signature: ConfigCenter.persistMetaData(final String schemaName, final RuleSchemaMetaData ruleSchemaMetaData)
focal_class.full_signature: public void persistMetaData(final String schemaName, final RuleSchemaMetaData ruleSchemaMetaData)
focal_class.identifier: persistMetaData
focal_class.modifiers: public
focal_class.parameters: (final String schemaName, final RuleSchemaMetaData ruleSchemaMetaData)
focal_class.return: void
focal_class.signature: void persistMetaData(final String schemaName, final RuleSchemaMetaData ruleSchemaMetaData)
focal_class.class_method_signature: ConfigCenter.loadMetaData(final String schemaName)
focal_class.full_signature: public Optional<RuleSchemaMetaData> loadMetaData(final String schemaName)
focal_class.identifier: loadMetaData
focal_class.modifiers: public
focal_class.parameters: (final String schemaName)
focal_class.return: Optional<RuleSchemaMetaData>
focal_class.signature: Optional<RuleSchemaMetaData> loadMetaData(final String schemaName)
focal_class.class_method_signature: ConfigCenter.deleteSchema(final String schemaName)
focal_class.full_signature: public void deleteSchema(final String schemaName)
focal_class.identifier: deleteSchema
focal_class.modifiers: public
focal_class.parameters: (final String schemaName)
focal_class.return: void
focal_class.signature: void deleteSchema(final String schemaName)
focal_class.class_method_signature: ConfigCenter.hasAuthentication()
focal_class.full_signature: private boolean hasAuthentication()
focal_class.identifier: hasAuthentication
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasAuthentication()
focal_method.body: public Collection<RuleConfiguration> loadRuleConfigurations(final String schemaName) {
          return hasRuleConfiguration(schemaName) ? new YamlRuleConfigurationSwapperEngine().swapToRuleConfigurations(
                  YamlEngine.unmarshal(repository.get(node.getRulePath(schemaName)), YamlRootRuleConfigurations.class).getRules()) : new LinkedList<>();
      }
focal_method.class_method_signature: ConfigCenter.loadRuleConfigurations(final String schemaName)
focal_method.full_signature: public Collection<RuleConfiguration> loadRuleConfigurations(final String schemaName)
focal_method.identifier: loadRuleConfigurations
focal_method.invocations: hasRuleConfiguration swapToRuleConfigurations getRules unmarshal get getRulePath
focal_method.modifiers: public
focal_method.parameters: (final String schemaName)
focal_method.return: Collection<RuleConfiguration>
focal_method.signature: Collection<RuleConfiguration> loadRuleConfigurations(final String schemaName)