Default Cipher to empty string
[music.git] / music-rest / src / main / java / org / onap / music / main / PropertiesLoader.java
index 9c69b9e..11dc51d 100644 (file)
@@ -33,7 +33,8 @@ import org.springframework.context.annotation.PropertySource;
 import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
 import org.springframework.stereotype.Component;
 
-@PropertySource(value = {"file:/opt/app/music/etc/music.properties", "classpath:/project.properties","file:/opt/app/music/etc/key.properties"})
+@PropertySource(value = {"file:/opt/app/music/etc/music.properties", "classpath:/project.properties"})
+//"file:/opt/app/music/etc/key.properties"
 @Component
 public class PropertiesLoader implements InitializingBean {
 
@@ -90,7 +91,7 @@ public class PropertiesLoader implements InitializingBean {
 
     @Value("${create.lock.wait.increment.ms}")
     private int createLockWaitIncrement;
-    
+
     @Value("${transId.header.prefix}")
     private String transIdPrefix;
 
@@ -118,7 +119,7 @@ public class PropertiesLoader implements InitializingBean {
     @Value("${music.aaf.ns}")
     private String musicAafNs;
 
-    @Value("${cipher.enc.key}")
+    @Value("${cipher.enc.key:}")
     private String cipherEncKey;
 
     @SuppressWarnings("unused")
@@ -340,5 +341,33 @@ public class PropertiesLoader implements InitializingBean {
         // TODO Auto-generated method stub
 
     }
+    
+    /* For unit testing purpose only*/
+    protected void setProperties() {
+        cassandraHost = "127.0.0.1";
+        debug = "true";
+        version = "x.x.x";
+        build = "y.y";
+        musicProperties = "property";
+        lockLeasePeriod = "5000";
+        cassandraUser = "user";
+        cassandraPassword = "password";
+        cassandraPort = "8007";
+        cassandraConnectTimeOutMS = "1000";
+        cassandraReadTimeOutMS = "1000";
+        isCadi = "true";
+        isKeyspaceActive = "true";
+        rertryCount = "20";
+        transIdPrefix = "transId-";
+        conversationIdPrefix = "conversation-";
+        clientIdPrefix = "clientId-";
+        messageIdPrefix = "messageId-";    
+        transIdRequired = true;
+        conversationIdRequired = true;
+        clientIdRequired = true;
+        messageIdRequired = true;
+        musicAafNs = "ns";
+        cipherEncKey = "key";
+    }
 
 }