Remove ECOMP in headers
[clamp.git] / src / main / java / org / onap / clamp / clds / config / sdc / SdcControllersConfiguration.java
index 5b54904..0f75d46 100644 (file)
@@ -18,7 +18,7 @@
  * limitations under the License.
  * ============LICENSE_END============================================
  * ===================================================================
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * 
  */
 
 package org.onap.clamp.clds.config.sdc;
@@ -26,7 +26,6 @@ package org.onap.clamp.clds.config.sdc;
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
 
 import java.io.IOException;
 import java.util.HashMap;
@@ -35,18 +34,17 @@ import java.util.Map;
 import javax.annotation.PostConstruct;
 
 import org.onap.clamp.clds.exception.sdc.controller.SdcParametersException;
+import org.onap.clamp.clds.util.JacksonUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.ApplicationContext;
 import org.springframework.core.io.Resource;
-import org.springframework.stereotype.Component;
 
 /**
  * This class maps the SDC config JSON file. This JSON can have multiple
  * sdc-controller config. So the json is loaded in a static way and the instance
  * must specify the controller name that it represents.
  */
-@Component
 public class SdcControllersConfiguration {
 
     private static final EELFLogger logger = EELFManager.getInstance().getLogger(SdcControllersConfiguration.class);
@@ -67,12 +65,11 @@ public class SdcControllersConfiguration {
     public void loadConfiguration() throws IOException {
         Resource resource = appContext.getResource(sdcControllerFile);
         // Try to load json tree
-        jsonRootNode = new ObjectMapper().readValue(resource.getInputStream(), JsonNode.class);
+        jsonRootNode = JacksonUtils.getObjectMapperInstance().readValue(resource.getInputStream(), JsonNode.class);
     }
 
     public SdcSingleControllerConfiguration getSdcSingleControllerConfiguration(String controllerName) {
-        Map<String, SdcSingleControllerConfiguration> controllerMap = getAllDefinedControllers();
-        return controllerMap.get(controllerName);
+        return getAllDefinedControllers().get(controllerName);
     }
 
     /**