diff options
Diffstat (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml')
2 files changed, 9 insertions, 7 deletions
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XmlEventConverter.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XmlEventConverter.java index f601c4b6f..907d426e7 100644 --- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XmlEventConverter.java +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XmlEventConverter.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2021 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved. * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -128,8 +128,9 @@ public final class Apex2XmlEventConverter implements ApexEventProtocolConverter } // Create the Apex event + // FIXME: Introduce new AxEvent field for APEX to Xml conversion final var apexEvent = new ApexEvent(xmlApexEvent.getName(), xmlApexEvent.getVersion(), - xmlApexEvent.getNameSpace(), xmlApexEvent.getSource(), xmlApexEvent.getTarget()); + xmlApexEvent.getNameSpace(), xmlApexEvent.getSource(), xmlApexEvent.getTarget(), ""); // Set the data on the apex event for (final XMLApexEventData xmlData : xmlApexEvent.getData()) { @@ -184,4 +185,4 @@ public final class Apex2XmlEventConverter implements ApexEventProtocolConverter throw new ApexEventException("Unable to unmarshal Apex event to XML\n" + apexEvent, e); } } -} +}
\ No newline at end of file diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/test/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventHandlerTest.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/test/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventHandlerTest.java index 609b0471b..f8caf8c2f 100644 --- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/test/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventHandlerTest.java +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/test/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventHandlerTest.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2020-2021 Nordix Foundation. + * Modifications Copyright (C) 2022 Bell Canada. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -152,7 +153,7 @@ public class XmlEventHandlerTest { event0000DataMap.put("NullValue", null); final ApexEvent apexEvent0000 = - new ApexEvent("Event0000", "0.0.1", "org.onap.policy.apex.sample.events", "test", "apex"); + new ApexEvent("Event0000", "0.0.1", "org.onap.policy.apex.sample.events", "test", "apex", ""); apexEvent0000.putAll(event0000DataMap); final String apexEvent0000XmlString = xmlEventConverter.fromApexEvent(apexEvent0000); @@ -182,8 +183,8 @@ public class XmlEventHandlerTest { event0004DataMap.put("TestActCaseSelected", Integer.valueOf(2)); event0004DataMap.put("TestActStateTime", Long.valueOf(1434370506095L)); - final ApexEvent apexEvent0004 = - new ApexEvent("Event0004", "0.0.1", "org.onap.policy.apex.domains.sample.events", "test", "apex"); + final ApexEvent apexEvent0004 = new ApexEvent("Event0004", "0.0.1", + "org.onap.policy.apex.domains.sample.events", "test", "apex", ""); apexEvent0004.putAll(event0004DataMap); final String apexEvent0004XmlString = xmlEventConverter.fromApexEvent(apexEvent0004); @@ -201,4 +202,4 @@ public class XmlEventHandlerTest { throw new ApexException("Exception reading Apex event xml file", e); } } -} +}
\ No newline at end of file |