diff options
author | 2018-06-11 09:54:54 +0100 | |
---|---|---|
committer | 2018-06-11 09:54:54 +0100 | |
commit | 28f9fa1399f5e513a3d5860c52cd51b615bc0a2c (patch) | |
tree | 7057a1bebc9a19ca9b814d428bbb7ae81c8f7981 /src/main/java/org/onap/crud/util | |
parent | 36a7dbfd2672ee6629c4b375df2d6982d942fa43 (diff) |
Process multi-OXM files
Gizmo service uses common OXM consumer to process multi-OXM files
Issue-ID: AAI-1196
Change-Id: If6dd50413a914984948272cd6bd98e2eeeaecedb
Signed-off-by: Sotiropoulos, Ioannis (is948x) <Ioannis.Sotiropoulos@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/crud/util')
-rw-r--r-- | src/main/java/org/onap/crud/util/CrudServiceUtil.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/onap/crud/util/CrudServiceUtil.java b/src/main/java/org/onap/crud/util/CrudServiceUtil.java index 7943218..4d108f2 100644 --- a/src/main/java/org/onap/crud/util/CrudServiceUtil.java +++ b/src/main/java/org/onap/crud/util/CrudServiceUtil.java @@ -21,8 +21,8 @@ package org.onap.crud.util; import org.onap.aai.db.props.AAIProperties; -import org.onap.aaiutils.oxm.OxmModelLoader; import org.onap.crud.exception.CrudException; +import org.onap.schema.OxmModelLoader; import org.onap.schema.RelationshipSchemaLoader; import com.google.gson.Gson; @@ -41,6 +41,8 @@ import javax.ws.rs.core.Response.Status; public class CrudServiceUtil { private static Gson gson = new Gson(); + + @SuppressWarnings({"unchecked", "rawtypes"}) public static Object validateFieldType(String value, Class clazz) throws CrudException { try { if (clazz.isAssignableFrom(Integer.class)) { @@ -88,7 +90,9 @@ public class CrudServiceUtil { * @param isAdd * @return */ - public static JsonElement mergeHeaderInFoToPayload(JsonElement propertiesFromRequest, HttpHeaders headers, boolean isAdd) { + @SuppressWarnings("unchecked") + public static JsonElement mergeHeaderInFoToPayload(JsonElement propertiesFromRequest, HttpHeaders headers, + boolean isAdd) { String sourceOfTruth = headers.getRequestHeaders().getFirst("X-FromAppId"); Set<Map.Entry<String, JsonElement>> properties = new HashSet<Map.Entry<String, JsonElement>>(); properties.addAll(propertiesFromRequest.getAsJsonObject().entrySet()); |