fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject [fineract-cn-provisioner] 03/50: Making property names consisten across the platform.
Date Mon, 22 Jan 2018 15:16:01 GMT
This is an automated email from the ASF dual-hosted git repository.

myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-provisioner.git

commit fa71e2e522fd2d56bfca43369fdd3207cdb3e580
Author: myrle-krantz <mkrantz@mifos.org>
AuthorDate: Fri Mar 17 11:56:16 2017 +0100

    Making property names consisten across the platform.
---
 .../src/main/java/io/mifos/provisioner/AbstractServiceTest.java   | 6 +++---
 .../mifos/provisioner/tenant/TestTenantApplicationAssignment.java | 8 ++++----
 .../io/mifos/provisioner/config/ProvisionerServiceConfig.java     | 4 ++--
 .../io/mifos/provisioner/internal/repository/Provisioner.java     | 2 +-
 .../mifos/provisioner/internal/service/AuthenticationService.java | 2 +-
 .../internal/service/applications/IdentityServiceInitializer.java | 2 +-
 service/src/main/resources/application.yaml                       | 2 +-
 .../src/test/java/io/mifos/provisioner/GenerateRsaKeyPair.java    | 4 ++--
 .../io/mifos/provisioner/internal/util/JdbcUrlBuilderTest.java    | 1 -
 9 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/component-test/src/main/java/io/mifos/provisioner/AbstractServiceTest.java b/component-test/src/main/java/io/mifos/provisioner/AbstractServiceTest.java
