diff options
author | Brinda Santh <bs2796@att.com> | 2020-03-06 13:04:37 -0500 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2020-03-11 17:55:28 +0000 |
commit | 91b3a6477c4d5136bea02d3c1284a51b2f2ec1b1 (patch) | |
tree | fc8fe811f14dced88bc7e7296b60d1ce2990452d /ms/blueprintsprocessor/modules/inbounds/designer-api | |
parent | 55ec3c71441abda7c6058f4c2cc569c129f635ba (diff) |
Error Catalog Management Core Library.
Issue-ID: CCSDK-2076
Signed-off-by: Brinda Santh <bs2796@att.com>
Change-Id: I9e8e67bdee77fb359a791f4ef4c2963aa78ab93a
Signed-off-by: Steve Siani <alphonse.steve.siani.djissitchi@ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/designer-api')
2 files changed, 53 insertions, 9 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt index ff9aed664..1f01d1ce3 100644 --- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt +++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt @@ -211,24 +211,28 @@ open class BlueprintModelController(private val bluePrintModelHandler: BluePrint } @PostMapping( - path = arrayOf("/workflow-spec"), produces = arrayOf(MediaType - .APPLICATION_JSON_VALUE), - consumes = arrayOf(MediaType.APPLICATION_JSON_VALUE) + path = arrayOf("/workflow-spec"), produces = arrayOf( + MediaType + .APPLICATION_JSON_VALUE + ), + consumes = arrayOf(MediaType.APPLICATION_JSON_VALUE) ) @ResponseBody @Throws(BluePrintException::class) @PreAuthorize("hasRole('USER')") suspend fun workflowSpec(@RequestBody workFlowSpecReq: WorkFlowSpecRequest): - ResponseEntity<String> = mdcWebCoroutineScope { + ResponseEntity<String> = mdcWebCoroutineScope { var json = bluePrintModelHandler.prepareWorkFlowSpec(workFlowSpecReq) - .asJsonString() + .asJsonString() ResponseEntity(json, HttpStatus.OK) } @GetMapping( - path = arrayOf("/workflows/blueprint-name/{name}/version/{version" + - "}"), - produces = arrayOf(MediaType.APPLICATION_JSON_VALUE) + path = arrayOf( + "/workflows/blueprint-name/{name}/version/{version" + + "}" + ), + produces = arrayOf(MediaType.APPLICATION_JSON_VALUE) ) @ResponseBody @Throws(BluePrintException::class) @@ -240,7 +244,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: BluePrint @PathVariable(value = "version") version: String ): ResponseEntity<String> = mdcWebCoroutineScope { var json = bluePrintModelHandler.getWorkflowNames(name, version) - .asJsonString() + .asJsonString() ResponseEntity(json, HttpStatus.OK) } } diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ErrorHandling.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ErrorHandling.kt new file mode 100644 index 000000000..ae91246fe --- /dev/null +++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ErrorHandling.kt @@ -0,0 +1,40 @@ +/* + * Copyright © 2018-2019 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.cds.blueprintsprocessor.designer.api + +object DesignerApiDomains { + // Designer Api Domains Constants + const val DESIGNER_API = "org.onap.ccsdk.cds.blueprintsprocessor.designer.api" + const val DESIGNER_API_ENHANCER = "org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer" + const val DESIGNER_API_HANDLER = "org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler" + const val DESIGNER_API_LOAD = "org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load" + const val DESIGNER_API_SERVICE = "org.onap.ccsdk.cds.blueprintsprocessor.designer.api.service" +} + +object DesignerApiHttpErrorCodes { + init { + // Register HttpErrorCodes + // HttpErrorCodes.register("", 200) + } +} + +object DesignerGrpcErrorCodes { + init { + // Register GrpcErrorCodes + // GrpcErrorCodes.register("", 3) + } +} |