diff options
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-jython/src/main')
3 files changed, 22 insertions, 13 deletions
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutor.java index 3636d811a..c3c585664 100644 --- a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutor.java +++ b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutor.java @@ -21,6 +21,8 @@ package org.onap.policy.apex.plugins.executor.jython; import java.util.Map; +import java.util.Properties; + import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.executor.StateFinalizerExecutor; import org.onap.policy.apex.core.engine.executor.exception.StateMachineException; @@ -78,18 +80,19 @@ public class JythonStateFinalizerExecutor extends StateFinalizerExecutor { * * @param executionId the execution ID for the current APEX policy execution * @param incomingFields the incoming fields for finalisation + * @param executionProperties properties for the current APEX policy execution * @return The state output for the state * @throws StateMachineException on an execution error * @throws ContextException on context errors */ @Override - public String execute(final long executionId, final Map<String, Object> incomingFields) - throws StateMachineException, ContextException { + public String execute(final long executionId, final Properties executionProperties, + final Map<String, Object> incomingFields) throws StateMachineException, ContextException { boolean returnValue = false; // Do execution pre work - executePre(executionId, incomingFields); + executePre(executionId, executionProperties, incomingFields); try { diff --git a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java index 1280fb85d..974749032 100644 --- a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java +++ b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java @@ -21,6 +21,8 @@ package org.onap.policy.apex.plugins.executor.jython; import java.util.Map; +import java.util.Properties; + import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.executor.TaskExecutor; import org.onap.policy.apex.core.engine.executor.exception.StateMachineException; @@ -34,8 +36,8 @@ import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; /** - * The Class JythonTaskExecutor is the task executor for task logic written in Jython It is unlikely - * that this is thread safe. + * The Class JythonTaskExecutor is the task executor for task logic written in Jython It is unlikely that this is thread + * safe. * * @author Liam Fallon (liam.fallon@ericsson.com) */ @@ -77,19 +79,20 @@ public class JythonTaskExecutor extends TaskExecutor { * Executes the executor for the task in a sequential manner. * * @param executionId the execution ID for the current APEX policy execution + * @param executionProperties properties for the current APEX policy execution * @param incomingFields the incoming fields * @return The outgoing fields * @throws StateMachineException on an execution error * @throws ContextException on context errors */ @Override - public Map<String, Object> execute(final long executionId, final Map<String, Object> incomingFields) - throws StateMachineException, ContextException { + public Map<String, Object> execute(final long executionId, final Properties executionProperties, + final Map<String, Object> incomingFields) throws StateMachineException, ContextException { boolean returnValue = false; // Do execution pre work - executePre(executionId, incomingFields); + executePre(executionId, executionProperties, incomingFields); try { diff --git a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java index d6e6dd70b..f8ca21b1a 100644 --- a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java +++ b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java @@ -20,6 +20,8 @@ package org.onap.policy.apex.plugins.executor.jython; +import java.util.Properties; + import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.event.EnEvent; import org.onap.policy.apex.core.engine.executor.TaskSelectExecutor; @@ -35,8 +37,8 @@ import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; /** - * The Class JythonTaskSelectExecutor is the task selection executor for task selection logic - * written in Jython It is unlikely that this is thread safe. + * The Class JythonTaskSelectExecutor is the task selection executor for task selection logic written in Jython It is + * unlikely that this is thread safe. * * @author Liam Fallon (liam.fallon@ericsson.com) */ @@ -82,19 +84,20 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor { * Executes the executor for the task in a sequential manner. * * @param executionId the execution ID for the current APEX policy execution + * @param executionProperties properties for the current APEX policy execution * @param incomingEvent the incoming event * @return The outgoing event * @throws StateMachineException on an execution error * @throws ContextException on context errors */ @Override - public AxArtifactKey execute(final long executionId, final EnEvent incomingEvent) - throws StateMachineException, ContextException { + public AxArtifactKey execute(final long executionId, final Properties executionProperties, + final EnEvent incomingEvent) throws StateMachineException, ContextException { boolean returnValue = false; // Do execution pre work - executePre(executionId, incomingEvent); + executePre(executionId, executionProperties, incomingEvent); try { // Check and execute the Jython logic |