aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/services/execution-service/src
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-17 11:15:28 -0500
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-17 11:15:28 -0500
commit430152b368c2bf7458f9bbfb46841b9c2f31110f (patch)
tree4515ecf17b71bb0b7ffdbc6f83b473cfcdfcb8cb /ms/blueprintsprocessor/modules/services/execution-service/src
parent6de2171cd73873d5d2f5252e7238cb8d31aca806 (diff)
Change to base sli provider interfaces.
Change-Id: Icf16aa602ba107e2b2095f756f0c3af6f38891f5 Issue-ID: CCSDK-672 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/services/execution-service/src')
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt27
1 files changed, 13 insertions, 14 deletions
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
index 87a925f9..363899ea 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
@@ -38,15 +38,15 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
@Transient
private val log = LoggerFactory.getLogger(AbstractComponentFunction::class.java)
- var executionServiceInput: ExecutionServiceInput? = null
+ lateinit var executionServiceInput: ExecutionServiceInput
var executionServiceOutput = ExecutionServiceOutput()
- var bluePrintRuntimeService: BluePrintRuntimeService<*>? = null
- var processId: String = ""
- var workflowName: String = ""
- var stepName: String = ""
- var interfaceName: String = ""
- var operationName: String = ""
- var nodeTemplateName: String = ""
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var processId: String
+ lateinit var workflowName: String
+ lateinit var stepName: String
+ lateinit var interfaceName: String
+ lateinit var operationName: String
+ lateinit var nodeTemplateName: String
var operationInputs: MutableMap<String, JsonNode> = hashMapOf()
override fun getName(): String {
@@ -68,7 +68,7 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
log.info("preparing request id($processId) for workflow($workflowName) step($stepName)")
- val operationInputs = bluePrintRuntimeService!!.get("$stepName-step-inputs")
+ val operationInputs = bluePrintRuntimeService.get("$stepName-step-inputs")
?: JsonNodeFactory.instance.objectNode()
operationInputs.fields().forEach {
@@ -84,8 +84,7 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
operationName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_OPERATION)
check(operationName.isNotEmpty()) { "couldn't get Operation name for step($stepName)" }
-
- val operationResolvedProperties = bluePrintRuntimeService!!.resolveNodeTemplateInterfaceOperationInputs(nodeTemplateName, interfaceName, operationName)
+ val operationResolvedProperties = bluePrintRuntimeService.resolveNodeTemplateInterfaceOperationInputs(nodeTemplateName, interfaceName, operationName)
this.operationInputs.putAll(operationResolvedProperties)
@@ -94,13 +93,13 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
override fun prepareResponse(): ExecutionServiceOutput {
log.info("Preparing Response...")
- executionServiceOutput.commonHeader = executionServiceInput!!.commonHeader
+ executionServiceOutput.commonHeader = executionServiceInput.commonHeader
// Resolve the Output Expression
- val stepOutputs = bluePrintRuntimeService!!
+ val stepOutputs = bluePrintRuntimeService
.resolveNodeTemplateInterfaceOperationOutputs(nodeTemplateName, interfaceName, operationName)
- bluePrintRuntimeService!!.put("$stepName-step-outputs", stepOutputs.asJsonNode())
+ bluePrintRuntimeService.put("$stepName-step-outputs", stepOutputs.asJsonNode())
// Populate Status
val status = Status()