index d9fb284..8fb6f3e 100644
--- a/component-test/src/main/java/io/mifos/provisioner/AbstractServiceTest.java
+++ b/component-test/src/main/java/io/mifos/provisioner/AbstractServiceTest.java
@@ -76,9 +76,9 @@ public class AbstractServiceTest {
 
   @BeforeClass
   public static void setup() throws Exception {
-    System.setProperty("provisioner.privateKey.modulus", testEnvironment.getSeshatPrivateKey().getModulus().toString());
-    System.setProperty("provisioner.privateKey.exponent", testEnvironment.getSeshatPrivateKey().getPrivateExponent().toString());
-    System.setProperty("provisioner.initialclientid", CLIENT_ID);
+    System.setProperty("system.privateKey.modulus", testEnvironment.getSystemPrivateKey().getModulus().toString());
+    System.setProperty("system.privateKey.exponent", testEnvironment.getSystemPrivateKey().getPrivateExponent().toString());
+    System.setProperty("system.initialclientid", CLIENT_ID);
   }
 
   protected String getClientId() {
diff --git a/component-test/src/main/java/io/mifos/provisioner/tenant/TestTenantApplicationAssignment.java
b/component-test/src/main/java/io/mifos/provisioner/tenant/TestTenantApplicationAssignment.java
index 6f895be..defd82f 100644
--- a/component-test/src/main/java/io/mifos/provisioner/tenant/TestTenantApplicationAssignment.java
+++ b/component-test/src/main/java/io/mifos/provisioner/tenant/TestTenantApplicationAssignment.java
@@ -107,7 +107,7 @@ public class TestTenantApplicationAssignment {
   private static ProvisionerMariaDBInitializer mariaDBInitializer = new ProvisionerMariaDBInitializer();
   private static ProvisionerCassandraInitializer cassandraInitializer = new ProvisionerCassandraInitializer();
   private static SystemSecurityEnvironment systemSecurityEnvironment
-          = new SystemSecurityEnvironment(testEnvironment.getSeshatPublicKey(), testEnvironment.getSeshatPrivateKey());
+          = new SystemSecurityEnvironment(testEnvironment.getSystemPublicKey(), testEnvironment.getSystemPrivateKey());
 
   @ClassRule
   public static TestRule orderClassRules = RuleChain
@@ -137,9 +137,9 @@ public class TestTenantApplicationAssignment {
   @BeforeClass
   public static void setup() throws Exception {
 
-    System.setProperty("provisioner.privateKey.modulus", testEnvironment.getSeshatPrivateKey().getModulus().toString());
-    System.setProperty("provisioner.privateKey.exponent", testEnvironment.getSeshatPrivateKey().getPrivateExponent().toString());
-    System.setProperty("provisioner.initialclientid", CLIENT_ID);
+    System.setProperty("system.privateKey.modulus", testEnvironment.getSystemPrivateKey().getModulus().toString());
+    System.setProperty("system.privateKey.exponent", testEnvironment.getSystemPrivateKey().getPrivateExponent().toString());
+    System.setProperty("system.initialclientid", CLIENT_ID);
   }
 
   @Before
diff --git a/service/src/main/java/io/mifos/provisioner/config/ProvisionerServiceConfig.java
b/service/src/main/java/io/mifos/provisioner/config/ProvisionerServiceConfig.java
index 6abfd19..037f533 100644
--- a/service/src/main/java/io/mifos/provisioner/config/ProvisionerServiceConfig.java
+++ b/service/src/main/java/io/mifos/provisioner/config/ProvisionerServiceConfig.java
@@ -70,8 +70,8 @@ public class ProvisionerServiceConfig {
   public TokenProvider tokenProvider(final Environment environment,
                                      @SuppressWarnings("SpringJavaAutowiringInspection")
final SystemAccessTokenSerializer tokenSerializer) {
     return new TokenProvider(
-        new BigInteger(environment.getProperty("provisioner.privateKey.modulus")),
-        new BigInteger(environment.getProperty("provisioner.privateKey.exponent")), tokenSerializer);
+        new BigInteger(environment.getProperty("system.privateKey.modulus")),
+        new BigInteger(environment.getProperty("system.privateKey.exponent")), tokenSerializer);
   }
 
   @Bean
diff --git a/service/src/main/java/io/mifos/provisioner/internal/repository/Provisioner.java
b/service/src/main/java/io/mifos/provisioner/internal/repository/Provisioner.java
index 2b19b65..311637a 100644
--- a/service/src/main/java/io/mifos/provisioner/internal/repository/Provisioner.java
+++ b/service/src/main/java/io/mifos/provisioner/internal/repository/Provisioner.java
@@ -62,7 +62,7 @@ public class Provisioner {
   public Provisioner(final Environment environment, @Qualifier(ProvisionerConstants.LOGGER_NAME)
final Logger logger,
                      final CassandraSessionProvider cassandraSessionProvider,
                      final SaltGenerator saltGenerator, final HashGenerator hashGenerator,
-                     @Value("${provisioner.initialclientid}") final String initialClientId)
{
+                     @Value("${system.initialclientid}") final String initialClientId) {
     super();
     this.environment = environment;
     this.logger = logger;
diff --git a/service/src/main/java/io/mifos/provisioner/internal/service/AuthenticationService.java
b/service/src/main/java/io/mifos/provisioner/internal/service/AuthenticationService.java
index 8c9b103..465380e 100644
--- a/service/src/main/java/io/mifos/provisioner/internal/service/AuthenticationService.java
+++ b/service/src/main/java/io/mifos/provisioner/internal/service/AuthenticationService.java
@@ -58,7 +58,7 @@ public class AuthenticationService {
 
   @Value("${spring.application.name}")
   private String applicationName;
-  @Value("${provisioner.token.ttl}")
+  @Value("${system.token.ttl}")
   private Integer ttl;
   private final Logger logger;
   private final CassandraSessionProvider cassandraSessionProvider;
diff --git a/service/src/main/java/io/mifos/provisioner/internal/service/applications/IdentityServiceInitializer.java
b/service/src/main/java/io/mifos/provisioner/internal/service/applications/IdentityServiceInitializer.java
index 1be58d8..11376a7 100644
--- a/service/src/main/java/io/mifos/provisioner/internal/service/applications/IdentityServiceInitializer.java
+++ b/service/src/main/java/io/mifos/provisioner/internal/service/applications/IdentityServiceInitializer.java
@@ -47,7 +47,7 @@ public class IdentityServiceInitializer {
   private final HashGenerator hashGenerator;
   private final Logger logger;
 
-  @Value("${provisioner.domain}")
+  @Value("${system.domain}")
   private String domain;
 
   public class IdentityServiceInitializationResult {
diff --git a/service/src/main/resources/application.yaml b/service/src/main/resources/application.yaml
index 3285ffe..a81fb64 100644
--- a/service/src/main/resources/application.yaml
+++ b/service/src/main/resources/application.yaml
@@ -42,7 +42,7 @@ mariadb:
   user: root
   password: mysql
 
-provisioner:
+system:
   domain: mifos.io
   dataStoreOption: ALL # possible values ALL, CASSANDRA, RDBMS
   token:
diff --git a/service/src/test/java/io/mifos/provisioner/GenerateRsaKeyPair.java b/service/src/test/java/io/mifos/provisioner/GenerateRsaKeyPair.java
index 8aed5da..f67a0c4 100644
--- a/service/src/test/java/io/mifos/provisioner/GenerateRsaKeyPair.java
+++ b/service/src/test/java/io/mifos/provisioner/GenerateRsaKeyPair.java
@@ -43,7 +43,7 @@ public class GenerateRsaKeyPair {
     final KeyPair keyPair = keyPairGenerator.genKeyPair();
 
     final RSAPublicKeySpec rsaPublicKeySpec = keyFactory.getKeySpec(keyPair.getPublic(),
RSAPublicKeySpec.class);
-    final BufferedWriter bufferedWriterPubKey = Files.newBufferedWriter(Paths.get("/home/mage/seshat.pub"));
+    final BufferedWriter bufferedWriterPubKey = Files.newBufferedWriter(Paths.get("/home/mage/system.pub"));
     bufferedWriterPubKey.write(rsaPublicKeySpec.getModulus().toString());
     bufferedWriterPubKey.newLine();
     bufferedWriterPubKey.write(rsaPublicKeySpec.getPublicExponent().toString());
@@ -51,7 +51,7 @@ public class GenerateRsaKeyPair {
     bufferedWriterPubKey.close();
 
     final RSAPrivateKeySpec rsaPrivateKeySpec = keyFactory.getKeySpec(keyPair.getPrivate(),
RSAPrivateKeySpec.class);
-    final BufferedWriter bufferedWriterPrivateKey = Files.newBufferedWriter(Paths.get("/home/mage/seshat"));
+    final BufferedWriter bufferedWriterPrivateKey = Files.newBufferedWriter(Paths.get("/home/mage/system"));
     bufferedWriterPrivateKey.write(rsaPrivateKeySpec.getModulus().toString());
     bufferedWriterPrivateKey.newLine();
     bufferedWriterPrivateKey.write(rsaPrivateKeySpec.getPrivateExponent().toString());
diff --git a/service/src/test/java/io/mifos/provisioner/internal/util/JdbcUrlBuilderTest.java
b/service/src/test/java/io/mifos/provisioner/internal/util/JdbcUrlBuilderTest.java
index 8bb26b4..f7ae5cf 100644
--- a/service/src/test/java/io/mifos/provisioner/internal/util/JdbcUrlBuilderTest.java
+++ b/service/src/test/java/io/mifos/provisioner/internal/util/JdbcUrlBuilderTest.java
@@ -15,7 +15,6 @@
  */
 package io.mifos.provisioner.internal.util;
 
-import io.mifos.provisioner.internal.util.JdbcUrlBuilder;
 import org.junit.Assert;
 import org.junit.Test;
 

-- 
To stop receiving notification emails like this one, please contact
myrle@apache.org.

Mime
View raw message