aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
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')
-rw-r--r--plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src/main/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributor.java4
-rw-r--r--plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributor.java4
-rw-r--r--plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroBytesObjectMapper.java6
-rw-r--r--plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroDirectObjectMapper.java4
-rw-r--r--plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroObjectMapperFactory.java8
-rw-r--r--plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaHelper.java10
-rw-r--r--plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroStringObjectMapper.java4
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java4
-rw-r--r--plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java6
-rw-r--r--plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java6
-rw-r--r--plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java6
-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
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java10
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java10
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java10
-rw-r--r--plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java10
-rw-r--r--plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/main/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDao.java4
-rw-r--r--plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDaoTest.java10
25 files changed, 102 insertions, 102 deletions
diff --git a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src/main/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributor.java b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src/main/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributor.java
index 2b17b17cf..9d35c30a8 100644
--- a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src/main/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributor.java
+++ b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src/main/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributor.java
@@ -85,8 +85,8 @@ public class HazelcastContextDistributor extends AbstractDistributor {
@Override
public Map<String, Object> getContextAlbumMap(final AxArtifactKey contextAlbumKey) {
// Get the map from Hazelcast
- LOGGER.info("HazelcastContextDistributor: create album: " + contextAlbumKey.getID());
- return hazelcastInstance.getMap(contextAlbumKey.getID());
+ LOGGER.info("HazelcastContextDistributor: create album: " + contextAlbumKey.getId());
+ return hazelcastInstance.getMap(contextAlbumKey.getId());
}
/*
diff --git a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributor.java b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributor.java
index d6a04dd7c..9f1327df1 100644
--- a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributor.java
+++ b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/src/main/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributor.java
@@ -91,11 +91,11 @@ public class InfinispanContextDistributor extends AbstractDistributor {
*/
@Override
public Map<String, Object> getContextAlbumMap(final AxArtifactKey contextAlbumKey) {
- LOGGER.info("InfinispanContextDistributor: create album: " + contextAlbumKey.getID());
+ LOGGER.info("InfinispanContextDistributor: create album: " + contextAlbumKey.getId());
// Get the Cache from Infinispan
final Cache<String, Object> infinispanCache =
- infinispanManager.getCacheManager().getCache(contextAlbumKey.getID().replace(':', '_'));
+ infinispanManager.getCacheManager().getCache(contextAlbumKey.getId().replace(':', '_'));
return infinispanCache;
}
diff --git a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroBytesObjectMapper.java b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroBytesObjectMapper.java
index dc281a52b..20e701bc7 100644
--- a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroBytesObjectMapper.java
+++ b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroBytesObjectMapper.java
@@ -102,7 +102,7 @@ public class AvroBytesObjectMapper implements AvroObjectMapper {
// The Avro object should be a Utf8 object
if (!(avroObject instanceof ByteBuffer)) {
final String returnString =
- userKey.getID() + ": object \"" + avroObject + "\" of class \"" + avroObject.getClass()
+ userKey.getId() + ": object \"" + avroObject + "\" of class \"" + avroObject.getClass()
+ "\" cannot be decoded to an object of class \"" + schemaClass.getCanonicalName() + "\"";
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString);
@@ -127,7 +127,7 @@ public class AvroBytesObjectMapper implements AvroObjectMapper {
@Override
public Object mapToAvro(final Object object) {
if (object == null) {
- final String returnString = userKey.getID() + ": cannot encode a null object of class \""
+ final String returnString = userKey.getId() + ": cannot encode a null object of class \""
+ schemaClass.getCanonicalName() + "\"";
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString);
@@ -135,7 +135,7 @@ public class AvroBytesObjectMapper implements AvroObjectMapper {
// The incoming object should be a byte array
if (!(object instanceof byte[])) {
- final String returnString = userKey.getID() + ": object \"" + object + "\" of class \"" + object.getClass()
+ final String returnString = userKey.getId() + ": object \"" + object + "\" of class \"" + object.getClass()
+ "\" cannot be decoded to an object of class \"" + schemaClass.getCanonicalName() + "\"";
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString);
diff --git a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroDirectObjectMapper.java b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroDirectObjectMapper.java
index acf64c3c9..35e811dec 100644
--- a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroDirectObjectMapper.java
+++ b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroDirectObjectMapper.java
@@ -132,7 +132,7 @@ public class AvroDirectObjectMapper implements AvroObjectMapper {
// the decoded object is always returned as a null
if (!schemaClass.isAssignableFrom(avroObject.getClass())) {
final String returnString =
- userKey.getID() + ": object \"" + avroObject + "\" of class \"" + avroObject.getClass()
+ userKey.getId() + ": object \"" + avroObject + "\" of class \"" + avroObject.getClass()
+ "\" cannot be decoded to an object of class \"" + schemaClass.getCanonicalName() + "\"";
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString);
@@ -152,7 +152,7 @@ public class AvroDirectObjectMapper implements AvroObjectMapper {
// Null values are only allowed if the schema class is null
if (object == null) {
if (schemaClass != null) {
- final String returnString = userKey.getID() + ": cannot encode a null object of class \""
+ final String returnString = userKey.getId() + ": cannot encode a null object of class \""
+ schemaClass.getCanonicalName() + "\"";
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString);
diff --git a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroObjectMapperFactory.java b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroObjectMapperFactory.java
index 22152a8da..a48ca8089 100644
--- a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroObjectMapperFactory.java
+++ b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroObjectMapperFactory.java
@@ -79,7 +79,7 @@ public class AvroObjectMapperFactory {
// currently only support unions with 2 types, one of which is NULL
final Schema nullschema = Schema.create(Schema.Type.NULL);
if (types.size() != 2 || !types.contains(nullschema)) {
- final String resultSting = userKey.getID()
+ final String resultSting = userKey.getId()
+ ": Apex currently only supports UNION schemas with 2 options, one must be NULL";
LOGGER.warn(resultSting);
throw new ContextRuntimeException(resultSting);
@@ -91,7 +91,7 @@ public class AvroObjectMapperFactory {
schema = types.get(1);
}
if (Schema.Type.NULL.equals(schema.getType())) {
- final String resultSting = userKey.getID()
+ final String resultSting = userKey.getId()
+ ": Apex currently only supports UNION schema2 with 2 options, only one can be NULL, and the other cannot be another UNION";
LOGGER.warn(resultSting);
throw new ContextRuntimeException(resultSting);
@@ -103,7 +103,7 @@ public class AvroObjectMapperFactory {
// Check that there is a definition for the mapper for this type
if (!AVRO_OBJECT_MAPPER_MAP.containsKey(avroType) || AVRO_OBJECT_MAPPER_MAP.get(avroType) == null) {
final String resultSting =
- userKey.getID() + ": no Avro object mapper defined for Avro type \"" + avroType + "\"";
+ userKey.getId() + ": no Avro object mapper defined for Avro type \"" + avroType + "\"";
LOGGER.warn(resultSting);
throw new ContextRuntimeException(resultSting);
}
@@ -117,7 +117,7 @@ public class AvroObjectMapperFactory {
}
} catch (final Exception e) {
- final String resultSting = userKey.getID() + ": could not create an Avro object mapper of type \""
+ final String resultSting = userKey.getId() + ": could not create an Avro object mapper of type \""
+ AVRO_OBJECT_MAPPER_MAP.get(avroType) + "\" for Avro type \"" + avroType + "\" : " + e;
LOGGER.warn(resultSting, e);
throw new ContextRuntimeException(resultSting, e);
diff --git a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaHelper.java b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaHelper.java
index 5fba274ce..df430b683 100644
--- a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaHelper.java
+++ b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaHelper.java
@@ -66,7 +66,7 @@ public class AvroSchemaHelper extends AbstractSchemaHelper {
try {
avroSchema = new Schema.Parser().parse(schema.getSchema());
} catch (final Exception e) {
- final String resultSting = userKey.getID() + ": avro context schema \"" + schema.getID()
+ final String resultSting = userKey.getId() + ": avro context schema \"" + schema.getId()
+ "\" schema is invalid: " + e.getMessage() + ", schema: " + schema.getSchema();
LOGGER.warn(resultSting);
throw new ContextRuntimeException(resultSting);
@@ -121,7 +121,7 @@ public class AvroSchemaHelper extends AbstractSchemaHelper {
return createNewInstance(elementJsonString);
}
else {
- final String returnString = getUserKey().getID() + ": the object \"" + incomingObject
+ final String returnString = getUserKey().getId() + ": the object \"" + incomingObject
+ "\" is not an instance of JsonObject";
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString);
@@ -146,7 +146,7 @@ public class AvroSchemaHelper extends AbstractSchemaHelper {
final JsonDecoder jsonDecoder = DecoderFactory.get().jsonDecoder(avroSchema, objectString);
decodedObject = new GenericDatumReader<GenericRecord>(avroSchema).read(null, jsonDecoder);
} catch (final Exception e) {
- final String returnString = getUserKey().getID() + ": object \"" + objectString
+ final String returnString = getUserKey().getId() + ": object \"" + objectString
+ "\" Avro unmarshalling failed: " + e.getMessage();
LOGGER.warn(returnString, e);
throw new ContextRuntimeException(returnString, e);
@@ -185,7 +185,7 @@ public class AvroSchemaHelper extends AbstractSchemaHelper {
return (String) object;
}
} catch (final ClassCastException e) {
- final String returnString = getUserKey().getID() + ": object \"" + object + "\" of type \""
+ final String returnString = getUserKey().getId() + ": object \"" + object + "\" of type \""
+ (object != null ? object.getClass().getCanonicalName() : "null") + "\" must be assignable to \""
+ getSchemaClass().getCanonicalName()
+ "\" or be a Json string representation of it for Avro unmarshalling";
@@ -218,7 +218,7 @@ public class AvroSchemaHelper extends AbstractSchemaHelper {
return new String(output.toByteArray());
} catch (final Exception e) {
final String returnString =
- getUserKey().getID() + ": object \"" + object + "\" Avro marshalling failed: " + e.getMessage();
+ getUserKey().getId() + ": object \"" + object + "\" Avro marshalling failed: " + e.getMessage();
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString, e);
}
diff --git a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroStringObjectMapper.java b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroStringObjectMapper.java
index cb3625f31..09d1d9f1f 100644
--- a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroStringObjectMapper.java
+++ b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroStringObjectMapper.java
@@ -101,7 +101,7 @@ public class AvroStringObjectMapper implements AvroObjectMapper {
// The Avro object should be a Utf8 object
if (!(avroObject instanceof Utf8)) {
final String returnString =
- userKey.getID() + ": object \"" + avroObject + "\" of class \"" + avroObject.getClass()
+ userKey.getId() + ": object \"" + avroObject + "\" of class \"" + avroObject.getClass()
+ "\" cannot be decoded to an object of class \"" + schemaClass.getCanonicalName() + "\"";
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString);
@@ -119,7 +119,7 @@ public class AvroStringObjectMapper implements AvroObjectMapper {
@Override
public Object mapToAvro(final Object object) {
if (object == null) {
- final String returnString = userKey.getID() + ": cannot encode a null object of class \""
+ final String returnString = userKey.getId() + ": cannot encode a null object of class \""
+ schemaClass.getCanonicalName() + "\"";
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString);
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java
index 689b1e730..f81c3a914 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java
@@ -165,7 +165,7 @@ public class Apex2YamlEventConverter implements ApexEventProtocolConverter {
if (!apexEvent.containsKey(fieldName)) {
if (!eventField.getOptional()) {
- final String errorMessage = "error parsing " + eventDefinition.getID() + " event to Json. "
+ final String errorMessage = "error parsing " + eventDefinition.getId() + " event to Json. "
+ "Field \"" + fieldName + "\" is missing, but is mandatory. Fields: " + apexEvent;
LOGGER.debug(errorMessage);
throw new ApexEventRuntimeException(errorMessage);
@@ -204,7 +204,7 @@ public class Apex2YamlEventConverter implements ApexEventProtocolConverter {
final String fieldName = eventField.getKey().getLocalName();
if (!yamlMap.containsKey(fieldName)) {
if (!eventField.getOptional()) {
- final String errorMessage = "error parsing " + eventDefinition.getID() + " event from Json. "
+ final String errorMessage = "error parsing " + eventDefinition.getId() + " event from Json. "
+ "Field \"" + fieldName + "\" is missing, but is mandatory.";
LOGGER.debug(errorMessage);
throw new ApexEventException(errorMessage);
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java
index 52b78733a..4fff29092 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java
@@ -88,10 +88,10 @@ public class JavaStateFinalizerExecutor extends StateFinalizerExecutor {
new Class[] { StateFinalizerExecutionContext.class });
returnValue = (boolean) method.invoke(stateFinalizerLogicObject, getExecutionContext());
} catch (final Exception e) {
- LOGGER.error("execute: state finalizer logic failed to run for state finalizer \"" + getSubject().getID()
+ LOGGER.error("execute: state finalizer logic failed to run for state finalizer \"" + getSubject().getId()
+ "\"");
throw new StateMachineException(
- "state finalizer logic failed to run for state finalizer \"" + getSubject().getID() + "\"", e);
+ "state finalizer logic failed to run for state finalizer \"" + getSubject().getId() + "\"", e);
}
// Do the execution post work
@@ -112,7 +112,7 @@ public class JavaStateFinalizerExecutor extends StateFinalizerExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getID() + "," + getSubject().getLogicFlavour() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getId() + "," + getSubject().getLogicFlavour() + ","
+ getSubject().getLogic());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java
index 6343f1a9f..753f08b7e 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java
@@ -88,9 +88,9 @@ public class JavaTaskExecutor extends TaskExecutor {
new Class[] { TaskExecutionContext.class });
returnValue = (boolean) method.invoke(taskLogicObject, getExecutionContext());
} catch (final Exception 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);
}
// Do the execution post work
@@ -111,7 +111,7 @@ public class JavaTaskExecutor 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());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java
index ee33c52d1..a42ff2cfa 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java
@@ -89,10 +89,10 @@ public class JavaTaskSelectExecutor extends TaskSelectExecutor {
returnValue = (boolean) method.invoke(taskSelectionLogicObject, getExecutionContext());
} catch (final Exception 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() + "\"",
e);
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);
}
// Do the execution post work
@@ -113,7 +113,7 @@ public class JavaTaskSelectExecutor 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());
}
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;
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java
index 41ad359eb..f8f66e5d2 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java
@@ -113,7 +113,7 @@ public class JrubyStateFinalizerExecutor 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());
container.terminate();
container = null;
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java
index 8db650fa1..56b28d02e 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java
@@ -113,7 +113,7 @@ public class JrubyTaskExecutor 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());
container.terminate();
container = null;
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java
index 85c7ba018..8405f4e60 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java
@@ -114,7 +114,7 @@ public class JrubyTaskSelectExecutor 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());
container.terminate();
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 71dce5801..e1c0f096a 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
@@ -67,8 +67,8 @@ public class JythonTaskExecutor extends TaskExecutor {
compiled = Py.compile_flags(logic, filename, CompileMode.exec, new CompilerFlags());
}
} catch (final PyException e) {
- LOGGER.warn("failed to compile Jython code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to compile Jython code for task " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile Jython code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to compile Jython code for task " + getSubject().getKey().getId(),
e);
}
@@ -104,24 +104,24 @@ public class JythonTaskExecutor extends TaskExecutor {
final Object ret = interpreter.get("returnValue", java.lang.Boolean.class);
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() + "\"",
+ + getSubject().getKey().getId() + "\"",
e);
}
}
/* */
} catch (final Exception e) {
- LOGGER.warn("failed to execute Jython code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to execute Jython code for task " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute Jython code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to execute Jython code for task " + getSubject().getKey().getId(),
e);
}
@@ -144,7 +144,7 @@ public class JythonTaskExecutor extends TaskExecutor {
@Override
public void cleanUp() throws StateMachineException {
interpreter.cleanup();
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ "," + getSubject().getTaskLogic().getLogic());
}
}
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 d28001d87..4f4d38a19 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
@@ -66,10 +66,10 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor {
compiled = Py.compile_flags(logic, filename, CompileMode.exec, new CompilerFlags());
}
} catch (final PyException e) {
- LOGGER.warn("failed to compile Jython code for task selection logic in " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile Jython code for task selection logic in " + getSubject().getKey().getId(),
e);
throw new StateMachineException(
- "failed to compile Jython code for task selection logic in " + getSubject().getKey().getID(), e);
+ "failed to compile Jython code for task selection logic in " + getSubject().getKey().getId(), e);
}
}
@@ -104,27 +104,27 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor {
final Object ret = interpreter.get("returnValue", java.lang.Boolean.class);
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() + "\"",
+ + getSubject().getKey().getId() + "\"",
e);
}
}
/* */
} catch (final Exception e) {
- LOGGER.warn("failed to execute Jython code for task selection logic in " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute Jython code for task selection logic in " + getSubject().getKey().getId(),
e);
throw new StateMachineException(
- "failed to execute Jython code for task selection logic in " + getSubject().getKey().getID(), e);
+ "failed to execute Jython code for task selection logic in " + getSubject().getKey().getId(), e);
}
// Do the execution post work
@@ -146,7 +146,7 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor {
@Override
public void cleanUp() throws StateMachineException {
interpreter.cleanup();
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + ","
+ getSubject().getTaskSelectionLogic().getLogicFlavour() + ","
+ getSubject().getTaskSelectionLogic().getLogic());
}
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java
index 8cd76a94d..ea39c6d74 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java
@@ -59,8 +59,8 @@ public class MvelStateFinalizerExecutor extends StateFinalizerExecutor {
try {
compiled = MVEL.compileExpression(getSubject().getLogic());
} catch (final Exception e) {
- LOGGER.warn("failed to compile MVEL code for state " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to compile MVEL code for state " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile MVEL code for state " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to compile MVEL code for state " + getSubject().getKey().getId(),
e);
}
}
@@ -89,8 +89,8 @@ public class MvelStateFinalizerExecutor extends StateFinalizerExecutor {
returnValue =
(boolean) MVEL.executeExpression(compiled, getExecutionContext(), new HashMap<String, Object>());
} catch (final Exception e) {
- LOGGER.warn("failed to execute MVEL code for state " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to execute MVEL code for state " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute MVEL code for state " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to execute MVEL code for state " + getSubject().getKey().getId(),
e);
}
@@ -112,7 +112,7 @@ public class MvelStateFinalizerExecutor 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());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java
index 8599eabac..966a8004a 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java
@@ -59,8 +59,8 @@ public class MvelTaskExecutor extends TaskExecutor {
try {
compiled = MVEL.compileExpression(getSubject().getTaskLogic().getLogic());
} catch (final Exception e) {
- LOGGER.warn("failed to compile MVEL code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to compile MVEL code for task " + getSubject().getKey().getID(), e);
+ LOGGER.warn("failed to compile MVEL code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to compile MVEL code for task " + getSubject().getKey().getId(), e);
}
argumentNotNull(compiled, "MVEL task not compiled.");
}
@@ -89,8 +89,8 @@ public class MvelTaskExecutor extends TaskExecutor {
returnValue =
(boolean) MVEL.executeExpression(compiled, getExecutionContext(), new HashMap<String, Object>());
} catch (final Exception e) {
- LOGGER.warn("failed to execute MVEL code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to execute MVEL code for task " + getSubject().getKey().getID(), e);
+ LOGGER.warn("failed to execute MVEL code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to execute MVEL code for task " + getSubject().getKey().getId(), e);
}
// Do the execution post work
@@ -111,7 +111,7 @@ public class MvelTaskExecutor 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());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java
index 3cb5d9bf6..4991fbade 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java
@@ -60,8 +60,8 @@ public class MvelTaskSelectExecutor extends TaskSelectExecutor {
try {
compiled = MVEL.compileExpression(getSubject().getTaskSelectionLogic().getLogic());
} catch (final Exception e) {
- LOGGER.warn("failed to compile MVEL code for state " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to compile MVEL code for state " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile MVEL code for state " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to compile MVEL code for state " + getSubject().getKey().getId(),
e);
}
}
@@ -90,8 +90,8 @@ public class MvelTaskSelectExecutor extends TaskSelectExecutor {
returnValue =
(boolean) MVEL.executeExpression(compiled, getExecutionContext(), new HashMap<String, Object>());
} catch (final Exception e) {
- LOGGER.warn("failed to execute MVEL code for state " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to execute MVEL code for state " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute MVEL code for state " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to execute MVEL code for state " + getSubject().getKey().getId(),
e);
}
@@ -113,7 +113,7 @@ public class MvelTaskSelectExecutor 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());
}
diff --git a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java
index d33621e47..4a27bcfa7 100644
--- a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java
+++ b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java
@@ -37,7 +37,7 @@ import org.onap.policy.apex.context.test.entities.ReferenceKeyTestEntity;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
/**
* Junit tests for class EclipselinkApexDao
@@ -51,16 +51,16 @@ public class EclipselinkApexDaoTest {
private static final List<AxArtifactKey> TEST_ARTIKEYS = Arrays.asList(new AxArtifactKey[] {
new AxArtifactKey("ABC", "0.0.1"), new AxArtifactKey("DEF", "0.1.1"), new AxArtifactKey("XYZ", "1.1.1")});
- private final DAOParameters daoParameters = new DAOParameters();
+ private final DaoParameters DaoParameters = new DaoParameters();
private EclipselinkApexDao eclipselinkApexDao = null;
@Before
public void setup() throws ApexException {
- daoParameters.setPluginClass(EclipselinkApexDao.class.getCanonicalName());
- daoParameters.setPersistenceUnit("DAOTest");
+ DaoParameters.setPluginClass(EclipselinkApexDao.class.getCanonicalName());
+ DaoParameters.setPersistenceUnit("DAOTest");
eclipselinkApexDao = new EclipselinkApexDao();
- eclipselinkApexDao.init(daoParameters);
+ eclipselinkApexDao.init(DaoParameters);
}
@After
diff --git a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/main/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDao.java b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/main/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDao.java
index 2d60e3751..087535d6b 100644
--- a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/main/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDao.java
+++ b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/main/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDao.java
@@ -239,7 +239,7 @@ public class HibernateApexDao extends DefaultApexDao {
}
if (ret.size() > 1) {
throw new IllegalArgumentException("More than one result was returned for search for " + aClass
- + " with key " + key.getID() + ": " + ret);
+ + " with key " + key.getId() + ": " + ret);
}
return ret.get(0);
}
@@ -269,7 +269,7 @@ public class HibernateApexDao extends DefaultApexDao {
}
if (ret.size() > 1) {
throw new IllegalArgumentException("More than one result was returned for search for " + aClass
- + " with key " + key.getID() + ": " + ret);
+ + " with key " + key.getId() + ": " + ret);
}
return ret.get(0);
}
diff --git a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDaoTest.java b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDaoTest.java
index 851332b7b..1f100fde8 100644
--- a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDaoTest.java
+++ b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDaoTest.java
@@ -37,7 +37,7 @@ import org.onap.policy.apex.context.test.entities.ReferenceKeyTestEntity;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
/**
* Junit test for class HibernateApexDao
@@ -51,16 +51,16 @@ public class HibernateApexDaoTest {
private static final List<AxArtifactKey> TEST_ARTIKEYS = Arrays.asList(new AxArtifactKey[] {
new AxArtifactKey("ABC", "0.0.1"), new AxArtifactKey("DEF", "0.1.1"), new AxArtifactKey("XYZ", "1.1.1")});
- private final DAOParameters daoParameters = new DAOParameters();
+ private final DaoParameters DaoParameters = new DaoParameters();
private HibernateApexDao hibernateApexDao = null;
@Before
public void setupDAO() throws ApexException {
- daoParameters.setPluginClass(HibernateApexDao.class.getCanonicalName());
- daoParameters.setPersistenceUnit("DAOTest");
+ DaoParameters.setPluginClass(HibernateApexDao.class.getCanonicalName());
+ DaoParameters.setPersistenceUnit("DAOTest");
hibernateApexDao = new HibernateApexDao();
- hibernateApexDao.init(daoParameters);
+ hibernateApexDao.init(DaoParameters);
}
@After