aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditor.java33
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java116
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumBuilder.java162
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java214
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java2
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java2
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java2
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java2
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java3
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerProducerTest.java3
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParametersTest.java3
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumerTest.java3
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducerTest.java3
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParametersTest.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParametersTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParametersTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParametersTest.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java3
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java2
33 files changed, 275 insertions, 341 deletions
diff --git a/auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditor.java b/auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditor.java
index 4c3583e46..fb9a8c60c 100644
--- a/auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditor.java
+++ b/auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditor.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -269,15 +270,7 @@ public class CodeGeneratorCliEditor {
/**
* Adds a new task declaration to the model.
*
- * @param name the name of the task
- * @param version the version of the task
- * @param uuid a UUID for the definition
- * @param description a description of the task
- * @param infields all infields for the task
- * @param outfields all outfields for the task
- * @param logic the logic for the task
- * @param parameters any task parameter
- * @param contextRefs any context reference
+ * @param taskDeclarationBuilder builder for the task declaration parameters
*/
public void addTaskDeclaration(TaskDeclarationBuilder taskDeclarationBuilder) {
final ST st = stg.getInstanceOf("taskDecl");
@@ -400,14 +393,7 @@ public class CodeGeneratorCliEditor {
/**
* Creates a new policy state task definition for a task which belongs to a state which belongs to a policy.
*
- * @param policyName the name of the policy
- * @param version the version of the policy
- * @param stateName the name of the new state
- * @param taskLocalName the local (in policy and state) name of the task
- * @param taskName the identifier of the task (previously defined as a task)
- * @param taskVersion the version of the task definition
- * @param outputType the output type
- * @param outputName the output name
+ * @param policyStateTaskBuilder builder for the state task parameters
* @return a CLI command for a policy state task definition
*/
public ST createPolicyStateTask(PolicyStateTaskBuilder policyStateTaskBuilder) {
@@ -452,18 +438,7 @@ public class CodeGeneratorCliEditor {
/**
* Creates a new policy state definition for a state which belongs to a policy.
*
- * @param policyName the name of the policy
- * @param version the version of the policy
- * @param stateName the name of the new state
- * @param triggerName the name of the trigger event
- * @param triggerVersion the version of the trigger event
- * @param defaultTask the identifier of the default task
- * @param defaultTaskVersion the version of the default task
- * @param outputs the output definitions of the state
- * @param tasks the task definition of the state
- * @param tsLogic the task selection logic of the state
- * @param finalizerLogics the finalizer logics for the state
- * @param ctxRefs any context reference for the state
+ * @param policyStateDefBuilder builder for the state definition parameters
* @return a CLI command for a policy state definition
*/
public ST createPolicyStateDef(PolicyStateDefBuilder policyStateDefBuilder) {
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
index 615ed2d4d..6719dea99 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -371,65 +372,39 @@ public final class ApexModelImpl implements ApexModel {
return eventFacade.deleteEventPar(name, version, parName);
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.modelapi.ApexEditorAPI#createContextAlbum(java.lang.String,
- * java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
- * java.lang.String, java.lang.String)
- */
- @Override
- // CHECKSTYLE:OFF: checkstyle:parameterNumber
- public ApexApiResult createContextAlbum(
- final String name,
- final String version,
- final String scope,
- final String writable,
- final String contextSchemaName,
- final String contextSchemaVersion,
- final String uuid,
- final String description) {
- return contextAlbumFacade.createContextAlbum(
- new ContextAlbumBuilder()
- .setName(name)
- .setVersion(version)
- .setScope(scope)
- .setWritable(writable)
- .setContextSchemaName(contextSchemaName)
- .setContextSchemaVersion(contextSchemaVersion)
- .setUuid(uuid)
- .setDescription(description));
- }
- // CHECKSTYLE:ON: checkstyle:parameterNumber
-
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.modelapi.ApexEditorAPI#updateContextAlbum(java.lang.String,
- * java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
- * java.lang.String, java.lang.String)
- */
- // CHECKSTYLE:OFF: checkstyle:parameterNumber
- @Override
- public ApexApiResult updateContextAlbum(
- final String name,
- final String version,
- final String scope,
- final String writable,
- final String contextSchemaName,
- final String contextSchemaVersion,
- final String uuid,
- final String description) {
- return contextAlbumFacade.updateContextAlbum(
- new ContextAlbumBuilder()
- .setName(name)
- .setVersion(version)
- .setScope(scope)
- .setWritable(writable)
- .setContextSchemaName(contextSchemaName)
- .setContextSchemaVersion(contextSchemaVersion)
- .setUuid(uuid)
- .setDescription(description));
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.modelapi.ApexEditorAPI#createContextAlbum(java.lang.String,
+ * java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
+ * java.lang.String, java.lang.String)
+ */
+ @Override
+ // CHECKSTYLE:OFF: checkstyle:parameterNumber
+ public ApexApiResult createContextAlbum(final String name, final String version, final String scope,
+ final String writable, final String contextSchemaName, final String contextSchemaVersion, final String uuid,
+ final String description) {
+ return contextAlbumFacade.createContextAlbum(new ContextAlbumBuilder().setName(name).setVersion(version)
+ .setScope(scope).setWritable(writable).setContextSchemaName(contextSchemaName)
+ .setContextSchemaVersion(contextSchemaVersion).setUuid(uuid).setDescription(description));
+ }
+ // CHECKSTYLE:ON: checkstyle:parameterNumber
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.modelapi.ApexEditorAPI#updateContextAlbum(java.lang.String,
+ * java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
+ * java.lang.String, java.lang.String)
+ */
+ // CHECKSTYLE:OFF: checkstyle:parameterNumber
+ @Override
+ public ApexApiResult updateContextAlbum(final String name, final String version, final String scope,
+ final String writable, final String contextSchemaName, final String contextSchemaVersion, final String uuid,
+ final String description) {
+ return contextAlbumFacade.updateContextAlbum(new ContextAlbumBuilder().setName(name).setVersion(version)
+ .setScope(scope).setWritable(writable).setContextSchemaName(contextSchemaName)
+ .setContextSchemaVersion(contextSchemaVersion).setUuid(uuid).setDescription(description));
}
// CHECKSTYLE:ON: checkstyle:parameterNumber
@@ -970,25 +945,12 @@ public final class ApexModelImpl implements ApexModel {
*/
@Override
// CHECKSTYLE:OFF: checkstyle:parameterNumber
- public ApexApiResult createPolicyStateTaskRef(
- final String name,
- final String version,
- final String stateName,
- final String taskLocalName,
- final String taskName,
- final String taskVersion,
- final String outputType,
+ public ApexApiResult createPolicyStateTaskRef(final String name, final String version, final String stateName,
+ final String taskLocalName, final String taskName, final String taskVersion, final String outputType,
final String outputName) {
- return policyFacade.createPolicyStateTaskRef(
- new CreatePolicyStateTaskRefBuilder()
- .setName(name)
- .setVersion(version)
- .setStateName(stateName)
- .setTaskLocalName(taskLocalName)
- .setTaskName(taskName)
- .setTaskVersion(taskVersion)
- .setOutputType(outputType)
- .setOutputName(outputName));
+ return policyFacade.createPolicyStateTaskRef(new CreatePolicyStateTaskRefBuilder().setName(name)
+ .setVersion(version).setStateName(stateName).setTaskLocalName(taskLocalName).setTaskName(taskName)
+ .setTaskVersion(taskVersion).setOutputType(outputType).setOutputName(outputName));
}
// CHECKSTYLE:ON: checkstyle:parameterNumber
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumBuilder.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumBuilder.java
index 88ee64822..937a16e37 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumBuilder.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumBuilder.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung Electronics Co., Ltd. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,87 +18,88 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.model.modelapi.impl;
public class ContextAlbumBuilder {
- private String name;
- private String version;
- private String scope;
- private String writable;
- private String contextSchemaName;
- private String contextSchemaVersion;
- private String uuid;
- private String description;
-
- public String getName() {
- return name;
- }
-
- public ContextAlbumBuilder setName(String name) {
- this.name = name;
- return this;
- }
-
- public String getVersion() {
- return version;
- }
-
- public ContextAlbumBuilder setVersion(String version) {
- this.version = version;
- return this;
- }
-
- public String getScope() {
- return scope;
- }
-
- public ContextAlbumBuilder setScope(String scope) {
- this.scope = scope;
- return this;
- }
-
- public String getWritable() {
- return writable;
- }
-
- public ContextAlbumBuilder setWritable(String writable) {
- this.writable = writable;
- return this;
- }
-
- public String getContextSchemaName() {
- return contextSchemaName;
- }
-
- public ContextAlbumBuilder setContextSchemaName(String contextSchemaName) {
- this.contextSchemaName = contextSchemaName;
- return this;
- }
-
- public String getContextSchemaVersion() {
- return contextSchemaVersion;
- }
-
- public ContextAlbumBuilder setContextSchemaVersion(String contextSchemaVersion) {
- this.contextSchemaVersion = contextSchemaVersion;
- return this;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public ContextAlbumBuilder setUuid(String uuid) {
- this.uuid = uuid;
- return this;
- }
-
- public String getDescription() {
- return description;
- }
-
- public ContextAlbumBuilder setDescription(String description) {
- this.description = description;
- return this;
- }
+ private String name;
+ private String version;
+ private String scope;
+ private String writable;
+ private String contextSchemaName;
+ private String contextSchemaVersion;
+ private String uuid;
+ private String description;
+
+ public String getName() {
+ return name;
+ }
+
+ public ContextAlbumBuilder setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public ContextAlbumBuilder setVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ public String getScope() {
+ return scope;
+ }
+
+ public ContextAlbumBuilder setScope(String scope) {
+ this.scope = scope;
+ return this;
+ }
+
+ public String getWritable() {
+ return writable;
+ }
+
+ public ContextAlbumBuilder setWritable(String writable) {
+ this.writable = writable;
+ return this;
+ }
+
+ public String getContextSchemaName() {
+ return contextSchemaName;
+ }
+
+ public ContextAlbumBuilder setContextSchemaName(String contextSchemaName) {
+ this.contextSchemaName = contextSchemaName;
+ return this;
+ }
+
+ public String getContextSchemaVersion() {
+ return contextSchemaVersion;
+ }
+
+ public ContextAlbumBuilder setContextSchemaVersion(String contextSchemaVersion) {
+ this.contextSchemaVersion = contextSchemaVersion;
+ return this;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public ContextAlbumBuilder setUuid(String uuid) {
+ this.uuid = uuid;
+ return this;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public ContextAlbumBuilder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
}
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java
index 920dc5eba..dfc29b302 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java
@@ -2,19 +2,20 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
@@ -61,7 +62,8 @@ public class ContextAlbumFacade {
* @param apexModel the apex model
* @param apexProperties Properties for the model
* @param jsonMode set to true to return JSON strings in list and delete operations, otherwise
- * set to false
+ * set to false * Modifications Copyright (C) 2019 Nordix Foundation.
+
*/
public ContextAlbumFacade(final ApexModel apexModel, final Properties apexProperties, final boolean jsonMode) {
this.apexModel = apexModel;
@@ -71,140 +73,98 @@ public class ContextAlbumFacade {
keyInformationFacade = new KeyInformationFacade(apexModel, apexProperties, jsonMode);
}
- /**
- * Create a context album.
- *
- * @param name name of the context album
- * @param version version of the context album, set to null to use the default version
- * @param scope of the context album
- * @param writable "true" or "t" if the context album is writable, set to null or any other value
- * for a read-only album
- * @param contextSchemaName name of the parameter context schema
- * @param contextSchemaVersion version of the parameter context schema, set to null to use the
- * latest version
- * @param uuid context album UUID, set to null to generate a UUID
- * @param description context album description, set to null to generate a description
- * @return result of the operation
- */
- // CHECKSTYLE:OFF: checkstyle:parameterNumber
- public ApexApiResult createContextAlbum(ContextAlbumBuilder builder) {
- try {
- final AxArtifactKey key = new AxArtifactKey();
- key.setName(builder.getName());
- if (builder.getVersion() != null) {
- key.setVersion(builder.getVersion());
- } else {
- key.setVersion(apexProperties.getProperty("DEFAULT_CONCEPT_VERSION"));
- }
+ /**
+ * Create a context album.
+ *
+ * @param builder the builder for the context album parameters
+ * @return result of the operation
+ */
+ // CHECKSTYLE:OFF: checkstyle:parameterNumber
+ public ApexApiResult createContextAlbum(ContextAlbumBuilder builder) {
+ try {
+ final AxArtifactKey key = new AxArtifactKey();
+ key.setName(builder.getName());
+ if (builder.getVersion() != null) {
+ key.setVersion(builder.getVersion());
+ } else {
+ key.setVersion(apexProperties.getProperty("DEFAULT_CONCEPT_VERSION"));
+ }
- if (apexModel.getPolicyModel().getAlbums().getAlbumsMap().containsKey(key)) {
- return new ApexApiResult(
- ApexApiResult.Result.CONCEPT_EXISTS, CONCEPT + key.getId() + " already exists");
- }
+ if (apexModel.getPolicyModel().getAlbums().getAlbumsMap().containsKey(key)) {
+ return new ApexApiResult(ApexApiResult.Result.CONCEPT_EXISTS,
+ CONCEPT + key.getId() + " already exists");
+ }
- final AxContextSchema schema =
- apexModel
- .getPolicyModel()
- .getSchemas()
- .get(builder.getContextSchemaName(), builder.getContextSchemaVersion());
- if (schema == null) {
- return new ApexApiResult(
- ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST,
- CONCEPT
- + builder.getContextSchemaName()
- + ':'
- + builder.getContextSchemaVersion()
- + DOES_NOT_EXIST);
- }
+ final AxContextSchema schema = apexModel.getPolicyModel().getSchemas().get(builder.getContextSchemaName(),
+ builder.getContextSchemaVersion());
+ if (schema == null) {
+ return new ApexApiResult(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, CONCEPT
+ + builder.getContextSchemaName() + ':' + builder.getContextSchemaVersion() + DOES_NOT_EXIST);
+ }
- final AxContextAlbum contextAlbum = new AxContextAlbum(key);
- contextAlbum.setScope(builder.getScope());
- contextAlbum.setItemSchema(schema.getKey());
+ final AxContextAlbum contextAlbum = new AxContextAlbum(key);
+ contextAlbum.setScope(builder.getScope());
+ contextAlbum.setItemSchema(schema.getKey());
- if (builder.getWritable() != null
- && ("true".equalsIgnoreCase(builder.getWritable().trim())
- || "t".equalsIgnoreCase(builder.getWritable().trim()))) {
- contextAlbum.setWritable(true);
- } else {
- contextAlbum.setWritable(false);
- }
+ contextAlbum
+ .setWritable(builder.getWritable() != null && ("true".equalsIgnoreCase(builder.getWritable().trim())
+ || "t".equalsIgnoreCase(builder.getWritable().trim())));
- apexModel.getPolicyModel().getAlbums().getAlbumsMap().put(key, contextAlbum);
+ apexModel.getPolicyModel().getAlbums().getAlbumsMap().put(key, contextAlbum);
- if (apexModel.getPolicyModel().getKeyInformation().getKeyInfoMap().containsKey(key)) {
- return keyInformationFacade.updateKeyInformation(
- builder.getName(), builder.getVersion(), builder.getUuid(), builder.getDescription());
- } else {
- return keyInformationFacade.createKeyInformation(
- builder.getName(), builder.getVersion(), builder.getUuid(), builder.getDescription());
- }
- } catch (final Exception e) {
- return new ApexApiResult(ApexApiResult.Result.FAILED, e);
- }
+ if (apexModel.getPolicyModel().getKeyInformation().getKeyInfoMap().containsKey(key)) {
+ return keyInformationFacade.updateKeyInformation(builder.getName(), builder.getVersion(),
+ builder.getUuid(), builder.getDescription());
+ } else {
+ return keyInformationFacade.createKeyInformation(builder.getName(), builder.getVersion(),
+ builder.getUuid(), builder.getDescription());
+ }
+ } catch (final Exception e) {
+ return new ApexApiResult(ApexApiResult.Result.FAILED, e);
+ }
}
- // CHECKSTYLE:ON: checkstyle:parameterNumber
+ // CHECKSTYLE:ON: checkstyle:parameterNumber
- /**
- * Update a context album.
- *
- * @param name name of the context album
- * @param version version of the context album, set to null to use the default version
- * @param scope of the context album
- * @param writable "true" or "t" if the context album is writable, set to null or any other value
- * for a read-only album
- * @param contextSchemaName name of the parameter context schema
- * @param contextSchemaVersion version of the parameter context schema, set to null to use the
- * latest version
- * @param uuid context album UUID, set to null to generate a UUID
- * @param description context album description, set to null to generate a description
- * @return result of the operation
- */
- // CHECKSTYLE:OFF: checkstyle:parameterNumber
- public ApexApiResult updateContextAlbum(ContextAlbumBuilder builder) {
- try {
- final AxContextAlbum contextAlbum =
- apexModel.getPolicyModel().getAlbums().get(builder.getName(), builder.getVersion());
- if (contextAlbum == null) {
- return new ApexApiResult(
- ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + builder.getName() + ':' + builder.getVersion() + DOES_NOT_EXIST);
- }
+ /**
+ * Update a context album.
+ *
+ * @param builder the builder for the context album parameters
+ * @return result of the operation
+ */
+ // CHECKSTYLE:OFF: checkstyle:parameterNumber
+ public ApexApiResult updateContextAlbum(ContextAlbumBuilder builder) {
+ try {
+ final AxContextAlbum contextAlbum =
+ apexModel.getPolicyModel().getAlbums().get(builder.getName(), builder.getVersion());
+ if (contextAlbum == null) {
+ return new ApexApiResult(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST,
+ CONCEPT + builder.getName() + ':' + builder.getVersion() + DOES_NOT_EXIST);
+ }
- if (builder.getScope() != null) {
- contextAlbum.setScope(builder.getScope());
- }
- if (builder.getWritable() != null) {
- if ("true".equalsIgnoreCase(builder.getWritable().trim())
- || "t".equalsIgnoreCase(builder.getWritable().trim())) {
- contextAlbum.setWritable(true);
- } else {
- contextAlbum.setWritable(false);
- }
- }
+ if (builder.getScope() != null) {
+ contextAlbum.setScope(builder.getScope());
+ }
- if (builder.getContextSchemaName() != null) {
- final AxContextSchema schema =
- apexModel
- .getPolicyModel()
- .getSchemas()
- .get(builder.getContextSchemaName(), builder.getContextSchemaVersion());
- if (schema == null) {
- return new ApexApiResult(
- ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST,
- CONCEPT
- + builder.getContextSchemaName()
- + ':'
- + builder.getContextSchemaVersion()
- + DOES_NOT_EXIST);
- }
- contextAlbum.setItemSchema(schema.getKey());
- }
+ contextAlbum
+ .setWritable(builder.getWritable() != null && ("true".equalsIgnoreCase(builder.getWritable().trim())
+ || "t".equalsIgnoreCase(builder.getWritable().trim())));
- return keyInformationFacade.updateKeyInformation(
- builder.getName(), builder.getVersion(), builder.getUuid(), builder.getDescription());
- } catch (final Exception e) {
- return new ApexApiResult(ApexApiResult.Result.FAILED, e);
- }
+ if (builder.getContextSchemaName() != null) {
+ final AxContextSchema schema = apexModel.getPolicyModel().getSchemas()
+ .get(builder.getContextSchemaName(), builder.getContextSchemaVersion());
+ if (schema == null) {
+ return new ApexApiResult(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST,
+ CONCEPT + builder.getContextSchemaName() + ':' + builder.getContextSchemaVersion()
+ + DOES_NOT_EXIST);
+ }
+ contextAlbum.setItemSchema(schema.getKey());
+ }
+
+ return keyInformationFacade.updateKeyInformation(builder.getName(), builder.getVersion(), builder.getUuid(),
+ builder.getDescription());
+ } catch (final Exception e) {
+ return new ApexApiResult(ApexApiResult.Result.FAILED, e);
+ }
}
// CHECKSTYLE:ON: checkstyle:parameterNumber
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java
index bbf749a4a..7db1c7c31 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java
@@ -527,7 +527,7 @@ public class AxTask extends AxConcept {
AxValidationResult result) {
if (taskParameterEntry.getValue() == null) {
result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
- "null input task parameer value found on task parameter " + taskParameterEntry.getKey()));
+ "null input task parameter value found on task parameter " + taskParameterEntry.getKey()));
} else {
if (!taskParameterEntry.getValue().getKey().getParentArtifactKey().equals(key)) {
result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java
index 4c10cefe9..a032af650 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +18,7 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.plugins.event.carrier.jms;
import static org.junit.Assert.assertNotNull;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java
index 4773296d9..e981f4158 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +18,7 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.plugins.event.carrier.jms;
import static org.junit.Assert.assertNotNull;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java
index 32d712411..18fc1f63e 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +18,7 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.plugins.event.carrier.jms;
import static org.junit.Assert.assertEquals;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java
index a86ffb18a..02daed02e 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,11 +18,13 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.plugins.event.carrier.restserver;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+
import java.lang.reflect.Field;
import javax.ws.rs.core.Response;
import org.junit.After;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerProducerTest.java
index a286336bf..4ee8e3591 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerProducerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerProducerTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,11 +18,13 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.plugins.event.carrier.restserver;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+
import java.lang.reflect.Field;
import org.junit.After;
import org.junit.Before;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParametersTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParametersTest.java
index 198005386..dbe20c960 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParametersTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParametersTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,11 +18,13 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.plugins.event.carrier.restserver;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+
import java.lang.reflect.Field;
import org.junit.Before;
import org.junit.Test;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumerTest.java
index cb04adc05..3021b8af2 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumerTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,11 +18,13 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.plugins.event.carrier.websocket;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducerTest.java
index 21069fc91..b97f42ffb 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducerTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,11 +18,13 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.plugins.event.carrier.websocket;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParametersTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParametersTest.java
index fc449fc1f..1ab732141 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParametersTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/test/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParametersTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +18,7 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.apex.plugins.event.carrier.websocket;
import static org.junit.Assert.assertFalse;
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 2e32bb626..c906a9ca3 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
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -84,7 +85,6 @@ public class JavascriptStateFinalizerExecutor extends StateFinalizerExecutor {
engine.put("executor", getExecutionContext());
// Check and execute the Javascript logic
- boolean returnValue = false;
try {
if (compiled == null) {
engine.eval(getSubject().getLogic());
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 af6db1107..4b6ff0232 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
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -83,7 +84,6 @@ public class JavascriptTaskExecutor extends TaskExecutor {
engine.put("executor", getExecutionContext());
// Check and execute the Javascript logic
- boolean returnValue = false;
try {
if (compiled == null) {
engine.eval(getSubject().getTaskLogic().getLogic());
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 80b005f1a..305f3a2da 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
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -90,7 +91,6 @@ public class JavascriptTaskSelectExecutor extends TaskSelectExecutor {
engine.put("executor", getExecutionContext());
// Check and execute the Javascript logic
- boolean returnValue = false;
try {
if (compiled == null) {
engine.eval(getSubject().getTaskSelectionLogic().getLogic());
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParametersTest.java b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParametersTest.java
index eabfd44b3..5b23584d0 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParametersTest.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParametersTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
package org.onap.policy.apex.plugins.executor.javascript;
import static org.junit.Assert.assertNotNull;
+
import org.junit.Test;
/**
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutorTest.java
index 6ab9cb633..4dd403e38 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.javascript;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import java.util.HashMap;
import java.util.Map;
import org.junit.After;
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java
index b98e2c03c..50610b2e0 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.javascript;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import java.util.HashMap;
import java.util.Map;
import org.junit.After;
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutorTest.java
index 1c99b3220..17c0be15f 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.javascript;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParametersTest.java b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParametersTest.java
index 6e35aafb3..4cfd7a19c 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParametersTest.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParametersTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
package org.onap.policy.apex.plugins.executor.jruby;
import static org.junit.Assert.assertNotNull;
+
import org.junit.Test;
/**
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java
index 1c2ea1cd6..c49d502fa 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.jruby;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import java.lang.reflect.Field;
import org.junit.After;
import org.junit.Before;
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java
index 88227106b..5fa9865c8 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.jruby;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java
index 3914fb530..6320b59c6 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.jruby;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import java.lang.reflect.Field;
import org.junit.After;
import org.junit.Before;
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java
index 8bfde0aa7..7c5e829a4 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParametersTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
package org.onap.policy.apex.plugins.executor.jython;
import static org.junit.Assert.assertNotNull;
+
import org.junit.Test;
/**
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
index 2ae41d6e6..76e35e8cc 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.jython;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import java.util.Map;
import java.util.TreeMap;
import org.junit.After;
@@ -105,8 +106,7 @@ public class JythonStateFinalizerExecutorTest {
AxState state = new AxState();
Map<String, AxStateOutput> stateOutputs = new TreeMap<>();
AxArtifactKey triggerKey = new AxArtifactKey("TriggerName", "0.0.1");
- AxStateOutput isMe = new AxStateOutput(new AxReferenceKey(), triggerKey,
- new AxReferenceKey());
+ AxStateOutput isMe = new AxStateOutput(new AxReferenceKey(), triggerKey, new AxReferenceKey());
stateOutputs.put("SelectedOutputIsMe", isMe);
state.setStateOutputs(stateOutputs);
@@ -141,12 +141,12 @@ public class JythonStateFinalizerExecutorTest {
scriptSource = "setattr(executor, 'selectedStateOutputName', 'SelectedOutputIsMe')\n"
+ "returnValue=('' if executor == -1 else True)";
- stateFinalizerLogic.setLogic(scriptSource);
- try {
- jsfe.prepare();
- } catch (Exception jteException) {
- fail("test should not throw an exception here");
- }
+ stateFinalizerLogic.setLogic(scriptSource);
+ try {
+ jsfe.prepare();
+ } catch (Exception jteException) {
+ fail("test should not throw an exception here");
+ }
AxEvent axEvent = new AxEvent(new AxArtifactKey("Event", "0.0.1"));
EnEvent event = new EnEvent(axEvent);
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
index 97af4b154..aec7470fa 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.jython;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import java.util.HashMap;
import java.util.Map;
import org.junit.After;
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
index d54887a65..7874b2315 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ package org.onap.policy.apex.plugins.executor.jython;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParametersTest.java b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParametersTest.java
index 987af43a4..81dc037ae 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParametersTest.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParametersTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java
index ac2503182..948dd31e2 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -55,6 +55,7 @@ import org.slf4j.ext.XLoggerFactory;
public class MvelStateFinalizerExecutorTest {
private static final XLogger LOGGER = XLoggerFactory.getXLogger(MvelStateFinalizerExecutorTest.class);
+
/**
* Initiate Parameters.
*/
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java
index 5d65a4bb8..0759aac23 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java
index 7c585ee2f..fd4857fa0 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Ericsson. All rights reserved.
+ * Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.