aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java')
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XmlEventConverter.java (renamed from plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/Apex2XMLEventConverter.java)18
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java (renamed from plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XMLEventProtocolParameters.java)8
2 files changed, 14 insertions, 12 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 76bae6833..767c24fdd 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
@@ -56,8 +56,8 @@ import org.xml.sax.SAXException;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public final class Apex2XMLEventConverter implements ApexEventProtocolConverter {
- private static final XLogger LOGGER = XLoggerFactory.getXLogger(Apex2XMLEventConverter.class);
+public final class Apex2XmlEventConverter implements ApexEventProtocolConverter {
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(Apex2XmlEventConverter.class);
private static final String MODEL_SCHEMA_NAME = "xml/apex-event.xsd";
@@ -71,11 +71,11 @@ public final class Apex2XMLEventConverter implements ApexEventProtocolConverter
*
* @throws ApexEventException the apex event exception
*/
- public Apex2XMLEventConverter() throws ApexEventException {
+ public Apex2XmlEventConverter() throws ApexEventException {
try {
- final URL schemaURL = ResourceUtils.getUrlResource(MODEL_SCHEMA_NAME);
+ final URL schemaUrl = ResourceUtils.getUrlResource(MODEL_SCHEMA_NAME);
final Schema apexEventSchema =
- SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(schemaURL);
+ SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(schemaUrl);
final JAXBContext jaxbContext = JAXBContext.newInstance(XMLApexEvent.class);
@@ -101,7 +101,9 @@ public final class Apex2XMLEventConverter implements ApexEventProtocolConverter
* parameters. eventprotocol.EventProtocolParameters)
*/
@Override
- public void init(final EventProtocolParameters parameters) {}
+ public void init(final EventProtocolParameters parameters) {
+ // No initialization necessary on this class
+ }
/*
* (non-Javadoc)
@@ -149,7 +151,7 @@ public final class Apex2XMLEventConverter implements ApexEventProtocolConverter
}
// Return the event in a single element
- final ArrayList<ApexEvent> eventList = new ArrayList<ApexEvent>();
+ final ArrayList<ApexEvent> eventList = new ArrayList<>();
eventList.add(apexEvent);
return eventList;
}
@@ -170,7 +172,7 @@ public final class Apex2XMLEventConverter implements ApexEventProtocolConverter
}
// Get the Apex event data
- final List<XMLApexEventData> xmlDataList = new ArrayList<XMLApexEventData>();
+ final List<XMLApexEventData> xmlDataList = new ArrayList<>();
try {
for (final Entry<String, Object> apexDataEntry : apexEvent.entrySet()) {
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XMLEventProtocolParameters.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java
index 0eeb497a1..9f0ee0795 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XMLEventProtocolParameters.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java
@@ -27,7 +27,7 @@ import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolTextTo
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public class XMLEventProtocolParameters extends EventProtocolTextTokenDelimitedParameters {
+public class XmlEventProtocolParameters extends EventProtocolTextTokenDelimitedParameters {
/** The label of this carrier technology. */
public static final String XML_EVENT_PROTOCOL_LABEL = "XML";
@@ -38,8 +38,8 @@ public class XMLEventProtocolParameters extends EventProtocolTextTokenDelimitedP
* Constructor to create a JSON event protocol parameter instance and register the instance with the parameter
* service.
*/
- public XMLEventProtocolParameters() {
- super(XMLEventProtocolParameters.class.getCanonicalName());
+ public XmlEventProtocolParameters() {
+ super(XmlEventProtocolParameters.class.getCanonicalName());
// Set the event protocol properties for the XML event protocol
this.setLabel(XML_EVENT_PROTOCOL_LABEL);
@@ -48,6 +48,6 @@ public class XMLEventProtocolParameters extends EventProtocolTextTokenDelimitedP
this.setStartDelimiterToken(XML_TEXT_DELIMITER_TOKEN);
// Set the event protocol plugin class
- this.setEventProtocolPluginClass(Apex2XMLEventConverter.class.getCanonicalName());
+ this.setEventProtocolPluginClass(Apex2XmlEventConverter.class.getCanonicalName());
}
}