diff options
author | Pooja03 <pm00501616@techmahindra.com> | 2019-03-27 13:20:46 +0530 |
---|---|---|
committer | Pooja03 <pm00501616@techmahindra.com> | 2019-03-27 13:20:46 +0530 |
commit | 5d104a528594352889c2297781a70eec50bdd960 (patch) | |
tree | a6c448a43b4c5150c20b52530c2917c6e766bf5c /UniversalVesAdapter/src/main/java/org/onap/universalvesadapter | |
parent | 5e76fbd802ca4dcf48dac5c9a8f262470a326ef7 (diff) |
Continue VES 5.4 support as well in VES Mapper
Adding Support for 5.4 ves version along with ves 7.0
Change-Id: I44b15ff5017a968b1df6b57be0a2af1759e740d4
Issue-ID: DCAEGEN2-1326
Signed-off-by: Pooja03 <pm00501616@techmahindra.com>
Diffstat (limited to 'UniversalVesAdapter/src/main/java/org/onap/universalvesadapter')
2 files changed, 3 insertions, 3 deletions
diff --git a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/adapter/UniversalEventAdapter.java b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/adapter/UniversalEventAdapter.java index 484625f..09e85a0 100644 --- a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/adapter/UniversalEventAdapter.java +++ b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/adapter/UniversalEventAdapter.java @@ -124,7 +124,7 @@ public class UniversalEventAdapter implements GenericAdapter { Smooks smooksTemp = new Smooks(new ByteArrayInputStream(configFileData.getBytes(StandardCharsets.UTF_8)));
eventToSmooksMapping.put(collectorIdentifierKey, smooksTemp);
- VesEvent vesEvent = SmooksUtils.getTransformedObjectForInput(smooksTemp,incomingJsonString);
+ Object vesEvent = SmooksUtils.getTransformedObjectForInput(smooksTemp,incomingJsonString);
debugLogger.info("Incoming json transformed to VES format successfully:"+Thread.currentThread().getName());
ObjectMapper objectMapper = new ObjectMapper();
result = objectMapper.writeValueAsString(vesEvent);
diff --git a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/utils/SmooksUtils.java b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/utils/SmooksUtils.java index f0fe0ee..7d461b1 100644 --- a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/utils/SmooksUtils.java +++ b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/utils/SmooksUtils.java @@ -54,7 +54,7 @@ public class SmooksUtils { * @return VES json's pojo representation
* @throws IOException
*/
- public static VesEvent getTransformedObjectForInput(Smooks smooks, String incomingJsonString) {
+ public static Object getTransformedObjectForInput(Smooks smooks, String incomingJsonString) {
debugLogger.info("Transforming incoming json " );
ExecutionContext executionContext = smooks.createExecutionContext();
@@ -67,7 +67,7 @@ public class SmooksUtils { smooks.filterSource(executionContext, new StreamSource(new ByteArrayInputStream(incomingJsonString.getBytes(StandardCharsets.UTF_8))), result);
Locale.setDefault(defaultLocale);
- VesEvent vesEvent = (VesEvent) executionContext.getBeanContext().getBean("vesEvent");
+ Object vesEvent = executionContext.getBeanContext().getBean("vesEvent");
debugLogger.debug("consversion successful to VES Event");
return vesEvent;
|