* limitations under the License.
* ============LICENSE_END============================================
* ===================================================================
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
*/
package org.onap.clamp.clds.client.req.sdc;
import org.apache.commons.codec.DecoderException;
import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.model.properties.Global;
import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.model.properties.Tca;
import org.onap.clamp.clds.model.sdc.SdcResource;
import org.onap.clamp.clds.model.sdc.SdcServiceDetail;
+import org.onap.clamp.clds.util.JacksonUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Autowired
private SdcCatalogServices sdcCatalogServices;
@Autowired
- protected CldsReferenceProperties refProp;
+ protected ClampProperties refProp;
/**
* Format the Blueprint from a Yaml
* @return SDC Locations request in the JSON Format
*/
public String formatSdcLocationsReq(ModelProperties prop, String artifactName) {
- ObjectMapper objectMapper = new ObjectMapper();
+ ObjectMapper objectMapper = JacksonUtils.getObjectMapperInstance();
Global global = prop.getGlobal();
List<String> locationsList = global.getLocation();
ArrayNode locationsArrayNode = objectMapper.createArrayNode();
* In case of issues with the Json parser
*/
protected String getYamlvalue(String jsonGlobal) throws IOException {
- ObjectMapper objectMapper = new ObjectMapper();
String yamlFileValue = "";
- ObjectNode root = objectMapper.readValue(jsonGlobal, ObjectNode.class);
+ ObjectNode root = JacksonUtils.getObjectMapperInstance().readValue(jsonGlobal, ObjectNode.class);
Iterator<Entry<String, JsonNode>> entryItr = root.fields();
while (entryItr.hasNext()) {
Entry<String, JsonNode> entry = entryItr.next();