X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fclamp%2Fclds%2Fconfig%2FClampProperties.java;h=0b5c951bf4167ea7d56c5b5c831779689b5b47ae;hb=897a3e004a858ef68d989dad15dde91a69e151a5;hp=8eae9066d5a1d2068f21a1d4ccf1db527291d3cf;hpb=f0e00e7c9ea8dd15a4aacdd880aa648539caf087;p=clamp.git diff --git a/src/main/java/org/onap/clamp/clds/config/ClampProperties.java b/src/main/java/org/onap/clamp/clds/config/ClampProperties.java index 8eae9066..0b5c951b 100644 --- a/src/main/java/org/onap/clamp/clds/config/ClampProperties.java +++ b/src/main/java/org/onap/clamp/clds/config/ClampProperties.java @@ -23,14 +23,10 @@ package org.onap.clamp.clds.config; -import com.google.gson.JsonElement; - import java.io.IOException; import java.net.URL; import java.nio.charset.StandardCharsets; - import org.apache.commons.io.IOUtils; -import org.onap.clamp.clds.util.JsonUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.core.env.Environment; @@ -74,38 +70,6 @@ public class ClampProperties { return value; } - /** - * Return json as objects that can be updated. The value obtained from the - * clds-reference file will be used as a filename. - * - * @param key The key that will be used to access the clds-reference file - * @return A jsonNode - * @throws IOException In case of issues with the JSON parser - */ - public JsonElement getJsonTemplate(String key) throws IOException { - String fileReference = getStringValue(key); - return (fileReference != null) - ? JsonUtils.GSON.fromJson(getFileContentFromPath(fileReference), JsonElement.class) - : null; - } - - /** - * Return json as objects that can be updated. First try with combo key (key1 + - * "." + key2), otherwise default to just key1. The value obtained from the - * clds-reference file will be used as a filename. - * - * @param key1 The first key - * @param key2 The second key after a dot - * @return A JsonNode - * @throws IOException In case of issues with the JSON parser - */ - public JsonElement getJsonTemplate(String key1, String key2) throws IOException { - String fileReference = getStringValue(key1, key2); - return (fileReference != null) - ? JsonUtils.GSON.fromJson(getFileContentFromPath(fileReference), JsonElement.class) - : null; - } - /** * Return the file content. The value obtained from the clds-reference file will * be used as a filename.