aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/onap/clamp/clds/config/CldsReferenceProperties.java13
-rw-r--r--src/main/resources/application.properties1
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/CldsReferenceProperties.java b/src/main/java/org/onap/clamp/clds/config/CldsReferenceProperties.java
index a8acdee14..c0f7a7286 100644
--- a/src/main/java/org/onap/clamp/clds/config/CldsReferenceProperties.java
+++ b/src/main/java/org/onap/clamp/clds/config/CldsReferenceProperties.java
@@ -50,12 +50,20 @@ public class CldsReferenceProperties {
private String cldsReferenceValuesFile;
@PostConstruct
- public void loadConfig() throws IOException {
+ public void loadConfiguration() throws IOException {
prop = new Properties();
Resource resource = appContext.getResource(cldsReferenceValuesFile);
prop.load(resource.getInputStream());
}
+ public CldsReferenceProperties(String referenceValuesFile) throws IOException {
+ cldsReferenceValuesFile = referenceValuesFile;
+ loadConfiguration();
+ }
+
+ public CldsReferenceProperties() {
+ }
+
/**
* get property value
*
@@ -105,6 +113,7 @@ public class CldsReferenceProperties {
*/
public JsonNode getJsonTemplate(String key1, String key2) throws IOException {
ObjectMapper objectMapper = new ObjectMapper();
- return objectMapper.readValue(getStringValue(key1, key2), JsonNode.class);
+ String result = getStringValue(key1, key2);
+ return (result != null) ? objectMapper.readValue(result, JsonNode.class) : null;
}
}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 38a719d8e..2ac53e0b3 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -110,6 +110,7 @@ org.onap.clamp.config.files.cldsReference=classpath:/clds/clds-reference.propert
org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties
org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
+org.onap.clamp.config.files.sdcController=classpath:/clds/sdc-controllers-config.json
#Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !
CLDS_PERMISSION_TYPE_CL=permission-type-cl