aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt')
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt18
1 files changed, 9 insertions, 9 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
index 43dbcbeb2..945d29850 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
@@ -36,9 +36,9 @@ import org.apache.http.message.BasicHeader
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintRetryException
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintIOUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintRetryException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintIOUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpMethod
@@ -59,7 +59,7 @@ interface BlueprintWebClientService {
.build()
}
- /** High performance non blocking Retry function, If execution block [block] throws BlueprintRetryException
+ /** High performance non blocking Retry function, If execution block [block] throws BluePrintRetryException
* exception then this will perform wait and retrigger accoring to times [times] with delay [delay]
*/
suspend fun <T> retry(
@@ -69,11 +69,11 @@ interface BlueprintWebClientService {
block: suspend (Int) -> T
): T {
val exceptionBlock = { e: Exception ->
- if (e !is BlueprintRetryException) {
+ if (e !is BluePrintRetryException) {
throw e
}
}
- return BlueprintIOUtils.retry(times, initialDelay, delay, block, exceptionBlock)
+ return BluePrintIOUtils.retry(times, initialDelay, delay, block, exceptionBlock)
}
fun exchangeResource(methodType: String, path: String, request: String): WebClientResponse<String> {
@@ -98,7 +98,7 @@ interface BlueprintWebClientService {
HttpMethod.POST -> post(path, request, convertedHeaders, String::class.java)
HttpMethod.PUT -> put(path, request, convertedHeaders, String::class.java)
HttpMethod.PATCH -> patch(path, request, convertedHeaders, String::class.java)
- else -> throw BlueprintProcessorException(
+ else -> throw BluePrintProcessorException(
"Unsupported methodType($methodType) attempted on path($path)"
)
}
@@ -270,7 +270,7 @@ interface BlueprintWebClientService {
HttpMethod.DELETE -> deleteNB(path, convertedHeaders, responseType)
HttpMethod.PUT -> putNB(path, request, convertedHeaders, responseType)
HttpMethod.PATCH -> patchNB(path, request, convertedHeaders, responseType)
- else -> throw BlueprintProcessorException("Unsupported methodType($methodType)")
+ else -> throw BluePrintProcessorException("Unsupported methodType($methodType)")
}
}
@@ -323,7 +323,7 @@ interface BlueprintWebClientService {
" User-supplied \"additionalHeaders\" cannot contain AUTHORIZATION header with" +
" auth-type \"${RestLibConstants.TYPE_BASIC_AUTH}\""
WebClientUtils.log.error(errMsg)
- throw BlueprintProcessorException(errMsg)
+ throw BluePrintProcessorException(errMsg)
} else {
customHeaders.putAll(it)
}