aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-08-15 16:20:36 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-15 16:20:36 +0000
commit996897bfb61fb180c8bd9a21eb7000ae6ba8c449 (patch)
tree95eae5c82affb359115ae32956c3abb60f26f2b0
parent96cff0d37a7c8ce6691421bf632632d7c1809e6a (diff)
parent96ebc03263c221b16dd713b30cd4d8667d7a6219 (diff)
Merge "Fix checkstyle warnings in core-engine module"
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/EngineParameters.java27
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/ExecutorParameters.java22
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/ApexEngine.java36
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineFactory.java4
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java3
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/StateMachineHandler.java19
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/package-info.java3
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java25
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnException.java6
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/package-info.java4
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/Executor.java22
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/ExecutorFactory.java3
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateExecutor.java31
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java30
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutor.java25
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java38
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java26
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacade.java4
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacade.java8
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java37
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java28
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java28
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/package-info.java13
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineException.java6
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineRuntimeException.java6
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java3
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/monitoring/package-info.java4
27 files changed, 265 insertions, 196 deletions
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/EngineParameters.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/EngineParameters.java
index ff616979d..62fe6a552 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/EngineParameters.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/EngineParameters.java
@@ -28,18 +28,18 @@ import org.onap.policy.apex.model.basicmodel.service.AbstractParameters;
import org.onap.policy.apex.model.basicmodel.service.ParameterService;
/**
- * This class holds the parameters for a single Apex engine. This parameter class holds parameters for context schemas
- * and context albums for the engine and a map of the logic flavour executors defined for the engine and the parameters
- * for each of those executors.
- * <p>
- * The context parameters for the engine are held in a {@link ContextParameters} instance. This instance holds the
- * parameters for context schema handling that will be used by the engine as well as the context album distribution,
- * locking, and persistence parameters.
- * <p>
- * In Apex, an engine can be configured to use many logic flavours. The executors for each logic flavour are identified
- * by their name. Each logic flavour executor must have an instance of {@link ExecutorParameters} defined for it, which
- * specifies the executor plugins to use for that logic flavour executor and specific parameters for those executor
- * plugins.
+ * This class holds the parameters for a single Apex engine. This parameter class holds parameters
+ * for context schemas and context albums for the engine and a map of the logic flavour executors
+ * defined for the engine and the parameters for each of those executors.
+ *
+ * <p>The context parameters for the engine are held in a {@link ContextParameters} instance. This
+ * instance holds the parameters for context schema handling that will be used by the engine as well
+ * as the context album distribution, locking, and persistence parameters.
+ *
+ * <p>In Apex, an engine can be configured to use many logic flavours. The executors for each logic
+ * flavour are identified by their name. Each logic flavour executor must have an instance of
+ * {@link ExecutorParameters} defined for it, which specifies the executor plugins to use for that
+ * logic flavour executor and specific parameters for those executor plugins.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
@@ -50,7 +50,8 @@ public class EngineParameters extends AbstractParameters {
private Map<String, ExecutorParameters> executorParameterMap = new TreeMap<String, ExecutorParameters>();
/**
- * Constructor to create an engine parameters instance and register the instance with the parameter service.
+ * Constructor to create an engine parameters instance and register the instance with the
+ * parameter service.
*/
public EngineParameters() {
super(EngineParameters.class.getCanonicalName());
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/ExecutorParameters.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/ExecutorParameters.java
index d3a8ed5ac..53cac399e 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/ExecutorParameters.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/ExecutorParameters.java
@@ -24,10 +24,11 @@ import org.onap.policy.apex.model.basicmodel.service.AbstractParameters;
import org.onap.policy.apex.model.basicmodel.service.ParameterService;
/**
- * This class provides the executors for a logic flavour. Plugin classes for execution of task logic, task selection
- * logic, and state finalizer logic for the logic flavour must be specified.
- * <p>
- * Specializations of this class may provide extra parameters for their specific logic flavour executors.
+ * This class provides the executors for a logic flavour. Plugin classes for execution of task
+ * logic, task selection logic, and state finalizer logic for the logic flavour must be specified.
+ *
+ * <p>Specializations of this class may provide extra parameters for their specific logic flavour
+ * executors.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
@@ -38,7 +39,8 @@ public class ExecutorParameters extends AbstractParameters {
private String stateFinalizerExecutorPluginClass;
/**
- * Constructor to create an executor parameters instance and register the instance with the parameter service.
+ * Constructor to create an executor parameters instance and register the instance with the
+ * parameter service.
*/
public ExecutorParameters() {
super(ExecutorParameters.class.getCanonicalName());
@@ -46,8 +48,8 @@ public class ExecutorParameters extends AbstractParameters {
}
/**
- * Constructor to create an executor parameters instance with the name of a sub class of this class and register the
- * instance with the parameter service.
+ * Constructor to create an executor parameters instance with the name of a sub class of this
+ * class and register the instance with the parameter service.
*
* @param parameterClassName the class name of a sub class of this class
*/
@@ -85,7 +87,8 @@ public class ExecutorParameters extends AbstractParameters {
/**
* Sets the task selection executor plugin class for the executor.
*
- * @param taskSelectionExecutorPluginClass the task selection executor plugin class for the executor
+ * @param taskSelectionExecutorPluginClass the task selection executor plugin class for the
+ * executor
*/
public void setTaskSelectionExecutorPluginClass(final String taskSelectionExecutorPluginClass) {
this.taskSelectionExecutorPluginClass = taskSelectionExecutorPluginClass;
@@ -103,7 +106,8 @@ public class ExecutorParameters extends AbstractParameters {
/**
* Sets the state finalizer executor plugin class for the executor.
*
- * @param stateFinalizerExecutorPluginClass the state finalizer executor plugin class for the executor
+ * @param stateFinalizerExecutorPluginClass the state finalizer executor plugin class for the
+ * executor
*/
public void setStateFinalizerExecutorPluginClass(final String stateFinalizerExecutorPluginClass) {
this.stateFinalizerExecutorPluginClass = stateFinalizerExecutorPluginClass;
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/ApexEngine.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/ApexEngine.java
index 9e27e5e86..b25192cd0 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/ApexEngine.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/ApexEngine.java
@@ -30,20 +30,21 @@ import org.onap.policy.apex.model.enginemodel.concepts.AxEngineState;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
/**
- * The Interface ApexEngine is used to control the execution of a single Apex engine thread. This engine instance
- * executes the policies in an {@link AxPolicyModel}, which defines the policies that are executed by the engine and the
- * context in which they execute. Many instances of an Apex engine may run on the same Apex model, in which case they
- * operate the same policy set in parallel over the same context. When the {@code handleEvent} method is passed to the
- * Apex engine, the engine executes the policy triggered by that event. A single Apex engine instance does not executed
- * multiple policies in parallel, it receives a trigger event and executes the policy for that event to completion
- * before it is available to execute another policy.
+ * The Interface ApexEngine is used to control the execution of a single Apex engine thread. This
+ * engine instance executes the policies in an {@link AxPolicyModel}, which defines the policies
+ * that are executed by the engine and the context in which they execute. Many instances of an Apex
+ * engine may run on the same Apex model, in which case they operate the same policy set in parallel
+ * over the same context. When the {@code handleEvent} method is passed to the Apex engine, the
+ * engine executes the policy triggered by that event. A single Apex engine instance does not
+ * executed multiple policies in parallel, it receives a trigger event and executes the policy for
+ * that event to completion before it is available to execute another policy.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public interface ApexEngine {
/**
- * The amount of milliseconds to wait for the current Apex engine to timeout on engine stop requests. If the timeout
- * is exceeded, the stop aborts.
+ * The amount of milliseconds to wait for the current Apex engine to timeout on engine stop
+ * requests. If the timeout is exceeded, the stop aborts.
*/
int APEX_ENGINE_STOP_EXECUTION_WAIT_TIMEOUT = 3000;
@@ -51,10 +52,10 @@ public interface ApexEngine {
int APEX_ENGINE_STOP_EXECUTION_WAIT_INCREMENT = 100;
/**
- * Update the Apex model to be used by the Apex engine. The engine must be in state "STOPPED" when the model is
- * updated. The engine will replace the current model with the incoming model if the model of the engine was
- * previously updated and the value of common context is transferred if there is common context in the old and new
- * models.
+ * Update the Apex model to be used by the Apex engine. The engine must be in state "STOPPED"
+ * when the model is updated. The engine will replace the current model with the incoming model
+ * if the model of the engine was previously updated and the value of common context is
+ * transferred if there is common context in the old and new models.
*
* @param apexModel the apex model
* @throws ApexException on model update errors
@@ -83,7 +84,8 @@ public interface ApexEngine {
void clear() throws ApexException;
/**
- * This method constructs an event with the correct event context so that it can later be sent to the Apex engine.
+ * This method constructs an event with the correct event context so that it can later be sent
+ * to the Apex engine.
*
* @param eventKey The key of the event in the Apex model
* @return the created event
@@ -91,11 +93,11 @@ public interface ApexEngine {
EnEvent createEvent(AxArtifactKey eventKey);
/**
- * This method passes an event to the Apex model to invoke a policy. If the event matches a policy, then that policy
- * is executed.
+ * This method passes an event to the Apex model to invoke a policy. If the event matches a
+ * policy, then that policy is executed.
*
- * @return return true if a policy was invoked without error, otherwise false.
* @param incomingEvent the incoming event
+ * @return return true if a policy was invoked without error, otherwise false.
*/
boolean handleEvent(EnEvent incomingEvent);
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineFactory.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineFactory.java
index 4920486de..754181485 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineFactory.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineFactory.java
@@ -24,8 +24,8 @@ import org.onap.policy.apex.core.engine.engine.ApexEngine;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
/**
- * A factory class to create APEX engines of a given type. As there is only a single type of Apex engine in existence,
- * this class is trivial.
+ * A factory class to create APEX engines of a given type. As there is only a single type of Apex
+ * engine in existence, this class is trivial.
*
* @author Liam Fallon
*/
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java
index 12ba76afb..235140863 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java
@@ -428,7 +428,8 @@ public class ApexEngineImpl implements ApexEngine {
* @return the exception event
*/
private EnEvent createExceptionEvent(final EnEvent incomingEvent, final Exception eventException) {
- // The exception event is a clone of the incoming event with the exception suffix added to its name and an extra
+ // The exception event is a clone of the incoming event with the exception suffix added to
+ // its name and an extra
// field "ExceptionMessage" added
final EnEvent exceptionEvent = (EnEvent) incomingEvent.clone();
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/StateMachineHandler.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/StateMachineHandler.java
index 856136bab..f17d7f825 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/StateMachineHandler.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/StateMachineHandler.java
@@ -38,12 +38,13 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * This handler holds and manages state machines for each policy in an Apex engine. When the class is instantiated, an
- * executor {@link StateMachineExecutor} is created for each policy in the policy model the state machine handler will
- * execute. The executors for each policy are held in a map indexed by event.
- * <p>
- * When an event is received on the policy, the state machine executor to execute that event is looked up on the
- * executor map and the event is passed to the executor for execution.
+ * This handler holds and manages state machines for each policy in an Apex engine. When the class
+ * is instantiated, an executor {@link StateMachineExecutor} is created for each policy in the
+ * policy model the state machine handler will execute. The executors for each policy are held in a
+ * map indexed by event.
+ *
+ * <p>When an event is received on the policy, the state machine executor to execute that event is
+ * looked up on the executor map and the event is passed to the executor for execution.
*
* @author Liam Fallon
*
@@ -58,7 +59,8 @@ public class StateMachineHandler {
// The state machines in this engine
private final HashMap<AxEvent, StateMachineExecutor> stateMachineExecutorMap = new HashMap<>();
- // The executor factory is used to get logic executors for the particular type of executor we need for task
+ // The executor factory is used to get logic executors for the particular type of executor we
+ // need for task
// selection logic or task logic
private final ExecutorFactory executorFactory;
@@ -109,7 +111,8 @@ public class StateMachineHandler {
}
/**
- * This constructor starts the state machines for each policy, carrying out whatever initialization executors need.
+ * This constructor starts the state machines for each policy, carrying out whatever
+ * initialization executors need.
*
* @throws StateMachineException On state machine initiation errors
*/
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/package-info.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/package-info.java
index ce86e2745..d8e1329e7 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/package-info.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/package-info.java
@@ -19,7 +19,8 @@
*/
/**
- * Provides the implementation of the {@link org.onap.policy.apex.core.engine.engine.ApexEngine} interface.
+ * Provides the implementation of the {@link org.onap.policy.apex.core.engine.engine.ApexEngine}
+ * interface.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java
index b072a89d0..6fbf647b4 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java
@@ -40,8 +40,8 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * Instances of the Class EnEvent are events being passed through the Apex system. All events in the system are
- * instances of this class.
+ * Instances of the Class EnEvent are events being passed through the Apex system. All events in the
+ * system are instances of this class.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
@@ -62,7 +62,8 @@ public class EnEvent extends HashMap<String, Object> {
private static Random rand = new Random(System.nanoTime());
- // An identifier for the current event execution. The default value here will always be a random number, and should
+ // An identifier for the current event execution. The default value here will always be a random
+ // number, and should
// be reset
private long executionID = rand.nextLong();
@@ -126,10 +127,11 @@ public class EnEvent extends HashMap<String, Object> {
}
/**
- * Get the currently set value for the ExecutionID for this event. A ExecutionID in an EnEvent is used identify all
- * EnEvents (input, internal and output events) used in a single Engine invocation. Therefore, a ExecutionID can be
- * used to match which output event is the result of a particular input event. The default initialized value for the
- * ExecutionID is always unique in a single JVM.
+ * Get the currently set value for the ExecutionID for this event. A ExecutionID in an EnEvent
+ * is used identify all EnEvents (input, internal and output events) used in a single Engine
+ * invocation. Therefore, a ExecutionID can be used to match which output event is the result of
+ * a particular input event. The default initialized value for the ExecutionID is always unique
+ * in a single JVM.
*
* @return the currently set value for the ExecutionID for this event.
*/
@@ -138,10 +140,11 @@ public class EnEvent extends HashMap<String, Object> {
}
/**
- * Set the value for the ExecutionID for this event. A ExecutionID in an EnEvent is used identify all EnEvents
- * (input, internal and output events) used in a single Engine invocation. Therefore, a ExecutionID can be used to
- * match which output event is the result of a particular input event. The default initialised value for the
- * ExecutionID is always unique in a single JVM.
+ * Set the value for the ExecutionID for this event. A ExecutionID in an EnEvent is used
+ * identify all EnEvents (input, internal and output events) used in a single Engine invocation.
+ * Therefore, a ExecutionID can be used to match which output event is the result of a
+ * particular input event. The default initialised value for the ExecutionID is always unique in
+ * a single JVM.
*
* @param executionID the new value for the ExecutionID for this event.
*/
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnException.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnException.java
index 79a65cba4..d9520336b 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnException.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnException.java
@@ -43,9 +43,9 @@ public class EnException extends ApexRuntimeException {
* Instantiates a new engine event exception.
*
* @param message the message
- * @param e the e
+ * @param ex the exception
*/
- public EnException(final String message, final Exception e) {
- super(message, e);
+ public EnException(final String message, final Exception ex) {
+ super(message, ex);
}
}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/package-info.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/package-info.java
index e94362a75..23d51a41a 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/package-info.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/package-info.java
@@ -19,8 +19,8 @@
*/
/**
- * Provides the event handling classes that an APEX engine uses and which uses use to send and receive events to and
- * from an APEX engine.
+ * Provides the event handling classes that an APEX engine uses and which uses use to send and
+ * receive events to and from an APEX engine.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/Executor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/Executor.java
index d659002b2..4c969f76e 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/Executor.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/Executor.java
@@ -26,11 +26,13 @@ import org.onap.policy.apex.core.engine.executor.exception.StateMachineException
import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
/**
- * This interface defines what operations must be provided by an executing entity in Apex. It is implemented by classes
- * that execute logic in a state machine. Each executor has an incoming entity {@code IN} that triggers execution, an
- * outgoing entity {@code OUT} that is produced by execution, a subject {@code SUBJECT} that is being executed, and a
- * context {@code CONTEXT} in which execution is being carried out. An executor can be part of a chain of executors and
- * the {@code setNext} method is used to set the next executor to be executed after this executor has completed.
+ * This interface defines what operations must be provided by an executing entity in Apex. It is
+ * implemented by classes that execute logic in a state machine. Each executor has an incoming
+ * entity {@code IN} that triggers execution, an outgoing entity {@code OUT} that is produced by
+ * execution, a subject {@code SUBJECT} that is being executed, and a context {@code CONTEXT} in
+ * which execution is being carried out. An executor can be part of a chain of executors and the
+ * {@code setNext} method is used to set the next executor to be executed after this executor has
+ * completed.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
* @author Liam Fallon (liam.fallon@ericsson.com)
@@ -45,7 +47,8 @@ public interface Executor<IN, OUT, SUBJECT, CONTEXT> {
/**
* Save the subject and context of the executor.
*
- * @param parent the parent executor of this executor or null if this executor is the top executor
+ * @param parent the parent executor of this executor or null if this executor is the top
+ * executor
* @param executorSubject the executor subject, the subject of execution
* @param executorContext the executor context, the context in which execution takes place
*/
@@ -80,10 +83,11 @@ public interface Executor<IN, OUT, SUBJECT, CONTEXT> {
void executePre(long executionID, IN incomingEntity) throws StateMachineException, ContextException;
/**
- * Carry out the post work for execution, the returning entity should be set by the child execution object.
+ * Carry out the post work for execution, the returning entity should be set by the child
+ * execution object.
*
- * @param returnValue the return value indicates whether the execution was successful and, if it failed, how it
- * failed
+ * @param returnValue the return value indicates whether the execution was successful and, if it
+ * failed, how it failed
* @throws StateMachineException on an execution error
* @throws ContextException On context errors
*/
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/ExecutorFactory.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/ExecutorFactory.java
index 1bb0b0578..f092ce716 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/ExecutorFactory.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/ExecutorFactory.java
@@ -26,7 +26,8 @@ import org.onap.policy.apex.model.policymodel.concepts.AxStateFinalizerLogic;
import org.onap.policy.apex.model.policymodel.concepts.AxTask;
/**
- * This class is used by the state machine to get implementations of task selection and task executors.
+ * This class is used by the state machine to get implementations of task selection and task
+ * executors.
*
* @author Liam Fallon
*/
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateExecutor.java
index ab5b66969..cad83d6bc 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateExecutor.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateExecutor.java
@@ -84,7 +84,8 @@ public class StateExecutor implements Executor<EnEvent, StateOutput, AxState, Ap
/**
* Constructor, save the executor factory.
*
- * @param executorFactory the executor factory to use for getting executors for task selection logic
+ * @param executorFactory the executor factory to use for getting executors for task selection
+ * logic
*/
public StateExecutor(final ExecutorFactory executorFactory) {
this.executorFactory = executorFactory;
@@ -93,9 +94,8 @@ public class StateExecutor implements Executor<EnEvent, StateOutput, AxState, Ap
/*
* (non-Javadoc)
*
- * @see
- * org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.engine.executor.Executor,
- * java.lang.Object, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.
+ * engine.executor.Executor, java.lang.Object, java.lang.Object)
*/
@Override
public void setContext(final Executor<?, ?, ?, ?> incomingParent, final AxState incomingAxState,
@@ -167,7 +167,8 @@ public class StateExecutor implements Executor<EnEvent, StateOutput, AxState, Ap
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#execute(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#execute(java.lang.long,
+ * java.lang.Object)
*/
@Override
public StateOutput execute(final long executionID, final EnEvent incomingEvent)
@@ -190,7 +191,8 @@ public class StateExecutor implements Executor<EnEvent, StateOutput, AxState, Ap
taskKey = taskSelectExecutor.execute(executionID, incomingEvent);
}
- // If there's no task selection logic or the TSL returned no task, just use the default task
+ // If there's no task selection logic or the TSL returned no task, just use the default
+ // task
if (taskKey == null) {
taskKey = axState.getDefaultTask();
}
@@ -205,7 +207,8 @@ public class StateExecutor implements Executor<EnEvent, StateOutput, AxState, Ap
// Check if this task has direct output
String stateOutputName = directStateOutputMap.get(taskKey);
- // If a direct state output name was not found, state finalizer logic should be defined for the task
+ // If a direct state output name was not found, state finalizer logic should be defined
+ // for the task
if (stateOutputName == null) {
// State finalizer logic should exist for the task
final StateFinalizerExecutor finalizerLogicExecutor = task2StateFinalizerMap.get(taskKey);
@@ -214,7 +217,8 @@ public class StateExecutor implements Executor<EnEvent, StateOutput, AxState, Ap
+ "\" not found for state \"" + axState.getID() + "\"");
}
- // Execute the state finalizer logic to select a state output and to adjust the taskExecutionResultMap
+ // Execute the state finalizer logic to select a state output and to adjust the
+ // taskExecutionResultMap
stateOutputName =
finalizerLogicExecutor.execute(incomingEvent.getExecutionID(), taskExecutionResultMap);
}
@@ -254,7 +258,8 @@ public class StateExecutor implements Executor<EnEvent, StateOutput, AxState, Ap
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long,
+ * java.lang.Object)
*/
@Override
public final void executePre(final long executionID, final EnEvent incomingEntity) throws StateMachineException {
@@ -353,7 +358,8 @@ public class StateExecutor implements Executor<EnEvent, StateOutput, AxState, Ap
* (non-Javadoc)
*
* @see
- * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.executor.Executor)
+ * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.
+ * executor.Executor)
*/
@Override
public final void setNext(final Executor<EnEvent, StateOutput, AxState, ApexInternalContext> incomingNextExecutor) {
@@ -373,8 +379,9 @@ public class StateExecutor implements Executor<EnEvent, StateOutput, AxState, Ap
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.engine.
- * ExecutorParameters)
+ * @see
+ * org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.
+ * engine. ExecutorParameters)
*/
@Override
public void setParameters(final ExecutorParameters parameters) {}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java
index 17691011f..0d37b0bb7 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java
@@ -36,8 +36,8 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * This abstract class executes state finalizer logic in a state of an Apex policy and is specialized by classes that
- * implement execution of state finalizer logic.
+ * This abstract class executes state finalizer logic in a state of an Apex policy and is
+ * specialized by classes that implement execution of state finalizer logic.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
* @author Liam Fallon (liam.fallon@ericsson.com)
@@ -59,7 +59,8 @@ public abstract class StateFinalizerExecutor
// The next state finalizer executor
private Executor<Map<String, Object>, String, AxStateFinalizerLogic, ApexInternalContext> nextExecutor = null;
- // The execution context; contains the facades for events and context to be used by tasks executed by this task
+ // The execution context; contains the facades for events and context to be used by tasks
+ // executed by this task
// executor
private StateFinalizerExecutionContext executionContext = null;
@@ -75,9 +76,8 @@ public abstract class StateFinalizerExecutor
/*
* (non-Javadoc)
*
- * @see
- * org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.engine.executor.Executor,
- * java.lang.Object, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.
+ * engine.executor.Executor, java.lang.Object, java.lang.Object)
*/
@Override
public void setContext(final Executor<?, ?, ?, ?> incomingParent,
@@ -103,7 +103,8 @@ public abstract class StateFinalizerExecutor
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#execute(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#execute(java.lang.long,
+ * java.lang.Object)
*/
@Override
public String execute(final long executionID, final Map<String, Object> newIncomingFields)
@@ -115,7 +116,8 @@ public abstract class StateFinalizerExecutor
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long,
+ * java.lang.Object)
*/
@Override
public final void executePre(final long executionID, final Map<String, Object> newIncomingFields)
@@ -243,11 +245,12 @@ public abstract class StateFinalizerExecutor
* (non-Javadoc)
*
* @see
- * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.executor.Executor)
+ * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.
+ * executor.Executor)
*/
@Override
- public void setNext(
- final Executor<Map<String, Object>, String, AxStateFinalizerLogic, ApexInternalContext> incomingNextExecutor) {
+ public void setNext(final Executor<Map<String, Object>, String, AxStateFinalizerLogic, ApexInternalContext>
+ incomingNextExecutor) {
this.nextExecutor = incomingNextExecutor;
}
@@ -264,8 +267,9 @@ public abstract class StateFinalizerExecutor
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.engine.
- * ExecutorParameters)
+ * @see
+ * org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.
+ * engine. ExecutorParameters)
*/
@Override
public void setParameters(final ExecutorParameters parameters) {}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutor.java
index 05e1b3b4b..7a9594bf8 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutor.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutor.java
@@ -59,7 +59,8 @@ public class StateMachineExecutor implements Executor<EnEvent, EnEvent, AxPolicy
private ExecutorFactory executorFactory = null;
/**
- * Constructor, save the executor factory that will give us executors for task selection logic and task logic.
+ * Constructor, save the executor factory that will give us executors for task selection logic
+ * and task logic.
*
* @param executorFactory the executor factory
* @param owner the artifact key of the owner of this state machine
@@ -71,9 +72,8 @@ public class StateMachineExecutor implements Executor<EnEvent, EnEvent, AxPolicy
/*
* (non-Javadoc)
*
- * @see
- * org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.engine.executor.Executor,
- * java.lang.Object, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.
+ * engine.executor.Executor, java.lang.Object, java.lang.Object)
*/
@Override
public void setContext(final Executor<?, ?, ?, ?> newParent, final AxPolicy newAxPolicy,
@@ -124,7 +124,8 @@ public class StateMachineExecutor implements Executor<EnEvent, EnEvent, AxPolicy
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#executeDirected(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#executeDirected(java.lang.long,
+ * java.lang.Object)
*/
@Override
public EnEvent execute(final long executionID, final EnEvent incomingEvent)
@@ -139,7 +140,8 @@ public class StateMachineExecutor implements Executor<EnEvent, EnEvent, AxPolicy
throw new StateMachineException("first state not defined on state machine");
}
- // Get the first state of the state machine and define a state output that starts state execution
+ // Get the first state of the state machine and define a state output that starts state
+ // execution
StateExecutor stateExecutor = firstExecutor;
StateOutput stateOutput = new StateOutput(new AxStateOutput(firstExecutor.getSubject().getKey(),
incomingEvent.getKey(), firstExecutor.getSubject().getKey()), incomingEvent);
@@ -169,7 +171,8 @@ public class StateMachineExecutor implements Executor<EnEvent, EnEvent, AxPolicy
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long,
+ * java.lang.Object)
*/
@Override
public final void executePre(final long executionID, final EnEvent incomingEntity) throws StateMachineException {
@@ -262,7 +265,8 @@ public class StateMachineExecutor implements Executor<EnEvent, EnEvent, AxPolicy
* (non-Javadoc)
*
* @see
- * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.executor.Executor)
+ * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.
+ * executor.Executor)
*/
@Override
public final void setNext(final Executor<EnEvent, EnEvent, AxPolicy, ApexInternalContext> newNextExecutor) {
@@ -282,8 +286,9 @@ public class StateMachineExecutor implements Executor<EnEvent, EnEvent, AxPolicy
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.engine.
- * ExecutorParameters)
+ * @see
+ * org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.
+ * engine. ExecutorParameters)
*/
@Override
public void setParameters(final ExecutorParameters parameters) {}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java
index 4a105b03f..9f6f92d4e 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java
@@ -41,8 +41,8 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * This abstract class executes a task in a state of an Apex policy and is specialized by classes that implement
- * execution of task logic.
+ * This abstract class executes a task in a state of an Apex policy and is specialized by classes
+ * that implement execution of task logic.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
* @author Liam Fallon (liam.fallon@ericsson.com)
@@ -64,7 +64,8 @@ public abstract class TaskExecutor
// The next task executor
private Executor<Map<String, Object>, Map<String, Object>, AxTask, ApexInternalContext> nextExecutor = null;
- // The task execution context; contains the facades for events and context to be used by tasks executed by this task
+ // The task execution context; contains the facades for events and context to be used by tasks
+ // executed by this task
// executor
private TaskExecutionContext executionContext = null;
@@ -80,9 +81,8 @@ public abstract class TaskExecutor
/*
* (non-Javadoc)
*
- * @see
- * org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.engine.executor.Executor,
- * java.lang.Object, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.
+ * engine.executor.Executor, java.lang.Object, java.lang.Object)
*/
@Override
public void setContext(final Executor<?, ?, ?, ?> newParent, final AxTask newAxTask,
@@ -107,7 +107,8 @@ public abstract class TaskExecutor
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#execute(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#execute(java.lang.long,
+ * java.lang.Object)
*/
@Override
public Map<String, Object> execute(final long executionID, final Map<String, Object> newIncomingFields)
@@ -119,7 +120,8 @@ public abstract class TaskExecutor
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long,
+ * java.lang.Object)
*/
@Override
public final void executePre(final long executionID, final Map<String, Object> newIncomingFields)
@@ -175,14 +177,16 @@ public abstract class TaskExecutor
throw new StateMachineException(errorMessage);
}
- // Copy any unset fields from the input to the output if their data type and names are identical
+ // Copy any unset fields from the input to the output if their data type and names are
+ // identical
for (final String field : axTask.getOutputFields().keySet()) {
// Check if the field exists and is not set on the output
if (!getOutgoing().containsKey(field) || getOutgoing().get(field) != null) {
continue;
}
- // This field is not in the output, check if it's on the input and is the same type (Note here, the output
+ // This field is not in the output, check if it's on the input and is the same type
+ // (Note here, the output
// field definition has to exist so it's not
// null checked)
final AxInputField inputFieldDef = axTask.getInputFields().get(field);
@@ -195,7 +199,8 @@ public abstract class TaskExecutor
getOutgoing().put(field, getIncoming().get(field));
}
- // Finally, check that the outgoing fields have all the output fields defined for this state and, if not, output
+ // Finally, check that the outgoing fields have all the output fields defined for this state
+ // and, if not, output
// a list of missing fields
final Set<String> missingTaskOutputFields = new TreeSet<>(axTask.getOutputFields().keySet());
missingTaskOutputFields.removeAll(outgoingFields.keySet());
@@ -213,7 +218,8 @@ public abstract class TaskExecutor
+ "\" are missing for task \"" + axTask.getKey().getID() + "\"");
}
- // Finally, check that the outgoing field map don't have any extra fields, if present, raise exception with the
+ // Finally, check that the outgoing field map don't have any extra fields, if present, raise
+ // exception with the
// list of extra fields
final Set<String> extraTaskOutputFields = new TreeSet<>(outgoingFields.keySet());
extraTaskOutputFields.removeAll(axTask.getOutputFields().keySet());
@@ -299,7 +305,8 @@ public abstract class TaskExecutor
* (non-Javadoc)
*
* @see
- * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.executor.Executor)
+ * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.
+ * executor.Executor)
*/
@Override
public void setNext(
@@ -320,8 +327,9 @@ public abstract class TaskExecutor
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.engine.
- * ExecutorParameters)
+ * @see
+ * org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.
+ * engine. ExecutorParameters)
*/
@Override
public void setParameters(final ExecutorParameters parameters) {}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java
index 1aaa5ccf5..f3ac1f6b0 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java
@@ -35,8 +35,8 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * This abstract class executes a the task selection logic of a state of an Apex policy and is specialized by classes
- * that implement execution of task selection logic.
+ * This abstract class executes a the task selection logic of a state of an Apex policy and is
+ * specialized by classes that implement execution of task selection logic.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
* @author Liam Fallon (liam.fallon@ericsson.com)
@@ -57,7 +57,8 @@ public abstract class TaskSelectExecutor implements Executor<EnEvent, AxArtifact
// The next task selection executor
private Executor<EnEvent, AxArtifactKey, AxState, ApexInternalContext> nextExecutor = null;
- // The task selection execution context; contains the facades for events and context to be used by tasks executed by
+ // The task selection execution context; contains the facades for events and context to be used
+ // by tasks executed by
// this task selection executor
private TaskSelectionExecutionContext executionContext;
@@ -73,9 +74,8 @@ public abstract class TaskSelectExecutor implements Executor<EnEvent, AxArtifact
/*
* (non-Javadoc)
*
- * @see
- * org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.engine.executor.Executor,
- * java.lang.Object, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#setContext(org.onap.policy.apex.core.
+ * engine.executor.Executor, java.lang.Object, java.lang.Object)
*/
@Override
public void setContext(final Executor<?, ?, ?, ?> newParent, final AxState newAxState,
@@ -100,7 +100,8 @@ public abstract class TaskSelectExecutor implements Executor<EnEvent, AxArtifact
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#execute(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#execute(java.lang.long,
+ * java.lang.Object)
*/
@Override
public AxArtifactKey execute(final long executionID, final EnEvent newIncomingEvent)
@@ -111,7 +112,8 @@ public abstract class TaskSelectExecutor implements Executor<EnEvent, AxArtifact
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long, java.lang.Object)
+ * @see org.onap.policy.apex.core.engine.executor.Executor#executePre(java.lang.long,
+ * java.lang.Object)
*/
@Override
public final void executePre(final long executionID, final EnEvent newIncomingEvent) throws StateMachineException {
@@ -215,7 +217,8 @@ public abstract class TaskSelectExecutor implements Executor<EnEvent, AxArtifact
* (non-Javadoc)
*
* @see
- * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.executor.Executor)
+ * org.onap.policy.apex.core.engine.executor.Executor#setNext(org.onap.policy.apex.core.engine.
+ * executor.Executor)
*/
@Override
public void setNext(final Executor<EnEvent, AxArtifactKey, AxState, ApexInternalContext> newNextExecutor) {
@@ -255,8 +258,9 @@ public abstract class TaskSelectExecutor implements Executor<EnEvent, AxArtifact
/*
* (non-Javadoc)
*
- * @see org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.engine.
- * ExecutorParameters)
+ * @see
+ * org.onap.policy.apex.core.engine.executor.Executor#setParameters(org.onap.policy.apex.core.
+ * engine. ExecutorParameters)
*/
@Override
public void setParameters(final ExecutorParameters parameters) {}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacade.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacade.java
index 80d7e651b..e63bd3db8 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacade.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacade.java
@@ -31,8 +31,8 @@ import org.onap.policy.apex.model.policymodel.concepts.AxState;
import org.onap.policy.apex.model.policymodel.concepts.AxTasks;
/**
- * The Class AxStateFacade acts as a facade into the AxState class so that task logic can easily access information in
- * an AxState instance.
+ * The Class AxStateFacade acts as a facade into the AxState class so that task logic can easily
+ * access information in an AxState instance.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacade.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacade.java
index 85bf96c8d..a9e93a3b2 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacade.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacade.java
@@ -31,8 +31,8 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * The Class AxTaskFacade acts as a facade into the AxTask class so that task logic can easily access information in an
- * AxTask instance.
+ * The Class AxTaskFacade acts as a facade into the AxTask class so that task logic can easily
+ * access information in an AxTask instance.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
@@ -43,8 +43,8 @@ public class AxTaskFacade {
// CHECKSTYLE:OFF: checkstyle:visibilityModifier Logic has access to this field
/**
- * The full definition of the task we are presenting a facade to, executing logic has full access to the task
- * definition.
+ * The full definition of the task we are presenting a facade to, executing logic has full
+ * access to the task definition.
*/
public final AxTask task;
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java
index 874d4def1..be1b311c2 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java
@@ -38,15 +38,16 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * Container class for the execution context for state finalizer logic executions in a state being executed in an Apex
- * engine. The state finalizer must have easy access to the state definition, the fields, as well as the policy, global,
- * and external context.
+ * Container class for the execution context for state finalizer logic executions in a state being
+ * executed in an Apex engine. The state finalizer must have easy access to the state definition,
+ * the fields, as well as the policy, global, and external context.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
public class StateFinalizerExecutionContext {
/**
- * Logger for state finalizer execution, state finalizer logic can use this field to access and log to Apex logging.
+ * Logger for state finalizer execution, state finalizer logic can use this field to access and
+ * log to Apex logging.
*/
private static final XLogger EXCEUTION_LOGGER =
XLoggerFactory.getXLogger("org.onap.policy.apex.executionlogging.StateFinalizerExecutionLogging");
@@ -60,15 +61,16 @@ public class StateFinalizerExecutionContext {
public final Long executionID;
/**
- * The list of state outputs for this state finalizer. The purpose of a state finalizer is to select a state output
- * for a state from this list of state output names.
+ * The list of state outputs for this state finalizer. The purpose of a state finalizer is to
+ * select a state output for a state from this list of state output names.
*/
public final Set<String> stateOutputNames;
/**
- * The fields of this state finalizer. A state finalizer receives this list of fields from a task and may use these
- * fields to determine what state output to select. Once a state finalizer has selected a state output, it must
- * marshal these fields so that they match the fields required for the event defined in the state output.
+ * The fields of this state finalizer. A state finalizer receives this list of fields from a
+ * task and may use these fields to determine what state output to select. Once a state
+ * finalizer has selected a state output, it must marshal these fields so that they match the
+ * fields required for the event defined in the state output.
*/
public final Map<String, Object> fields;
@@ -76,13 +78,15 @@ public class StateFinalizerExecutionContext {
private String message;
/**
- * The state output that the state finalizer logic has selected for a state. The state finalizer logic sets this
- * field in its logic after executing and the Apex engine uses this state output for this state.
+ * The state output that the state finalizer logic has selected for a state. The state finalizer
+ * logic sets this field in its logic after executing and the Apex engine uses this state output
+ * for this state.
*/
private String selectedStateOutputName;
/**
- * Logger for state finalizer execution, state finalizer logic can use this field to access and log to Apex logging.
+ * Logger for state finalizer execution, state finalizer logic can use this field to access and
+ * log to Apex logging.
*/
public final XLogger logger = EXCEUTION_LOGGER;
@@ -98,8 +102,10 @@ public class StateFinalizerExecutionContext {
* @param executionID the execution ID for the current APEX policy execution instance
* @param axState the state definition that is the subject of execution
* @param fields the fields to be manipulated by the state finalizer
- * @param stateOutputNames the state output names, one of which will be selected by the state finalizer
- * @param internalContext the execution context of the Apex engine in which the task is being executed
+ * @param stateOutputNames the state output names, one of which will be selected by the state
+ * finalizer
+ * @param internalContext the execution context of the Apex engine in which the task is being
+ * executed
*/
public StateFinalizerExecutionContext(final StateFinalizerExecutor stateFinalizerExecutor, final long executionID,
final AxState axState, final Map<String, Object> fields, final Set<String> stateOutputNames,
@@ -141,7 +147,8 @@ public class StateFinalizerExecutionContext {
*
* @param contextAlbumName The context album name
* @return The context album
- * @throws ContextRuntimeException if the context album does not exist on the state for this executor
+ * @throws ContextRuntimeException if the context album does not exist on the state for this
+ * executor
*/
public ContextAlbum getContextAlbum(final String contextAlbumName) throws ContextRuntimeException {
// Find the context album
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java
index 2251cf5c1..a9a157082 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java
@@ -38,9 +38,9 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * Container class for the execution context for Task logic executions in a task being executed in an Apex engine. The
- * task must have easy access to the task definition, the incoming and outgoing field contexts, as well as the policy,
- * global, and external context.
+ * Container class for the execution context for Task logic executions in a task being executed in
+ * an Apex engine. The task must have easy access to the task definition, the incoming and outgoing
+ * field contexts, as well as the policy, global, and external context.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
@@ -54,7 +54,9 @@ public class TaskExecutionContext {
/** A constant <code>boolean true</code> value available for reuse e.g., for the return value */
public final Boolean TRUE = true;
- /** A constant <code>boolean false</code> value available for reuse e.g., for the return value */
+ /**
+ * A constant <code>boolean false</code> value available for reuse e.g., for the return value
+ */
public final Boolean FALSE = false;
/** A facade to the full task definition for the task logic being executed. */
@@ -64,18 +66,20 @@ public class TaskExecutionContext {
public final Long executionID;
/**
- * The incoming fields from the trigger event for the task. The task logic can access these fields when executing
- * its logic.
+ * The incoming fields from the trigger event for the task. The task logic can access these
+ * fields when executing its logic.
*/
public final Map<String, Object> inFields;
/**
- * The outgoing fields from the task. The task logic can access and set these fields with its logic. A task outputs
- * its result using these fields.
+ * The outgoing fields from the task. The task logic can access and set these fields with its
+ * logic. A task outputs its result using these fields.
*/
public final Map<String, Object> outFields;
- /** Logger for task execution, task logic can use this field to access and log to Apex logging. */
+ /**
+ * Logger for task execution, task logic can use this field to access and log to Apex logging.
+ */
public final XLogger logger = EXECUTION_LOGGER;
// CHECKSTYLE:ON: checkstyle:VisibilityModifier
@@ -97,7 +101,8 @@ public class TaskExecutionContext {
* @param axTask the task definition that is the subject of execution
* @param inFields the in fields
* @param outFields the out fields
- * @param internalContext the execution context of the Apex engine in which the task is being executed
+ * @param internalContext the execution context of the Apex engine in which the task is being
+ * executed
*/
public TaskExecutionContext(final TaskExecutor taskExecutor, final long executionID, final AxTask axTask,
final Map<String, Object> inFields, final Map<String, Object> outFields,
@@ -139,7 +144,8 @@ public class TaskExecutionContext {
*
* @param contextAlbumName The context album name
* @return The context album
- * @throws ContextRuntimeException if the context album does not exist on the task for this executor
+ * @throws ContextRuntimeException if the context album does not exist on the task for this
+ * executor
*/
public ContextAlbum getContextAlbum(final String contextAlbumName) throws ContextRuntimeException {
// Find the context album
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java
index a196e360e..3194e3fce 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java
@@ -38,9 +38,9 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * Container class for the execution context for Task Selection logic executions in a task being executed in an Apex
- * engine. The task must have easy access to the state definition, the incoming and outgoing event contexts, as well as
- * the policy, global, and external context.
+ * Container class for the execution context for Task Selection logic executions in a task being
+ * executed in an Apex engine. The task must have easy access to the state definition, the incoming
+ * and outgoing event contexts, as well as the policy, global, and external context.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
@@ -54,7 +54,9 @@ public class TaskSelectionExecutionContext {
/** A constant <code>boolean true</code> value available for reuse e.g., for the return value */
public final Boolean TRUE = true;
- /** A constant <code>boolean false</code> value available for reuse e.g., for the return value */
+ /**
+ * A constant <code>boolean false</code> value available for reuse e.g., for the return value
+ */
public final Boolean FALSE = false;
/** A facade to the full state definition for the task selection logic being executed. */
@@ -64,19 +66,21 @@ public class TaskSelectionExecutionContext {
public final Long executionID;
/**
- * The incoming fields from the trigger event for the state. The task selection logic can access these fields to
- * decide what task to select for the state.
+ * The incoming fields from the trigger event for the state. The task selection logic can access
+ * these fields to decide what task to select for the state.
*/
public final Map<String, Object> inFields;
/**
- * The task that the task selection logic has selected for a state. The task selection logic sets this field in its
- * logic prior to executing and the Apex engine executes this task as the task for this state.
+ * The task that the task selection logic has selected for a state. The task selection logic
+ * sets this field in its logic prior to executing and the Apex engine executes this task as the
+ * task for this state.
*/
public final AxArtifactKey selectedTask;
/**
- * Logger for task selection execution, task selection logic can use this field to access and log to Apex logging.
+ * Logger for task selection execution, task selection logic can use this field to access and
+ * log to Apex logging.
*/
public final XLogger logger = EXECUTION_LOGGER;
@@ -96,7 +100,8 @@ public class TaskSelectionExecutionContext {
* @param axState the state definition that is the subject of execution
* @param incomingEvent the incoming event for the state
* @param outgoingKey the outgoing key for the task to execute in this state
- * @param internalContext the execution context of the Apex engine in which the task is being executed
+ * @param internalContext the execution context of the Apex engine in which the task is being
+ * executed
*/
public TaskSelectionExecutionContext(final TaskSelectExecutor taskSelectExecutor, final long executionID,
final AxState axState, final EnEvent incomingEvent, final AxArtifactKey outgoingKey,
@@ -145,7 +150,8 @@ public class TaskSelectionExecutionContext {
*
* @param contextAlbumName The context album name
* @return The context albumxxxxxx
- * @throws ContextRuntimeException if the context album does not exist on the state for this executor
+ * @throws ContextRuntimeException if the context album does not exist on the state for this
+ * executor
*/
public ContextAlbum getContextAlbum(final String contextAlbumName) throws ContextRuntimeException {
// Find the context album
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/package-info.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/package-info.java
index 6dc555107..656ab49ce 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/package-info.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/package-info.java
@@ -19,13 +19,14 @@
*/
/**
- * Provides context and facades for executing tasks, task selection logic, and state finalizer logic. The public fields
- * and methods of {@link TaskExecutionContext}, {@link TaskSelectionExecutionContext} and
- * {@link StateFinalizerExecutionContext} are available to task logic, task selection logic, and state finalizer logic
- * respectively when that logic is executing in an executor plugin under the control of an APEX engine.
+ * Provides context and facades for executing tasks, task selection logic, and state finalizer
+ * logic. The public fields and methods of {@link TaskExecutionContext},
+ * {@link TaskSelectionExecutionContext} and {@link StateFinalizerExecutionContext} are available to
+ * task logic, task selection logic, and state finalizer logic respectively when that logic is
+ * executing in an executor plugin under the control of an APEX engine.
*
- * The {@link AxStateFacade} and {@link AxTaskFacade} classes provide facades and convenience methods for state and task
- * definition information for logic at execution time.
+ * The {@link AxStateFacade} and {@link AxTaskFacade} classes provide facades and convenience
+ * methods for state and task definition information for logic at execution time.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineException.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineException.java
index 9d6c55900..0b64eb481 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineException.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineException.java
@@ -43,9 +43,9 @@ public class StateMachineException extends ApexException {
* Instantiates a new state machine exception.
*
* @param message the message
- * @param e the e
+ * @param ex the exception
*/
- public StateMachineException(final String message, final Exception e) {
- super(message, e);
+ public StateMachineException(final String message, final Exception ex) {
+ super(message, ex);
}
}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineRuntimeException.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineRuntimeException.java
index 9ce2d7499..447c88bf9 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineRuntimeException.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineRuntimeException.java
@@ -43,9 +43,9 @@ public class StateMachineRuntimeException extends ApexRuntimeException {
* Instantiates a new state machine exception.
*
* @param message the message
- * @param e the e
+ * @param ex the exception
*/
- public StateMachineRuntimeException(final String message, final Exception e) {
- super(message, e);
+ public StateMachineRuntimeException(final String message, final Exception ex) {
+ super(message, ex);
}
}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java
index 58ee4c6cc..ae1f551a4 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java
@@ -201,7 +201,8 @@ public class ExecutorFactoryImpl extends ExecutorFactory {
private Executor<?, ?, ?, ?> createExecutor(final String logicFlavour,
final Class<Executor<?, ?, ?, ?>> executorClass,
final Class<? extends Executor<?, ?, ?, ?>> executorSuperClass) {
- // It's OK for an executor class not to be defined but it's not all right to try and create a non-defined
+ // It's OK for an executor class not to be defined but it's not all right to try and create
+ // a non-defined
// executor class
if (executorClass == null) {
final String errorMessage = "Executor plugin class not defined for \"" + logicFlavour
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/monitoring/package-info.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/monitoring/package-info.java
index 530041a23..38834687d 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/monitoring/package-info.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/monitoring/package-info.java
@@ -19,8 +19,8 @@
*/
/**
- * Provides monitoring of APEX policy execution. It monitors events as they trigger Apex policies, pass between the
- * various states of a policy, and are emitted by a policy.
+ * Provides monitoring of APEX policy execution. It monitors events as they trigger Apex policies,
+ * pass between the various states of a policy, and are emitted by a policy.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/