summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-executor/plugins-executor-javascript/src/main
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-04 17:24:15 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-04 17:25:22 +0100
commit87be30582d1db37bee7c6b456c0c5c3ca9584963 (patch)
tree28806c5866fc5d07c89a06014d7c7d2705772b4f /plugins/plugins-executor/plugins-executor-javascript/src/main
parentf32508381ce0b555fc14978cbaa458aa4e2d91c5 (diff)
Fix checkstyle issues in apex model basic
CHeckstyle issues in apex model basic and knock on changes in other apex modules. Issue-ID: POLICY-1034 Change-Id: I65823f5e2e344526abc74b0812877113acb056ec Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-javascript/src/main')
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java10
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java18
3 files changed, 23 insertions, 23 deletions
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java
index 66c036375..7b91c5975 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java
@@ -61,9 +61,9 @@ public class JavascriptStateFinalizerExecutor extends StateFinalizerExecutor {
compiled = ((Compilable) engine).compile(getSubject().getLogic());
} catch (final ScriptException e) {
LOGGER.error("execute: state finalizer logic failed to compile for state finalizer \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException("state finalizer logic failed to compile for state finalizer \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
}
}
@@ -95,9 +95,9 @@ public class JavascriptStateFinalizerExecutor extends StateFinalizerExecutor {
}
} catch (final ScriptException e) {
LOGGER.error("execute: state finalizer logic failed to run for state finalizer \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException("state finalizer logic failed to run for state finalizer \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
}
returnValue = (boolean) engine.get("returnValue");
@@ -120,7 +120,7 @@ public class JavascriptStateFinalizerExecutor extends StateFinalizerExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getLogicFlavour() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getLogicFlavour() + ","
+ getSubject().getLogic());
engine = null;
}
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java
index 80f744b5d..38be929c0 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java
@@ -60,9 +60,9 @@ public class JavascriptTaskExecutor extends TaskExecutor {
try {
compiled = ((Compilable) engine).compile(getSubject().getTaskLogic().getLogic());
} catch (final ScriptException e) {
- LOGGER.error("execute: task logic failed to compile for task \"" + getSubject().getKey().getID() + "\"");
+ LOGGER.error("execute: task logic failed to compile for task \"" + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
- "task logic failed to compile for task \"" + getSubject().getKey().getID() + "\"", e);
+ "task logic failed to compile for task \"" + getSubject().getKey().getId() + "\"", e);
}
}
@@ -93,25 +93,25 @@ public class JavascriptTaskExecutor extends TaskExecutor {
compiled.eval(engine.getContext());
}
} catch (final ScriptException e) {
- LOGGER.error("execute: task logic failed to run for task \"" + getSubject().getKey().getID() + "\"");
+ LOGGER.error("execute: task logic failed to run for task \"" + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
- "task logic failed to run for task \"" + getSubject().getKey().getID() + "\"", e);
+ "task logic failed to run for task \"" + getSubject().getKey().getId() + "\"", e);
}
try {
final Object ret = engine.get("returnValue");
if (ret == null) {
LOGGER.error("execute: task logic failed to set a return value for task \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException("execute: task logic failed to set a return value for task \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
}
returnValue = (Boolean) ret;
} catch (NullPointerException | ClassCastException e) {
LOGGER.error("execute: task selection logic failed to set a correct return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
throw new StateMachineException("execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
}
// Do the execution post work
@@ -132,7 +132,7 @@ public class JavascriptTaskExecutor extends TaskExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ "," + getSubject().getTaskLogic().getLogic());
engine = null;
}
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java
index aa9c6650f..570b33b2a 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java
@@ -60,10 +60,10 @@ public class JavascriptTaskSelectExecutor extends TaskSelectExecutor {
try {
compiled = ((Compilable) engine).compile(getSubject().getTaskSelectionLogic().getLogic());
} catch (final ScriptException e) {
- LOGGER.error("execute: task selection logic failed to compile for state \"" + getSubject().getKey().getID()
+ LOGGER.error("execute: task selection logic failed to compile for state \"" + getSubject().getKey().getId()
+ "\"");
throw new StateMachineException(
- "task selection logic failed to compile for state \"" + getSubject().getKey().getID() + "\"", e);
+ "task selection logic failed to compile for state \"" + getSubject().getKey().getId() + "\"", e);
}
}
@@ -96,26 +96,26 @@ public class JavascriptTaskSelectExecutor extends TaskSelectExecutor {
}
} catch (final ScriptException e) {
LOGGER.error(
- "execute: task selection logic failed to run for state \"" + getSubject().getKey().getID() + "\"");
+ "execute: task selection logic failed to run for state \"" + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
- "task selection logic failed to run for state \"" + getSubject().getKey().getID() + "\"", e);
+ "task selection logic failed to run for state \"" + getSubject().getKey().getId() + "\"", e);
}
try {
final Object ret = engine.get("returnValue");
if (ret == null) {
LOGGER.error("execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
"execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
}
returnValue = (Boolean) ret;
} catch (NullPointerException | ClassCastException e) {
LOGGER.error("execute: task selection logic failed to set a correct return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
throw new StateMachineException("execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
}
// Do the execution post work
@@ -136,7 +136,7 @@ public class JavascriptTaskSelectExecutor extends TaskSelectExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + ","
+ getSubject().getTaskSelectionLogic().getLogicFlavour() + ","
+ getSubject().getTaskSelectionLogic().getLogic());
engine = null;