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
commit66439ec5c1f7a3141c0a61b8ed2e22466fbe7075 (patch)
treec80992652e06f6e50f12beacba08f0df5b615e64 /ms/blueprintsprocessor/modules/services/execution-service/src
parent6e7d5b5e81d6138e3ccd50434926218513da2f2a (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 87a925f9a..363899ea9 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()