summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-06-26 15:40:41 +0000
committerliamfallon <liam.fallon@est.tech>2019-06-26 15:40:41 +0000
commitce9d82d2c0e863597d84cc8909955e398405f45a (patch)
tree8ebb853119bdf673cf6f9516d428d4cc00080aeb /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test
parent5f029543f1e673655af2d2974113069df0b6def0 (diff)
Add passthrough properties for APEX engine
APEX event receiver and sender plugins sometimes need to exchange information with tasks, especially in the case of REST communication. This change enables passthrough of Properties from the event carrier technology plugins to APEX task, task selection, and state finalizer logics. Apologies for the size of the review but this change involves passinng the properties through all the APEX components, hence the large number of small changes. Issue-ID: POLICY-1742 Change-Id: I219fd69550f06702ef64adbb165fe7baac422e96 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/SupportApexEventReceiver.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/SupportApexEventReceiver.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/SupportApexEventReceiver.java
index aaba4c262..8f6e72b14 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/SupportApexEventReceiver.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/SupportApexEventReceiver.java
@@ -5,21 +5,23 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
package org.onap.policy.apex.plugins.event.carrier.restserver;
+import java.util.Properties;
+
import org.onap.policy.apex.service.engine.event.ApexEventException;
import org.onap.policy.apex.service.engine.event.ApexEventReceiver;
@@ -32,21 +34,26 @@ public class SupportApexEventReceiver implements ApexEventReceiver {
private Object lastEvent;
private int eventCount;
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.onap.policy.apex.service.engine.event.ApexEventReceiver#receiveEvent(long, java.lang.Object)
*/
@Override
- public void receiveEvent(long executionId, Object event) throws ApexEventException {
+ public void receiveEvent(final long executionId, final Properties executionProperties, final Object event)
+ throws ApexEventException {
this.lastExecutionId = executionId;
this.lastEvent = event;
this.eventCount++;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.onap.policy.apex.service.engine.event.ApexEventReceiver#receiveEvent(java.lang.Object)
*/
@Override
- public void receiveEvent(Object event) throws ApexEventException {
+ public void receiveEvent(final Properties executionProperties, final Object event) throws ApexEventException {
this.lastEvent = event;
this.eventCount++;
}
@@ -61,7 +68,7 @@ public class SupportApexEventReceiver implements ApexEventReceiver {
/**
* Get the number of events received.
- *
+ *
* @return the number of events received
*/
public int getEventCount() {