summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-08-02 15:28:00 -0400
committerJim Hahn <jrh3@att.com>2021-08-06 09:22:13 -0400
commit338cc2611738783285f9edebd259f7e6bff3973d (patch)
tree86518ff526b89e6f2d24fb7ed1882fe95dd5c8e1 /plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms
parent7438fe5a86a9fcfaf248ee32197b24d1badaecb3 (diff)
Use lombok in apex-pdp #3
Updated plugins thru plugins-persistence-jpa-eclipselink. Issue-ID: POLICY-3391 Change-Id: Id7a5aeca8bb45c7a089f0b9d49c9ecd4bc8a7178 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms')
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java23
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java43
2 files changed, 10 insertions, 56 deletions
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java
index 924765dc5..7f33fe6a7 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverter.java
@@ -3,6 +3,7 @@
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2019-2021 Nordix Foundation.
* Modifications Copyright (C) 2021 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");
* you may not use this file except in compliance with the License.
@@ -25,6 +26,8 @@ package org.onap.policy.apex.plugins.event.protocol.jms;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
import org.onap.policy.apex.service.engine.event.ApexEvent;
import org.onap.policy.apex.service.engine.event.ApexEventException;
import org.onap.policy.apex.service.engine.event.ApexEventProtocolConverter;
@@ -39,21 +42,14 @@ import org.slf4j.ext.XLoggerFactory;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
+@Getter
+@NoArgsConstructor
public final class Apex2JmsObjectEventConverter implements ApexEventProtocolConverter {
private static final XLogger LOGGER = XLoggerFactory.getXLogger(Apex2JmsObjectEventConverter.class);
// JMS event protocol parameters on the consumer (JMS->Apex) sides
private JmsObjectEventProtocolParameters eventProtocolParameters = null;
- /**
- * Constructor to create the Apex to JMS Object converter.
- *
- * @throws ApexEventException the apex event exception
- */
- public Apex2JmsObjectEventConverter() throws ApexEventException {
- // Nothing specific to initiate for this plugin
- }
-
@Override
public void init(final EventProtocolParameters parameters) {
// Check if properties have been set for JMS object event conversion as a consumer. They may not be set because
@@ -141,13 +137,4 @@ public final class Apex2JmsObjectEventConverter implements ApexEventProtocolConv
// Return the single object from the Apex event message
return apexEvent.values().iterator().next();
}
-
- /**
- * Returns eventProtocolParameters field. Getter used only for testing
- *
- * @return eventProtocolParameters
- */
- JmsObjectEventProtocolParameters getEventProtocolParameters() {
- return eventProtocolParameters;
- }
}
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java
index 08875e182..e85ab229c 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +21,7 @@
package org.onap.policy.apex.plugins.event.protocol.jms;
+import lombok.Getter;
import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolParameters;
/**
@@ -39,10 +41,10 @@ import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolParame
* <li>It puts a single entry into the Apex event map with the the simple class name of the incoming Java object being
* the key of the entry and the actual incoming object as the value of the entry.</li>
* </ol>
- *
+ *
* <p>When sending an object to JMS, the plugin expects to receive an Apex event with a single entry. The plugin
* marshals the value of that entry to an object that can be sent by JMS as a {@code javax.jms.ObjectMessage} instance.
- *
+ *
* <p>The parameters for this plugin are:
* <ol>
* <li>incomingEventSuffix: The suffix to append to the simple name of incoming Java class instances when they are
@@ -57,6 +59,7 @@ import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolParame
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
+@Getter
public class JmsObjectEventProtocolParameters extends EventProtocolParameters {
/** The label of this event protocol. */
public static final String JMS_OBJECT_EVENT_PROTOCOL_LABEL = "JMSOBJECT";
@@ -88,40 +91,4 @@ public class JmsObjectEventProtocolParameters extends EventProtocolParameters {
// Set the event protocol plugin class
this.setEventProtocolPluginClass(Apex2JmsObjectEventConverter.class.getName());
}
-
- /**
- * Gets the incoming event version.
- *
- * @return the incoming event version
- */
- public String getIncomingEventVersion() {
- return incomingEventVersion;
- }
-
- /**
- * Gets the incoming event source.
- *
- * @return the incoming event source
- */
- public String getIncomingEventSource() {
- return incomingEventSource;
- }
-
- /**
- * Gets the incoming event target.
- *
- * @return the incoming event target
- */
- public String getIncomingEventTarget() {
- return incomingEventTarget;
- }
-
- /**
- * Gets the incoming event suffix.
- *
- * @return the incoming event suffix
- */
- public String getIncomingEventSuffix() {
- return incomingEventSuffix;
- }
}