From 40072d3dcc1d0193bba1ea9432c13ac24857be55 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Wed, 27 Mar 2019 13:22:51 -0400 Subject: Improve function interfaces Change-Id: I24f45d39ac05491a4217101e00bcbf8d122e4e1a Issue-ID: CCSDK-1137 Signed-off-by: Muthuramalingam, Brinda Santh --- .../services/workflow/mock/MockComponentFunction.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/src/test') diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt index 1cae01ffa..5dc5b9dba 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt +++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt @@ -1,5 +1,6 @@ /* * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2019 IBM. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,14 +40,14 @@ class MockComponentFunction : AbstractComponentFunction() { private val log = LoggerFactory.getLogger(MockComponentFunction::class.java) - override fun process(executionRequest: ExecutionServiceInput) { + override suspend fun processNB(executionRequest: ExecutionServiceInput) { log.info("Processing component : $operationInputs") bluePrintRuntimeService.setNodeTemplateAttributeValue(nodeTemplateName, "assignment-params", "params".asJsonPrimitive()) } - override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { + override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { log.info("Recovering component..") } } @@ -57,11 +58,11 @@ class SingletonComponentFunction : AbstractComponentFunction() { private val log = LoggerFactory.getLogger(MockComponentFunction::class.java) - override fun process(executionRequest: ExecutionServiceInput) { + override suspend fun processNB(executionRequest: ExecutionServiceInput) { log.info("Processing component : $operationInputs") } - override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { + override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { log.info("Recovering component..") } } @@ -72,11 +73,11 @@ class PrototypeComponentFunction : AbstractComponentFunction() { private val log = LoggerFactory.getLogger(MockComponentFunction::class.java) - override fun process(executionRequest: ExecutionServiceInput) { + override suspend fun processNB(executionRequest: ExecutionServiceInput) { log.info("Processing component : $operationInputs") } - override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { + override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { log.info("Recovering component..") } } \ No newline at end of file -- cgit 1.2.3-korg