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
*
*/
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;
}
}
org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties\r
org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json\r
org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties\r
+org.onap.clamp.config.files.sdcController=classpath:/clds/sdc-controllers-config.json\r
\r
#Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !\r
CLDS_PERMISSION_TYPE_CL=permission-type-cl\r