package org.onap.ccsdk.cds.blueprintsprocessor.core.utils
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
object PayloadUtils {
fun getResponseDataFromPayload(workflowName: String, responsePayload: JsonNode): JsonNode {
return responsePayload.get("$workflowName-response").returnNullIfMissing()
- ?: throw BlueprintProcessorException("failed to get property($workflowName-response)")
+ ?: throw BluePrintProcessorException("failed to get property($workflowName-response)")
}
fun prepareInputsFromWorkflowPayload(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
payload: JsonNode,
workflowName: String
) {
}
fun prepareDynamicInputsFromWorkflowPayload(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
payload: JsonNode,
workflowName: String
) {
}
fun prepareDynamicInputsFromComponentPayload(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
payload: JsonNode
) {
payload.fields().forEach { property ->
- val path = StringBuilder(BlueprintConstants.PATH_INPUTS)
- .append(BlueprintConstants.PATH_DIVIDER).append(property.key).toString()
+ val path = StringBuilder(BluePrintConstants.PATH_INPUTS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(property.key).toString()
bluePrintRuntimeService.put(path, property.value)
}
}