aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/designer-api/src
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2021-07-26 12:00:59 -0400
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2021-07-28 15:44:01 -0400
commitdaab14bd058de198c80b71d63e108fd788b7f5ee (patch)
tree252cfdef5b2e1500e5bd152f3f5c52602b6b0deb /ms/blueprintsprocessor/modules/inbounds/designer-api/src
parent82e396d6917519468376d177dd6a2710e84fa23a (diff)
Revert "Renaming Files having BluePrint to have Blueprint"
The renaming in CCSDK-3098 caused breaking changes to the grpc api and compile issues for kotlin scripts. Issue-ID: CCSDK-3385 Change-Id: I0d745cb858371678eabcb2284671c1fd76a1ab6d Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/designer-api/src')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandler.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandler.kt)82
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt36
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt6
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt4
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt8
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintArtifactDefinitionEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintArtifactDefinitionEnhancerImpl.kt)40
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintAttributeDefinitionEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintAttributeDefinitionEnhancerImpl.kt)42
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt)42
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTemplateEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTemplateEnhancerImpl.kt)30
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTypeEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTypeEnhancerImpl.kt)42
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPolicyTypeEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPolicyTypeEnhancerImpl.kt)20
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPropertyDefinitionEnhancerImpl.kt)44
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTemplateEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTemplateEnhancerImpl.kt)30
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTypeEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTypeEnhancerImpl.kt)34
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintServiceTemplateEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintServiceTemplateEnhancerImpl.kt)20
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTopologyTemplateEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTopologyTemplateEnhancerImpl.kt)20
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTypeEnhancerServiceImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTypeEnhancerServiceImpl.kt)70
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintWorkflowEnhancerImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintWorkflowEnhancerImpl.kt)46
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceAssignmentEnhancerService.kt26
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt28
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BluePrintModelHandler.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BlueprintModelHandler.kt)140
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt6
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt10
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintCatalogLoadService.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintCatalogLoadService.kt)16
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintDatabaseLoadService.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintDatabaseLoadService.kt)20
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt14
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt4
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BluePrintRepoServiceImpl.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BlueprintRepoServiceImpl.kt)40
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtils.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtils.kt)40
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt28
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandlerTest.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandlerTest.kt)48
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt14
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt12
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/TestDatabaseConfiguration.kt4
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImplTest.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImplTest.kt)14
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt14
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt18
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtilsTest.kt (renamed from ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtilsTest.kt)6
38 files changed, 559 insertions, 559 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandler.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandler.kt
index 97e43ec89..54f8dbc9d 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandler.kt
@@ -22,21 +22,21 @@ import com.google.protobuf.ByteString
import com.google.protobuf.util.JsonFormat
import io.grpc.stub.StreamObserver
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.BlueprintModelHandler
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.BluePrintModelHandler
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status
-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.emptyTONull
import org.onap.ccsdk.cds.controllerblueprints.core.utils.currentTimestamp
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementServiceGrpc
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput
import org.onap.ccsdk.cds.controllerblueprints.management.api.DownloadAction
import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk
import org.onap.ccsdk.cds.controllerblueprints.management.api.RemoveAction
@@ -51,18 +51,18 @@ import org.springframework.stereotype.Service
// TODO("Convert to coroutines handler")
@Service
-open class BlueprintManagementGRPCHandler(
- private val bluePrintModelHandler: BlueprintModelHandler,
+open class BluePrintManagementGRPCHandler(
+ private val bluePrintModelHandler: BluePrintModelHandler,
private val errorCatalogService: ErrorCatalogService
) :
- BlueprintManagementServiceGrpc.BlueprintManagementServiceImplBase() {
+ BluePrintManagementServiceGrpc.BluePrintManagementServiceImplBase() {
- private val log = LoggerFactory.getLogger(BlueprintManagementGRPCHandler::class.java)
+ private val log = LoggerFactory.getLogger(BluePrintManagementGRPCHandler::class.java)
@PreAuthorize("hasRole('USER')")
override fun uploadBlueprint(
- request: BlueprintUploadInput,
- responseObserver: StreamObserver<BlueprintManagementOutput>
+ request: BluePrintUploadInput,
+ responseObserver: StreamObserver<BluePrintManagementOutput>
) {
runBlocking {
@@ -91,7 +91,7 @@ open class BlueprintManagementGRPCHandler(
failStatus(
request.commonHeader,
"Upload action($uploadAction) not implemented",
- BlueprintProcessorException("Not Implemented")
+ BluePrintProcessorException("Not Implemented")
)
)
}
@@ -104,7 +104,7 @@ open class BlueprintManagementGRPCHandler(
failStatus(
request.commonHeader,
"Upload action($uploadAction) not implemented",
- BlueprintProcessorException("Not implemented")
+ BluePrintProcessorException("Not implemented")
)
)
}
@@ -124,8 +124,8 @@ open class BlueprintManagementGRPCHandler(
@PreAuthorize("hasRole('USER')")
override fun downloadBlueprint(
- request: BlueprintDownloadInput,
- responseObserver: StreamObserver<BlueprintManagementOutput>
+ request: BluePrintDownloadInput,
+ responseObserver: StreamObserver<BluePrintManagementOutput>
) {
runBlocking {
val blueprintName = request.actionIdentifiers.blueprintName
@@ -148,7 +148,7 @@ open class BlueprintManagementGRPCHandler(
failStatus(
request.commonHeader,
"Search action($searchAction) not implemented",
- BlueprintProcessorException("Not implemented")
+ BluePrintProcessorException("Not implemented")
)
)
}
@@ -168,9 +168,9 @@ open class BlueprintManagementGRPCHandler(
@PreAuthorize("hasRole('USER')")
override fun removeBlueprint(
- request: BlueprintRemoveInput,
+ request: BluePrintRemoveInput,
responseObserver:
- StreamObserver<BlueprintManagementOutput>
+ StreamObserver<BluePrintManagementOutput>
) {
runBlocking {
@@ -195,7 +195,7 @@ open class BlueprintManagementGRPCHandler(
failStatus(
request.commonHeader,
"Remove action($removeAction) not implemented",
- BlueprintProcessorException("Not implemented")
+ BluePrintProcessorException("Not implemented")
)
)
}
@@ -214,8 +214,8 @@ open class BlueprintManagementGRPCHandler(
}
override fun bootstrapBlueprint(
- request: BlueprintBootstrapInput,
- responseObserver: StreamObserver<BlueprintManagementOutput>
+ request: BluePrintBootstrapInput,
+ responseObserver: StreamObserver<BluePrintManagementOutput>
) {
runBlocking {
try {
@@ -241,33 +241,33 @@ open class BlueprintManagementGRPCHandler(
}
}
- private fun outputWithFileBytes(header: CommonHeader, byteArray: ByteArray): BlueprintManagementOutput =
- BlueprintManagementOutput.newBuilder()
+ private fun outputWithFileBytes(header: CommonHeader, byteArray: ByteArray): BluePrintManagementOutput =
+ BluePrintManagementOutput.newBuilder()
.setCommonHeader(header)
.setFileChunk(FileChunk.newBuilder().setChunk(ByteString.copyFrom(byteArray)))
.setStatus(
Status.newBuilder()
.setTimestamp(currentTimestamp())
.setEventType(EventType.EVENT_COMPONENT_EXECUTED)
- .setMessage(BlueprintConstants.STATUS_SUCCESS)
+ .setMessage(BluePrintConstants.STATUS_SUCCESS)
.setCode(200)
.build()
)
.build()
- private fun successStatus(header: CommonHeader, propertyContent: String? = null): BlueprintManagementOutput {
+ private fun successStatus(header: CommonHeader, propertyContent: String? = null): BluePrintManagementOutput {
// Populate Response Payload
- val propertiesBuilder = BlueprintManagementOutput.newBuilder().propertiesBuilder
+ val propertiesBuilder = BluePrintManagementOutput.newBuilder().propertiesBuilder
propertyContent?.let {
JsonFormat.parser().merge(propertyContent, propertiesBuilder)
}
- return BlueprintManagementOutput.newBuilder()
+ return BluePrintManagementOutput.newBuilder()
.setCommonHeader(header)
.setProperties(propertiesBuilder.build())
.setStatus(
Status.newBuilder()
.setTimestamp(currentTimestamp())
- .setMessage(BlueprintConstants.STATUS_SUCCESS)
+ .setMessage(BluePrintConstants.STATUS_SUCCESS)
.setEventType(EventType.EVENT_COMPONENT_EXECUTED)
.setCode(200)
.build()
@@ -275,19 +275,19 @@ open class BlueprintManagementGRPCHandler(
.build()
}
- private fun failStatus(header: CommonHeader, message: String, e: Exception): BlueprintManagementOutput {
+ private fun failStatus(header: CommonHeader, message: String, e: Exception): BluePrintManagementOutput {
log.error(message, e)
- return if (e is BlueprintProcessorException) onErrorCatalog(header, message, e) else onError(header, message, e)
+ return if (e is BluePrintProcessorException) onErrorCatalog(header, message, e) else onError(header, message, e)
}
- private fun onError(header: CommonHeader, message: String, error: Exception): BlueprintManagementOutput {
+ private fun onError(header: CommonHeader, message: String, error: Exception): BluePrintManagementOutput {
val code = GrpcErrorCodes.code(ErrorCatalogCodes.GENERIC_FAILURE)
- return BlueprintManagementOutput.newBuilder()
+ return BluePrintManagementOutput.newBuilder()
.setCommonHeader(header)
.setStatus(
Status.newBuilder()
.setTimestamp(currentTimestamp())
- .setMessage(BlueprintConstants.STATUS_FAILURE)
+ .setMessage(BluePrintConstants.STATUS_FAILURE)
.setEventType(EventType.EVENT_COMPONENT_FAILURE)
.setErrorMessage("Error : $message \n Details: ${error.errorMessageOrDefault()}")
.setCode(code)
@@ -296,20 +296,20 @@ open class BlueprintManagementGRPCHandler(
.build()
}
- private fun onErrorCatalog(header: CommonHeader, message: String, error: BlueprintProcessorException):
- BlueprintManagementOutput {
+ private fun onErrorCatalog(header: CommonHeader, message: String, error: BluePrintProcessorException):
+ BluePrintManagementOutput {
val err = if (error.protocol == "") {
error.grpc(ErrorCatalogCodes.GENERIC_FAILURE)
} else {
error.convertToGrpc()
}
val errorPayload = errorCatalogService.errorPayload(err.addErrorPayloadMessage(message))
- return BlueprintManagementOutput.newBuilder()
+ return BluePrintManagementOutput.newBuilder()
.setCommonHeader(header)
.setStatus(
Status.newBuilder()
.setTimestamp(currentTimestamp())
- .setMessage(BlueprintConstants.STATUS_FAILURE)
+ .setMessage(BluePrintConstants.STATUS_FAILURE)
.setEventType(EventType.EVENT_COMPONENT_FAILURE)
.setErrorMessage("Error : ${errorPayload.message}")
.setCode(errorPayload.code)
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 f19824d47..66d4b0e16 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
@@ -25,10 +25,10 @@ import io.swagger.annotations.ApiResponse
import io.swagger.annotations.ApiResponses
import org.jetbrains.annotations.NotNull
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelSearch
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.BlueprintModelHandler
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.BluePrintModelHandler
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintSortByOption
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.mdcWebCoroutineScope
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.springframework.core.io.Resource
import org.springframework.data.domain.Page
@@ -62,7 +62,7 @@ import org.springframework.web.bind.annotation.RestController
value = "Blueprint Model Catalog",
description = "Manages all blueprint models which are available in CDS"
)
-open class BlueprintModelController(private val bluePrintModelHandler: BlueprintModelHandler) {
+open class BlueprintModelController(private val bluePrintModelHandler: BluePrintModelHandler) {
@PostMapping(
path = arrayOf("/bootstrap"), produces = arrayOf(MediaType.APPLICATION_JSON_VALUE),
@@ -79,7 +79,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
ApiResponse(code = 500, message = "Internal Server Error")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun bootstrap(
@ApiParam(required = true, value = "Specifies which elements to load")
@@ -100,7 +100,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
ApiResponse(code = 500, message = "Internal Server Error")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun saveBlueprint(
@ApiParam(name = "file", value = "CBA file to be uploaded (example: cba.zip)", required = true)
@@ -162,7 +162,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
@PathVariable(value = "keyword") keyWord: String
): List<BlueprintModelSearch> =
mdcWebCoroutineScope {
- bluePrintModelHandler.searchBlueprintModelsByKeyWord(keyWord)
+ bluePrintModelHandler.searchBluePrintModelsByKeyWord(keyWord)
}
@GetMapping("/paged/meta-data/{keyword}", produces = [MediaType.APPLICATION_JSON_VALUE])
@@ -186,7 +186,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
offset, limit,
Sort.Direction.fromString(sortType), sort.columnName
)
- return this.bluePrintModelHandler.searchBlueprintModelsByKeyWordPaged(keyWord, pageRequest)
+ return this.bluePrintModelHandler.searchBluePrintModelsByKeyWordPaged(keyWord, pageRequest)
}
@DeleteMapping("/{id}")
@@ -198,7 +198,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
ApiResponse(code = 200, message = "OK"),
ApiResponse(code = 404, message = "RESOURCE_NOT_FOUND")
)
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun deleteBlueprint(
@ApiParam(value = "ID of the blueprint model to delete", required = true, example = "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4")
@@ -218,7 +218,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
ApiResponse(code = 404, message = "Not Found")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun getBlueprintByNameAndVersion(
@ApiParam(value = "Name of the blueprint model", required = true, example = "pnf_netconf") @PathVariable(value = "name") name: String,
@@ -242,7 +242,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
ApiResponse(code = 404, message = "Not Found")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun downloadBlueprintByNameAndVersion(
@ApiParam(value = "Name of the blueprint model", required = true, example = "pnf_netconf") @PathVariable(value = "name") name: String,
@@ -262,7 +262,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
ApiResponse(code = 404, message = "Not Found")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun getBlueprintModel(
@ApiParam(value = "ID of the blueprint model to search for", required = true, example = "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4")
@@ -281,9 +281,9 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
ApiResponse(code = 404, message = "Not Found")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
- suspend fun downloadBlueprint(
+ suspend fun downloadBluePrint(
@ApiParam(value = "ID of the blueprint model to download", required = true, example = "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4")
@PathVariable(value = "id") id: String
): ResponseEntity<Resource> =
@@ -304,7 +304,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
"The enrichment process will complete the package by providing all the definition of types used."
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun enrichBlueprint(
@ApiParam(name = "file", value = "CBA zip file to be uploaded (example: cba_unenriched.zip)", required = true)
@@ -330,7 +330,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
ApiResponse(code = 503, message = "Service Unavailable")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun enrichAndPubishlueprint(
@ApiParam(name = "file", value = "Unenriched CBA zip file to be uploaded (example: cba_unenriched.zip)", required = true)
@@ -346,7 +346,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
response = BlueprintModelSearch::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun publishBlueprint(
@ApiParam(name = "file", value = "Enriched CBA zip file to be uploaded (example: cba_enriched.zip)", required = true)
@@ -405,7 +405,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
"Inputs, outputs and data types of workflow is returned."
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun workflowSpec(
@ApiParam(required = true, value = "Blueprint and workflow identification")
@@ -428,7 +428,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: Blueprint
notes = "Get all available workflows of a Blueprint identified by its name and version."
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun getWorkflowList(
@ApiParam(value = "Name of the blueprint model", example = "pnf_netconf", required = true)
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt
index 5406b7792..741a9115c 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt
@@ -20,9 +20,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.designer.api
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ResourceDictionary
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.DATA_TYPE_JSON
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.DEFAULT_VERSION_NUMBER
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.TOSCA_SPEC
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.DATA_TYPE_JSON
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.DEFAULT_VERSION_NUMBER
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.TOSCA_SPEC
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt
index eb9a98091..3689f735e 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt
@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiOperation
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.ModelTypeHandler
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.mdcWebCoroutineScope
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.springframework.http.MediaType
import org.springframework.web.bind.annotation.DeleteMapping
import org.springframework.web.bind.annotation.GetMapping
@@ -86,7 +86,7 @@ open class ModelTypeController(private val modelTypeHandler: ModelTypeHandler) {
response = ModelType::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveModelType(@RequestBody modelType: ModelType): ModelType = mdcWebCoroutineScope {
modelTypeHandler.saveModel(modelType)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt
index 62997cc1b..8d69ccdde 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt
@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiParam
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ResourceDictionary
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.ResourceDictionaryHandler
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.mdcWebCoroutineScope
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping
import org.springframework.http.MediaType
@@ -50,7 +50,7 @@ open class ResourceDictionaryController(private val resourceDictionaryHandler: R
response = ResourceDictionary::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun getResourceDictionaryByName(
@ApiParam(value = "Name of the resource", required = true, example = "\"hostname\"")
@PathVariable(value = "name") name: String
@@ -69,7 +69,7 @@ open class ResourceDictionaryController(private val resourceDictionaryHandler: R
response = ResourceDictionary::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveResourceDictionary(
@ApiParam(value = "Resource dictionary to store", required = true)
@RequestBody dataDictionary: ResourceDictionary
@@ -90,7 +90,7 @@ open class ResourceDictionaryController(private val resourceDictionaryHandler: R
response = ResourceDefinition::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveResourceDictionary(
@ApiParam(value = "Resource definition to generate", required = true)
@RequestBody resourceDefinition: ResourceDefinition
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintArtifactDefinitionEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintArtifactDefinitionEnhancerImpl.kt
index a85d71f31..c63c7260d 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintArtifactDefinitionEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintArtifactDefinitionEnhancerImpl.kt
@@ -16,50 +16,50 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.stereotype.Service
@Service
-open class BlueprintArtifactDefinitionEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
+open class BluePrintArtifactDefinitionEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
private val resourceAssignmentEnhancerService: ResourceAssignmentEnhancerService
) :
- BlueprintArtifactDefinitionEnhancer {
+ BluePrintArtifactDefinitionEnhancer {
companion object {
const val ARTIFACT_TYPE_MAPPING_SOURCE: String = "artifact-mapping-resource"
}
- private val log = logger(BlueprintArtifactDefinitionEnhancerImpl::class)
+ private val log = logger(BluePrintArtifactDefinitionEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, artifactDefinition: ArtifactDefinition) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, artifactDefinition: ArtifactDefinition) {
log.info("enhancing ArtifactDefinition($name)")
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val artifactTypeName = artifactDefinition.type
- ?: throw BlueprintException("artifact type is missing for ArtifactDefinition($name)")
+ ?: throw BluePrintException("artifact type is missing for ArtifactDefinition($name)")
// Populate Artifact Type
- BlueprintEnhancerUtils.populateArtifactType(bluePrintContext, bluePrintRepoService, artifactTypeName)
+ BluePrintEnhancerUtils.populateArtifactType(bluePrintContext, bluePrintRepoService, artifactTypeName)
when (artifactTypeName) {
ARTIFACT_TYPE_MAPPING_SOURCE -> {
@@ -81,10 +81,10 @@ open class BlueprintArtifactDefinitionEnhancerImpl(
if (!alreadyEnhanced) {
val resourceAssignments: MutableList<ResourceAssignment> = JacksonUtils.getListFromFile(artifactFilePath, ResourceAssignment::class.java)
as? MutableList<ResourceAssignment>
- ?: throw BlueprintProcessorException("couldn't get ResourceAssignment definitions for the file($artifactFilePath)")
+ ?: throw BluePrintProcessorException("couldn't get ResourceAssignment definitions for the file($artifactFilePath)")
// Call Resource Assignment Enhancer
- resourceAssignmentEnhancerService.enhanceBlueprint(bluePrintTypeEnhancerService, bluePrintRuntimeService, resourceAssignments)
+ resourceAssignmentEnhancerService.enhanceBluePrint(bluePrintTypeEnhancerService, bluePrintRuntimeService, resourceAssignments)
bluePrintRuntimeService.put(alreadyEnhancedKey, true.asJsonPrimitive())
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintAttributeDefinitionEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintAttributeDefinitionEnhancerImpl.kt
index cd05c62e1..030fbe8ae 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintAttributeDefinitionEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintAttributeDefinitionEnhancerImpl.kt
@@ -16,40 +16,40 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintAttributeDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-class BlueprintAttributeDefinitionEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+class BluePrintAttributeDefinitionEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintAttributeDefinitionEnhancer {
+ BluePrintAttributeDefinitionEnhancer {
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, attributeDefinition: AttributeDefinition) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, attributeDefinition: AttributeDefinition) {
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val propertyType = attributeDefinition.type
- if (BlueprintTypes.validPrimitiveTypes().contains(propertyType)) {
- } else if (BlueprintTypes.validCollectionTypes().contains(propertyType)) {
+ if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {
+ } else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
val entrySchema = attributeDefinition.entrySchema
- ?: throw BlueprintException("Entry Schema is missing for collection property($name)")
+ ?: throw BluePrintException("Entry Schema is missing for collection property($name)")
- if (!BlueprintTypes.validPrimitiveTypes().contains(entrySchema.type)) {
- BlueprintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, entrySchema.type)
+ if (!BluePrintTypes.validPrimitiveTypes().contains(entrySchema.type)) {
+ BluePrintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, entrySchema.type)
}
} else {
- BlueprintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, propertyType)
+ BluePrintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, propertyType)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImpl.kt
index 7603963a1..8240b1de1 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImpl.kt
@@ -18,16 +18,16 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiDomains
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.onap.ccsdk.cds.controllerblueprints.core.updateErrorMessage
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogCodes
import org.onap.ccsdk.cds.error.catalog.core.utils.errorCauseOrDefault
@@ -36,28 +36,28 @@ import java.io.IOException
import java.util.UUID
@Service
-open class BlueprintEnhancerServiceImpl(
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
+open class BluePrintEnhancerServiceImpl(
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
private val resourceDefinitionEnhancerService: ResourceDefinitionEnhancerService
-) : BlueprintEnhancerService {
+) : BluePrintEnhancerService {
- private val log = logger(BlueprintEnhancerServiceImpl::class)
+ private val log = logger(BluePrintEnhancerServiceImpl::class)
- override suspend fun enhance(basePath: String, enrichedBasePath: String): BlueprintContext {
+ override suspend fun enhance(basePath: String, enrichedBasePath: String): BluePrintContext {
// Copy the Blueprint Content to Target Location
- BlueprintFileUtils.copyBlueprint(basePath, enrichedBasePath)
+ BluePrintFileUtils.copyBluePrint(basePath, enrichedBasePath)
// Enhance the Blueprint
return enhance(enrichedBasePath)
}
- @Throws(BlueprintException::class)
- override suspend fun enhance(basePath: String): BlueprintContext {
+ @Throws(BluePrintException::class)
+ override suspend fun enhance(basePath: String): BluePrintContext {
log.info("Enhancing blueprint($basePath)")
- val blueprintRuntimeService = BlueprintMetadataUtils
- .getBaseEnhancementBlueprintRuntime(UUID.randomUUID().toString(), basePath)
+ val blueprintRuntimeService = BluePrintMetadataUtils
+ .getBaseEnhancementBluePrintRuntime(UUID.randomUUID().toString(), basePath)
try {
@@ -73,15 +73,15 @@ open class BlueprintEnhancerServiceImpl(
)
// Write the Enhanced Blueprint Definitions
- BlueprintFileUtils.writeEnhancedBlueprint(blueprintRuntimeService.bluePrintContext())
+ BluePrintFileUtils.writeEnhancedBluePrint(blueprintRuntimeService.bluePrintContext())
// Write the Enhanced Blueprint Resource Definitions
ResourceDictionaryUtils.writeResourceDefinitionTypes(basePath, resourceDefinitions)
- if (blueprintRuntimeService.getBlueprintError().allErrors().isNotEmpty()) {
- throw BlueprintException(blueprintRuntimeService.getBlueprintError().allErrors().toString())
+ if (blueprintRuntimeService.getBluePrintError().allErrors().isNotEmpty()) {
+ throw BluePrintException(blueprintRuntimeService.getBluePrintError().allErrors().toString())
}
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
val errorMsg = "Error while enriching the CBA package."
throw e.updateErrorMessage(
DesignerApiDomains.DESIGNER_API, errorMsg,
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTemplateEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTemplateEnhancerImpl.kt
index 0dd5ed19a..6ca0b2d14 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTemplateEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTemplateEnhancerImpl.kt
@@ -17,39 +17,39 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintNodeTemplateEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+open class BluePrintNodeTemplateEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintNodeTemplateEnhancer {
+ BluePrintNodeTemplateEnhancer {
- private val log = logger(BlueprintNodeTemplateEnhancerImpl::class)
+ private val log = logger(BluePrintNodeTemplateEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, nodeTemplate: NodeTemplate) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, nodeTemplate: NodeTemplate) {
log.info("***** Enhancing NodeTemplate($name)")
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val nodeTypeName = nodeTemplate.type
// Get NodeType from Repo and Update Service Template
- val nodeType = BlueprintEnhancerUtils.populateNodeType(bluePrintContext, bluePrintRepoService, nodeTypeName)
+ val nodeType = BluePrintEnhancerUtils.populateNodeType(bluePrintContext, bluePrintRepoService, nodeTypeName)
// Enrich NodeType
bluePrintTypeEnhancerService.enhanceNodeType(bluePrintRuntimeService, nodeTypeName, nodeType)
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTypeEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTypeEnhancerImpl.kt
index 4011918f7..bb178b1e6 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTypeEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTypeEnhancerImpl.kt
@@ -16,42 +16,42 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.InterfaceDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.OperationDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintNodeTypeEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
-) : BlueprintNodeTypeEnhancer {
+open class BluePrintNodeTypeEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
+) : BluePrintNodeTypeEnhancer {
- private val log = logger(BlueprintNodeTypeEnhancerImpl::class)
+ private val log = logger(BluePrintNodeTypeEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, nodeType: NodeType) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, nodeType: NodeType) {
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val derivedFrom = nodeType.derivedFrom
- if (!BlueprintTypes.rootNodeTypes().contains(derivedFrom)) {
- val derivedFromNodeType = BlueprintEnhancerUtils.populateNodeType(bluePrintContext, bluePrintRepoService, name)
+ if (!BluePrintTypes.rootNodeTypes().contains(derivedFrom)) {
+ val derivedFromNodeType = BluePrintEnhancerUtils.populateNodeType(bluePrintContext, bluePrintRepoService, name)
// Enrich NodeType
enhance(bluePrintRuntimeService, derivedFrom, derivedFromNodeType)
}
@@ -90,7 +90,7 @@ open class BlueprintNodeTypeEnhancerImpl(
// Populate Requirement Node
requirementDefinition.node?.let { requirementNodeTypeName ->
// Get Requirement NodeType from Repo and Update Service Template
- val requirementNodeType = BlueprintEnhancerUtils.populateNodeType(
+ val requirementNodeType = BluePrintEnhancerUtils.populateNodeType(
bluePrintContext,
bluePrintRepoService, requirementNodeTypeName
)
@@ -99,7 +99,7 @@ open class BlueprintNodeTypeEnhancerImpl(
// Enhance Relationship Type
val relationShipTypeName = requirementDefinition.relationship
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"couldn't get relationship name for the NodeType($nodeTypeName) " +
"Requirement($requirementName)"
)
@@ -152,6 +152,6 @@ open class BlueprintNodeTypeEnhancerImpl(
* Get the Relationship Type from database and add to Blueprint Context
*/
open fun enrichRelationShipType(relationshipName: String) {
- BlueprintEnhancerUtils.populateRelationshipType(bluePrintContext, bluePrintRepoService, relationshipName)
+ BluePrintEnhancerUtils.populateRelationshipType(bluePrintContext, bluePrintRepoService, relationshipName)
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPolicyTypeEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPolicyTypeEnhancerImpl.kt
index d58c82f07..212dc440d 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPolicyTypeEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPolicyTypeEnhancerImpl.kt
@@ -17,25 +17,25 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.controllerblueprints.core.data.PolicyType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPolicyTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPolicyTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-class BlueprintPolicyTypeEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+class BluePrintPolicyTypeEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintPolicyTypeEnhancer {
+ BluePrintPolicyTypeEnhancer {
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, type: PolicyType) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, type: PolicyType) {
this.bluePrintRuntimeService = bluePrintRuntimeService
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPropertyDefinitionEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt
index 4ac52bb17..eb7443443 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPropertyDefinitionEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt
@@ -17,48 +17,48 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPropertyDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintPropertyDefinitionEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+open class BluePrintPropertyDefinitionEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintPropertyDefinitionEnhancer {
+ BluePrintPropertyDefinitionEnhancer {
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, propertyDefinition: PropertyDefinition) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, propertyDefinition: PropertyDefinition) {
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val propertyType = propertyDefinition.type
- if (BlueprintTypes.validPrimitiveTypes().contains(propertyType) ||
- BlueprintTypes.validComplexTypes().contains(propertyType)
+ if (BluePrintTypes.validPrimitiveTypes().contains(propertyType) ||
+ BluePrintTypes.validComplexTypes().contains(propertyType)
) {
// Do Nothing,
- } else if (BlueprintTypes.validCollectionTypes().contains(propertyType)) {
+ } else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
val entrySchema = propertyDefinition.entrySchema
- ?: throw BlueprintException("Entry Schema is missing for collection property($name)")
+ ?: throw BluePrintException("Entry Schema is missing for collection property($name)")
- if (!BlueprintTypes.validPrimitiveTypes().contains(entrySchema.type)) {
- BlueprintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, entrySchema.type)
+ if (!BluePrintTypes.validPrimitiveTypes().contains(entrySchema.type)) {
+ BluePrintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, entrySchema.type)
}
} else {
- BlueprintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, propertyType)
+ BluePrintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, propertyType)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTemplateEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTemplateEnhancerImpl.kt
index cd345a81c..c208f68e5 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTemplateEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTemplateEnhancerImpl.kt
@@ -16,33 +16,33 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRelationshipTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRelationshipTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintRelationshipTemplateEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+open class BluePrintRelationshipTemplateEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintRelationshipTemplateEnhancer {
+ BluePrintRelationshipTemplateEnhancer {
- private val log = logger(BlueprintRelationshipTemplateEnhancerImpl::class)
+ private val log = logger(BluePrintRelationshipTemplateEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
override fun enhance(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
relationshipTemplate: RelationshipTemplate
) {
@@ -53,7 +53,7 @@ open class BlueprintRelationshipTemplateEnhancerImpl(
val relationshipTypeName = relationshipTemplate.type
// Get RelationshipType from Repo and Update Service Template
val relationshipType =
- BlueprintEnhancerUtils.populateRelationshipType(
+ BluePrintEnhancerUtils.populateRelationshipType(
bluePrintContext,
bluePrintRepoService,
relationshipTypeName
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTypeEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTypeEnhancerImpl.kt
index 2216cafb6..b0e166090 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTypeEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTypeEnhancerImpl.kt
@@ -16,33 +16,33 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRelationshipTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRelationshipTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintRelationshipTypeEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
-) : BlueprintRelationshipTypeEnhancer {
+open class BluePrintRelationshipTypeEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
+) : BluePrintRelationshipTypeEnhancer {
- private val log = logger(BlueprintRelationshipTypeEnhancerImpl::class)
+ private val log = logger(BluePrintRelationshipTypeEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
override fun enhance(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
relationshipType: RelationshipType
) {
@@ -51,9 +51,9 @@ open class BlueprintRelationshipTypeEnhancerImpl(
val derivedFrom = relationshipType.derivedFrom
- if (!BlueprintTypes.rootRelationshipTypes().contains(derivedFrom)) {
+ if (!BluePrintTypes.rootRelationshipTypes().contains(derivedFrom)) {
val derivedFromRelationshipType =
- BlueprintEnhancerUtils.populateRelationshipType(bluePrintContext, bluePrintRepoService, name)
+ BluePrintEnhancerUtils.populateRelationshipType(bluePrintContext, bluePrintRepoService, name)
// Enrich RelationshipType
enhance(bluePrintRuntimeService, derivedFrom, derivedFromRelationshipType)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintServiceTemplateEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintServiceTemplateEnhancerImpl.kt
index 80855ce4c..9f4a4592a 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintServiceTemplateEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintServiceTemplateEnhancerImpl.kt
@@ -17,26 +17,26 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintServiceTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintServiceTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintServiceTemplateEnhancerImpl(private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService) :
- BlueprintServiceTemplateEnhancer {
+open class BluePrintServiceTemplateEnhancerImpl(private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService) :
+ BluePrintServiceTemplateEnhancer {
- private val log = logger(BlueprintServiceTemplateEnhancerImpl::class)
+ private val log = logger(BluePrintServiceTemplateEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, type: ServiceTemplate) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, type: ServiceTemplate) {
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTopologyTemplateEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTopologyTemplateEnhancerImpl.kt
index 768f5abe4..750cd0ff4 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTopologyTemplateEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTopologyTemplateEnhancerImpl.kt
@@ -17,25 +17,25 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTopologyTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintTopologyTemplateEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+open class BluePrintTopologyTemplateEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintTopologyTemplateEnhancer {
+ BluePrintTopologyTemplateEnhancer {
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, type: TopologyTemplate) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, type: TopologyTemplate) {
this.bluePrintRuntimeService = bluePrintRuntimeService
enhanceTopologyTemplateInputs(type)
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTypeEnhancerServiceImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTypeEnhancerServiceImpl.kt
index d3b28596c..c27c206fa 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTypeEnhancerServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTypeEnhancerServiceImpl.kt
@@ -16,69 +16,69 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintAttributeDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPolicyTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPropertyDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRelationshipTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRelationshipTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintServiceTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTopologyTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPolicyTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRelationshipTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRelationshipTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintServiceTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowEnhancer
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.ApplicationContext
import org.springframework.stereotype.Service
@Service
-open class BlueprintTypeEnhancerServiceImpl : BlueprintTypeEnhancerService {
+open class BluePrintTypeEnhancerServiceImpl : BluePrintTypeEnhancerService {
@Autowired
private lateinit var context: ApplicationContext
- override fun getServiceTemplateEnhancers(): List<BlueprintServiceTemplateEnhancer> {
- return context.getBeansOfType(BlueprintServiceTemplateEnhancer::class.java).map { it.value }
+ override fun getServiceTemplateEnhancers(): List<BluePrintServiceTemplateEnhancer> {
+ return context.getBeansOfType(BluePrintServiceTemplateEnhancer::class.java).map { it.value }
}
- override fun getTopologyTemplateEnhancers(): List<BlueprintTopologyTemplateEnhancer> {
- return context.getBeansOfType(BlueprintTopologyTemplateEnhancer::class.java).map { it.value }
+ override fun getTopologyTemplateEnhancers(): List<BluePrintTopologyTemplateEnhancer> {
+ return context.getBeansOfType(BluePrintTopologyTemplateEnhancer::class.java).map { it.value }
}
- override fun getWorkflowEnhancers(): List<BlueprintWorkflowEnhancer> {
- return context.getBeansOfType(BlueprintWorkflowEnhancer::class.java).map { it.value }
+ override fun getWorkflowEnhancers(): List<BluePrintWorkflowEnhancer> {
+ return context.getBeansOfType(BluePrintWorkflowEnhancer::class.java).map { it.value }
}
- override fun getNodeTemplateEnhancers(): List<BlueprintNodeTemplateEnhancer> {
- return context.getBeansOfType(BlueprintNodeTemplateEnhancer::class.java).map { it.value }
+ override fun getNodeTemplateEnhancers(): List<BluePrintNodeTemplateEnhancer> {
+ return context.getBeansOfType(BluePrintNodeTemplateEnhancer::class.java).map { it.value }
}
- override fun getNodeTypeEnhancers(): List<BlueprintNodeTypeEnhancer> {
- return context.getBeansOfType(BlueprintNodeTypeEnhancer::class.java).map { it.value }
+ override fun getNodeTypeEnhancers(): List<BluePrintNodeTypeEnhancer> {
+ return context.getBeansOfType(BluePrintNodeTypeEnhancer::class.java).map { it.value }
}
- override fun getRelationshipTemplateEnhancers(): List<BlueprintRelationshipTemplateEnhancer> {
- return context.getBeansOfType(BlueprintRelationshipTemplateEnhancer::class.java).map { it.value }
+ override fun getRelationshipTemplateEnhancers(): List<BluePrintRelationshipTemplateEnhancer> {
+ return context.getBeansOfType(BluePrintRelationshipTemplateEnhancer::class.java).map { it.value }
}
- override fun getRelationshipTypeEnhancers(): List<BlueprintRelationshipTypeEnhancer> {
- return context.getBeansOfType(BlueprintRelationshipTypeEnhancer::class.java).map { it.value }
+ override fun getRelationshipTypeEnhancers(): List<BluePrintRelationshipTypeEnhancer> {
+ return context.getBeansOfType(BluePrintRelationshipTypeEnhancer::class.java).map { it.value }
}
- override fun getArtifactDefinitionEnhancers(): List<BlueprintArtifactDefinitionEnhancer> {
- return context.getBeansOfType(BlueprintArtifactDefinitionEnhancer::class.java).map { it.value }
+ override fun getArtifactDefinitionEnhancers(): List<BluePrintArtifactDefinitionEnhancer> {
+ return context.getBeansOfType(BluePrintArtifactDefinitionEnhancer::class.java).map { it.value }
}
- override fun getPolicyTypeEnhancers(): List<BlueprintPolicyTypeEnhancer> {
- return context.getBeansOfType(BlueprintPolicyTypeEnhancer::class.java).map { it.value }
+ override fun getPolicyTypeEnhancers(): List<BluePrintPolicyTypeEnhancer> {
+ return context.getBeansOfType(BluePrintPolicyTypeEnhancer::class.java).map { it.value }
}
- override fun getPropertyDefinitionEnhancers(): List<BlueprintPropertyDefinitionEnhancer> {
- return context.getBeansOfType(BlueprintPropertyDefinitionEnhancer::class.java).map { it.value }
+ override fun getPropertyDefinitionEnhancers(): List<BluePrintPropertyDefinitionEnhancer> {
+ return context.getBeansOfType(BluePrintPropertyDefinitionEnhancer::class.java).map { it.value }
}
- override fun getAttributeDefinitionEnhancers(): List<BlueprintAttributeDefinitionEnhancer> {
- return context.getBeansOfType(BlueprintAttributeDefinitionEnhancer::class.java).map { it.value }
+ override fun getAttributeDefinitionEnhancers(): List<BluePrintAttributeDefinitionEnhancer> {
+ return context.getBeansOfType(BluePrintAttributeDefinitionEnhancer::class.java).map { it.value }
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintWorkflowEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintWorkflowEnhancerImpl.kt
index 8b19af0a7..dd60acac1 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintWorkflowEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintWorkflowEnhancerImpl.kt
@@ -17,19 +17,19 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowEnhancer
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -38,14 +38,14 @@ import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintWorkflowEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
+open class BluePrintWorkflowEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
private val resourceAssignmentEnhancerService: ResourceAssignmentEnhancerService
) :
- BlueprintWorkflowEnhancer {
+ BluePrintWorkflowEnhancer {
- private val log = logger(BlueprintWorkflowEnhancerImpl::class)
+ private val log = logger(BluePrintWorkflowEnhancerImpl::class)
companion object {
@@ -53,12 +53,12 @@ open class BlueprintWorkflowEnhancerImpl(
const val PROPERTY_DEPENDENCY_NODE_TEMPLATES = "dependency-node-templates"
}
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
private val workflowDataTypes: MutableMap<String, DataType> = hashMapOf()
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, workflow: Workflow) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, workflow: Workflow) {
log.info("##### Enhancing Workflow($name)")
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
@@ -101,14 +101,14 @@ open class BlueprintWorkflowEnhancerImpl(
val derivedFrom = bluePrintContext.nodeTemplateNodeType(firstNodeTemplateName).derivedFrom
when {
- derivedFrom.startsWith(BlueprintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
enhanceStepTargets(name, workflow, firstNodeTemplateName, false)
}
- derivedFrom.startsWith(BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
enhanceStepTargets(name, workflow, firstNodeTemplateName, true)
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"couldn't execute workflow($name) step mapped " +
"to node template($firstNodeTemplateName) derived from($derivedFrom)"
)
@@ -124,7 +124,7 @@ open class BlueprintWorkflowEnhancerImpl(
// Get the Dependent Component Node Template Names
val dependencyNodeTemplateNodes = dgNodeTemplate.properties?.get(PROPERTY_DEPENDENCY_NODE_TEMPLATES)
- ?: throw BlueprintException("couldn't get property($PROPERTY_DEPENDENCY_NODE_TEMPLATES) ")
+ ?: throw BluePrintException("couldn't get property($PROPERTY_DEPENDENCY_NODE_TEMPLATES) ")
dependencyNodeTemplates =
JacksonUtils.getListFromJsonNode(dependencyNodeTemplateNodes, String::class.java)
@@ -175,7 +175,7 @@ open class BlueprintWorkflowEnhancerImpl(
val resourceAssignments: MutableList<ResourceAssignment> = JacksonUtils.getListFromFile(filePath, ResourceAssignment::class.java)
as? MutableList<ResourceAssignment>
- ?: throw BlueprintProcessorException("couldn't get ResourceAssignment definitions for the file($filePath)")
+ ?: throw BluePrintProcessorException("couldn't get ResourceAssignment definitions for the file($filePath)")
val alreadyEnhancedKey = "enhanced-$fileName"
val alreadyEnhanced = bluePrintRuntimeService.check(alreadyEnhancedKey)
@@ -184,7 +184,7 @@ open class BlueprintWorkflowEnhancerImpl(
if (!alreadyEnhanced) {
// Call Resource Assignment Enhancer
- resourceAssignmentEnhancerService.enhanceBlueprint(bluePrintTypeEnhancerService, bluePrintRuntimeService, resourceAssignments)
+ resourceAssignmentEnhancerService.enhanceBluePrint(bluePrintTypeEnhancerService, bluePrintRuntimeService, resourceAssignments)
bluePrintRuntimeService.put(alreadyEnhancedKey, true.asJsonPrimitive())
}
@@ -215,7 +215,7 @@ open class BlueprintWorkflowEnhancerImpl(
dynamicDataType = DataType()
dynamicDataType.version = "1.0.0"
dynamicDataType.description = "Dynamic DataType definition for workflow($workflowName)."
- dynamicDataType.derivedFrom = BlueprintConstants.MODEL_TYPE_DATA_TYPE_DYNAMIC
+ dynamicDataType.derivedFrom = BluePrintConstants.MODEL_TYPE_DATA_TYPE_DYNAMIC
val dataTypeProperties: MutableMap<String, PropertyDefinition> = hashMapOf()
dynamicDataType.properties = dataTypeProperties
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceAssignmentEnhancerService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceAssignmentEnhancerService.kt
index 4d1995d53..621b046e6 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceAssignmentEnhancerService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceAssignmentEnhancerService.kt
@@ -17,11 +17,11 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.service.ResourceDefinitionRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
@@ -37,10 +37,10 @@ import org.springframework.stereotype.Service
*/
interface ResourceAssignmentEnhancerService {
- @Throws(BlueprintException::class)
- fun enhanceBlueprint(
- bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ @Throws(BluePrintException::class)
+ fun enhanceBluePrint(
+ bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
resourceAssignments: List<ResourceAssignment>
)
}
@@ -61,9 +61,9 @@ open class ResourceAssignmentEnhancerServiceImpl(private val resourceDefinitionR
* Get the defined source instance from the ResourceAssignment,
* then get the NodeType of the Sources assigned
*/
- override fun enhanceBlueprint(
- bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ override fun enhanceBluePrint(
+ bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
resourceAssignments: List<ResourceAssignment>
) {
@@ -91,7 +91,7 @@ open class ResourceAssignmentEnhancerServiceImpl(private val resourceDefinitionR
val resourceDefinition: ResourceDefinition = getResourceDefinition(dictionaryName)
val sourceNodeTemplate = resourceDefinition.sources[dictionarySource]
- ?: throw BlueprintException("failed to get assigned dictionarySource($dictionarySource) from resourceDefinition($dictionaryName)")
+ ?: throw BluePrintException("failed to get assigned dictionarySource($dictionarySource) from resourceDefinition($dictionaryName)")
// Enrich as NodeTemplate
bluePrintTypeEnhancerService.enhanceNodeTemplate(bluePrintRuntimeService, dictionarySource, sourceNodeTemplate)
@@ -110,7 +110,7 @@ open class ResourceAssignmentEnhancerServiceImpl(private val resourceDefinitionR
resourceAssignment.dictionarySource.equals(ResourceDictionaryConstants.SOURCE_INPUT) ||
resourceAssignment.dictionarySource.equals(ResourceDictionaryConstants.SOURCE_DEFAULT)
) &&
- BlueprintTypes.validPrimitiveOrCollectionPrimitive(resourceAssignment.property!!)
+ BluePrintTypes.validPrimitiveOrCollectionPrimitive(resourceAssignment.property!!)
)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt
index 08a41f7be..bbec8e685 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt
@@ -21,12 +21,12 @@ import kotlinx.coroutines.Deferred
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.service.ResourceDefinitionRepoService
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils
@@ -34,10 +34,10 @@ import org.springframework.stereotype.Service
interface ResourceDefinitionEnhancerService {
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun enhance(
- bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
- bluePrintRuntimeService: BlueprintRuntimeService<*>
+ bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>
): List<ResourceDefinition>
}
@@ -58,8 +58,8 @@ class ResourceDefinitionEnhancerServiceImpl(private val resourceDefinitionRepoSe
// 3. Collect the Resource Definition for Resource Assignment names from database.
// 4. Create the Resource Definition under blueprint base path.
override fun enhance(
- bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
- bluePrintRuntimeService: BlueprintRuntimeService<*>
+ bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>
): List<ResourceDefinition> {
var resourceDefinitions: List<ResourceDefinition> = mutableListOf()
@@ -77,7 +77,7 @@ class ResourceDefinitionEnhancerServiceImpl(private val resourceDefinitionRepoSe
}
// Get all the Mapping files from all node templates.
- private fun getAllResourceMappingFiles(blueprintContext: BlueprintContext): List<String>? {
+ private fun getAllResourceMappingFiles(blueprintContext: BluePrintContext): List<String>? {
return blueprintContext.nodeTemplates()?.mapNotNull { nodeTemplateMap ->
@@ -91,7 +91,7 @@ class ResourceDefinitionEnhancerServiceImpl(private val resourceDefinitionRepoSe
}
// Convert file content to ResourceAssignments asynchronously
- private fun getResourceDefinition(blueprintContext: BlueprintContext, files: List<String>) = runBlocking {
+ private fun getResourceDefinition(blueprintContext: BluePrintContext, files: List<String>) = runBlocking {
val blueprintBasePath = blueprintContext.rootPath
val deferredResourceAssignments = mutableListOf<Deferred<List<ResourceAssignment>>>()
for (file in files) {
@@ -124,7 +124,7 @@ class ResourceDefinitionEnhancerServiceImpl(private val resourceDefinitionRepoSe
}
private fun enrichResourceDefinitionSources(
- bluePrintContext: BlueprintContext,
+ bluePrintContext: BluePrintContext,
resourceDefinitions: List<ResourceDefinition>
) {
val sources = resourceDefinitions
@@ -138,7 +138,7 @@ class ResourceDefinitionEnhancerServiceImpl(private val resourceDefinitionRepoSe
.flatten().distinct()
log.info("Enriching Resource Definition sources Node Template: $sources")
sources.forEach {
- BlueprintEnhancerUtils.populateNodeType(bluePrintContext, resourceDefinitionRepoService, it)
+ BluePrintEnhancerUtils.populateNodeType(bluePrintContext, resourceDefinitionRepoService, it)
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BlueprintModelHandler.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BluePrintModelHandler.kt
index 42954c16e..7bbaa8c59 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BlueprintModelHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BluePrintModelHandler.kt
@@ -30,25 +30,25 @@ import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.WorkFlowData
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.WorkFlowSpecRequest
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.WorkFlowSpecResponse
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.WorkFlowsResponse
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load.BlueprintDatabaseLoadService
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load.BluePrintDatabaseLoadService
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.deleteNBDir
import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintCompileCache
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.onap.ccsdk.cds.controllerblueprints.core.updateErrorMessage
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogCodes
@@ -77,17 +77,17 @@ import java.util.UUID
*/
@Service
-open class BlueprintModelHandler(
- private val bluePrintDatabaseLoadService: BlueprintDatabaseLoadService,
- private val blueprintsProcessorCatalogService: BlueprintCatalogService,
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
+open class BluePrintModelHandler(
+ private val bluePrintDatabaseLoadService: BluePrintDatabaseLoadService,
+ private val blueprintsProcessorCatalogService: BluePrintCatalogService,
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val blueprintModelSearchRepository: BlueprintModelSearchRepository,
private val blueprintModelRepository: BlueprintModelRepository,
private val blueprintModelContentRepository: BlueprintModelContentRepository,
- private val bluePrintEnhancerService: BlueprintEnhancerService
+ private val bluePrintEnhancerService: BluePrintEnhancerService
) {
- private val log = logger(BlueprintModelHandler::class)
+ private val log = logger(BluePrintModelHandler::class)
open suspend fun bootstrapBlueprint(bootstrapRequest: BootstrapRequest) {
log.info(
@@ -102,11 +102,11 @@ open class BlueprintModelHandler(
bluePrintDatabaseLoadService.initResourceDictionary()
}
if (bootstrapRequest.loadCBA) {
- bluePrintDatabaseLoadService.initBlueprintCatalog()
+ bluePrintDatabaseLoadService.initBluePrintCatalog()
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun prepareWorkFlowSpec(req: WorkFlowSpecRequest):
WorkFlowSpecResponse {
val basePath = blueprintsProcessorCatalogService.getFromDatabase(
@@ -116,7 +116,7 @@ open class BlueprintModelHandler(
)
log.info("blueprint base path $basePath")
- val blueprintContext = BlueprintMetadataUtils.getBlueprintContext(basePath.toString())
+ val blueprintContext = BluePrintMetadataUtils.getBluePrintContext(basePath.toString())
val workFlow = blueprintContext.workflowByName(req.workflowName)
val wfRes = WorkFlowSpecResponse()
@@ -144,7 +144,7 @@ open class BlueprintModelHandler(
return wfRes
}
- private fun addPropertyInfo(propName: String, prop: PropertyDefinition, ctx: BlueprintContext, res: WorkFlowSpecResponse) {
+ private fun addPropertyInfo(propName: String, prop: PropertyDefinition, ctx: BluePrintContext, res: WorkFlowSpecResponse) {
updatePropertyInfo(propName, prop, ctx, res)
addDataType(prop.type, ctx, res)
if (prop.entrySchema != null && prop.entrySchema!!.type != null) {
@@ -152,7 +152,7 @@ open class BlueprintModelHandler(
}
}
- private fun updatePropertyInfo(name: String, prop: PropertyDefinition, ctx: BlueprintContext, res: WorkFlowSpecResponse) {
+ private fun updatePropertyInfo(name: String, prop: PropertyDefinition, ctx: BluePrintContext, res: WorkFlowSpecResponse) {
if (prop.inputparam == null || prop.inputparam == false) {
var workflow = ctx.workflowByName(res.workFlowData.workFlowName)
for ((k, v) in workflow.steps!!) {
@@ -176,7 +176,7 @@ open class BlueprintModelHandler(
}
}
- private fun addDataType(name: String, ctx: BlueprintContext, res: WorkFlowSpecResponse) {
+ private fun addDataType(name: String, ctx: BluePrintContext, res: WorkFlowSpecResponse) {
var data = ctx.dataTypeByName(name)
if (data != null) {
res.dataTypes?.put(name, data)
@@ -184,7 +184,7 @@ open class BlueprintModelHandler(
}
}
- private fun addParentDataType(data: DataType, ctx: BlueprintContext, res: WorkFlowSpecResponse) {
+ private fun addParentDataType(data: DataType, ctx: BluePrintContext, res: WorkFlowSpecResponse) {
if (data.properties != null) {
for ((k, v) in data.properties!!) {
addPropertyInfo(k, v, ctx, res)
@@ -192,7 +192,7 @@ open class BlueprintModelHandler(
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun getWorkflowNames(name: String, version: String): WorkFlowsResponse {
val basePath = blueprintsProcessorCatalogService.getFromDatabase(
name, version
@@ -203,7 +203,7 @@ open class BlueprintModelHandler(
res.blueprintName = name
res.version = version
- val blueprintContext = BlueprintMetadataUtils.getBlueprintContext(
+ val blueprintContext = BluePrintMetadataUtils.getBluePrintContext(
basePath.toString()
)
if (blueprintContext.workflows() != null) {
@@ -235,9 +235,9 @@ open class BlueprintModelHandler(
*
* @param filePart filePart
* @return Mono<BlueprintModelSearch>
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
</BlueprintModelSearch> */
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun saveBlueprintModel(filePart: FilePart): BlueprintModelSearch {
try {
return upload(filePart, false)
@@ -265,12 +265,12 @@ open class BlueprintModelHandler(
* @param name name
* @param version version
* @return BlueprintModelSearch
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun getBlueprintModelSearchByNameAndVersion(name: String, version: String): BlueprintModelSearch? {
return blueprintModelSearchRepository.findByArtifactNameAndArtifactVersion(name, version)
- /*?: throw BlueprintException(
+ /*?: throw BluePrintException(
ErrorCode.RESOURCE_NOT_FOUND.value,
String.format(BLUEPRINT_MODEL_NAME_VERSION_FAILURE_MSG, name, version)
)*/
@@ -282,9 +282,9 @@ open class BlueprintModelHandler(
* @param name name
* @param version version
* @return ResponseEntity<Resource>
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
</Resource> */
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun downloadBlueprintModelFileByNameAndVersion(
name: String,
version: String
@@ -293,7 +293,7 @@ open class BlueprintModelHandler(
val archiveByteArray = download(name, version)
val fileName = "${name}_$version.zip"
return prepareResourceEntity(fileName, archiveByteArray)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
e.http(ErrorCatalogCodes.RESOURCE_NOT_FOUND)
val errorMsg = "Error while downloading the CBA file by Blueprint Name ($name) and Version ($version)."
throw e.updateErrorMessage(
@@ -307,14 +307,14 @@ open class BlueprintModelHandler(
* This is a downloadBlueprintModelFile method to find the target file to download and return a file resource
*
* @return ResponseEntity<Resource>
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
</Resource> */
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun downloadBlueprintModelFile(id: String): ResponseEntity<Resource> {
val blueprintModel: BlueprintModel
try {
blueprintModel = getBlueprintModel(id)
- } catch (e: BlueprintException) {
+ } catch (e: BluePrintException) {
throw httpProcessorException(
ErrorCatalogCodes.RESOURCE_NOT_FOUND, DesignerApiDomains.DESIGNER_API,
"Error while downloading the CBA file: couldn't get blueprint modelby ID ($id)",
@@ -346,9 +346,9 @@ open class BlueprintModelHandler(
*
* @param id id
* @return BlueprintModel
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun getBlueprintModel(id: String): BlueprintModel {
val blueprintModel: BlueprintModel
val dbBlueprintModel = blueprintModelRepository.findById(id)
@@ -367,9 +367,9 @@ open class BlueprintModelHandler(
* @param name name
* @param version version
* @return BlueprintModel
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun getBlueprintModelByNameAndVersion(name: String, version: String): BlueprintModel {
val blueprintModel = blueprintModelRepository
.findByArtifactNameAndArtifactVersion(name, version)
@@ -386,9 +386,9 @@ open class BlueprintModelHandler(
*
* @param id id
* @return BlueprintModelSearch
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun getBlueprintModelSearch(id: String): BlueprintModelSearch {
return blueprintModelSearchRepository.findById(id)
?: throw httpProcessorException(
@@ -398,28 +398,28 @@ open class BlueprintModelHandler(
}
/**
- * This is a searchBlueprintModelsByKeyWord method to retrieve specific BlueprintModel in Database
+ * This is a searchBluePrintModelsByKeyWord method to retrieve specific BlueprintModel in Database
* where keyword equals updatedBy or tags or artifcat name or artifcat version or artifact type
* @author Shaaban Ebrahim
* @param keyWord
*
* @return List<BlueprintModelSearch> list of the controller blueprint
</BlueprintModelSearch> */
- open fun searchBlueprintModelsByKeyWord(keyWord: String): List<BlueprintModelSearch> {
+ open fun searchBluePrintModelsByKeyWord(keyWord: String): List<BlueprintModelSearch> {
return blueprintModelSearchRepository.findByUpdatedByOrTagsOrOrArtifactNameOrOrArtifactVersionOrArtifactType(
keyWord, keyWord, keyWord, keyWord, keyWord
)
}
/**
- * This is a searchBlueprintModelsByKeyWordPagebale method to retrieve specific BlueprintModel in Database
+ * This is a searchBluePrintModelsByKeyWordPagebale method to retrieve specific BlueprintModel in Database
* where keyword equals updatedBy or tags or artifcat name or artifcat version or artifact type and pageable
* @author Shaaban Ebrahim
* @param keyWord
*
* @return List<BlueprintModelSearch> list of the controller blueprint
</BlueprintModelSearch> */
- open fun searchBlueprintModelsByKeyWordPaged(keyWord: String, pageRequest: PageRequest): Page<BlueprintModelSearch> {
+ open fun searchBluePrintModelsByKeyWordPaged(keyWord: String, pageRequest: PageRequest): Page<BlueprintModelSearch> {
return blueprintModelSearchRepository.findByUpdatedByContainingIgnoreCaseOrTagsContainingIgnoreCaseOrArtifactNameContainingIgnoreCaseOrArtifactVersionContainingIgnoreCaseOrArtifactTypeContainingIgnoreCase(
keyWord,
keyWord,
@@ -434,10 +434,10 @@ open class BlueprintModelHandler(
* This is a deleteBlueprintModel method
*
* @param id id
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
@Transactional
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun deleteBlueprintModel(id: String) {
val dbBlueprintModel = blueprintModelRepository.findById(id)
if (dbBlueprintModel.isPresent) {
@@ -463,14 +463,14 @@ open class BlueprintModelHandler(
*
* @param filePart filePart
* @return ResponseEntity<Resource>
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun enrichBlueprint(filePart: FilePart): ResponseEntity<Resource> {
try {
val enhancedByteArray = enrichBlueprintFileSource(filePart)
- return BlueprintEnhancerUtils.prepareResourceEntity("enhanced-cba.zip", enhancedByteArray)
- } catch (e: BlueprintProcessorException) {
+ return BluePrintEnhancerUtils.prepareResourceEntity("enhanced-cba.zip", enhancedByteArray)
+ } catch (e: BluePrintProcessorException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Error while enhancing the CBA package."
throw e.updateErrorMessage(
@@ -491,13 +491,13 @@ open class BlueprintModelHandler(
*
* @param filePart filePart
* @return BlueprintModelSearch
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun publishBlueprint(filePart: FilePart): BlueprintModelSearch {
try {
return upload(filePart, true)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Error in Publishing CBA."
throw e.updateErrorMessage(
@@ -519,14 +519,14 @@ open class BlueprintModelHandler(
*
* @param filePart filePart
* @return BlueprintModelSearch
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun enrichAndPublishBlueprint(filePart: FilePart): BlueprintModelSearch {
try {
val enhancedByteArray = enrichBlueprintFileSource(filePart)
return upload(enhancedByteArray, true)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Error while enhancing and uploading the CBA package."
throw e.updateErrorMessage(
@@ -550,8 +550,8 @@ open class BlueprintModelHandler(
try {
val compressedFile = normalizedFile(blueprintArchive, "cba.zip")
when (fileSource) {
- is FilePart -> BlueprintEnhancerUtils.filePartAsFile(fileSource, compressedFile)
- is ByteArray -> BlueprintEnhancerUtils.byteArrayAsFile(fileSource, compressedFile)
+ is FilePart -> BluePrintEnhancerUtils.filePartAsFile(fileSource, compressedFile)
+ is ByteArray -> BluePrintEnhancerUtils.byteArrayAsFile(fileSource, compressedFile)
}
// Save the Copied file to Database
val blueprintId = blueprintsProcessorCatalogService.saveToDatabase(saveId, compressedFile, validate)
@@ -561,7 +561,7 @@ open class BlueprintModelHandler(
ErrorCatalogCodes.RESOURCE_NOT_FOUND, DesignerApiDomains.DESIGNER_API,
String.format(BLUEPRINT_MODEL_ID_FAILURE_MSG, blueprintId)
)
- } catch (e: BlueprintException) {
+ } catch (e: BluePrintException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Error in Upload CBA."
throw e.updateErrorMessage(
@@ -575,9 +575,9 @@ open class BlueprintModelHandler(
)
} finally {
// Clean blueprint script cache
- val cacheKey = BlueprintFileUtils
+ val cacheKey = BluePrintFileUtils
.compileCacheKey(normalizedPathName(bluePrintLoadConfiguration.blueprintWorkingPath, saveId))
- BlueprintCompileCache.cleanClassLoader(cacheKey)
+ BluePrintCompileCache.cleanClassLoader(cacheKey)
deleteNBDir(blueprintArchive)
deleteNBDir(blueprintWorking)
}
@@ -593,7 +593,7 @@ open class BlueprintModelHandler(
ErrorCatalogCodes.RESOURCE_NOT_FOUND, DesignerApiDomains.DESIGNER_API,
"Error while downloading the CBA file: couldn't get model content"
)
- } catch (e: BlueprintException) {
+ } catch (e: BluePrintException) {
e.http(ErrorCatalogCodes.RESOURCE_NOT_FOUND)
val errorMsg = "Fail to get Blueprint Model content."
throw e.updateErrorMessage(
@@ -612,16 +612,16 @@ open class BlueprintModelHandler(
try {
when (fileSource) {
is FilePart ->
- BlueprintEnhancerUtils
+ BluePrintEnhancerUtils
.copyFilePartToEnhanceDir(fileSource, blueprintArchive, blueprintWorkingDir)
is ByteArray ->
- BlueprintEnhancerUtils
+ BluePrintEnhancerUtils
.copyByteArrayToEnhanceDir(fileSource, blueprintArchive, blueprintWorkingDir)
} // Enhance the Blue Prints
bluePrintEnhancerService.enhance(blueprintWorkingDir)
- return BlueprintEnhancerUtils.compressEnhanceDirAndReturnByteArray(blueprintWorkingDir, blueprintArchive)
- } catch (e: BlueprintException) {
+ return BluePrintEnhancerUtils.compressEnhanceDirAndReturnByteArray(blueprintWorkingDir, blueprintArchive)
+ } catch (e: BluePrintException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Fail Enriching the CBA."
throw e.updateErrorMessage(DesignerApiDomains.DESIGNER_API, errorMsg)
@@ -631,7 +631,7 @@ open class BlueprintModelHandler(
"Error while Enriching the CBA file.", e.errorCauseOrDefault()
)
} finally {
- BlueprintEnhancerUtils.cleanEnhancer(blueprintArchive, blueprintWorkingDir)
+ BluePrintEnhancerUtils.cleanEnhancer(blueprintArchive, blueprintWorkingDir)
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt
index 864fe7ca9..0d94aab27 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt
@@ -21,7 +21,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiDomains
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.repository.ModelTypeRepository
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.ModelTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogCodes
import org.slf4j.LoggerFactory
@@ -68,9 +68,9 @@ open class ModelTypeHandler(private val modelTypeRepository: ModelTypeRepository
*
* @param modelType modelType
* @return ModelType
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun saveModel(modelType: ModelType): ModelType {
lateinit var dbModel: ModelType
ModelTypeValidator.validateModelType(modelType)
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt
index e2e726843..3f06a4a98 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt
@@ -23,7 +23,7 @@ import org.apache.commons.lang3.StringUtils
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiDomains
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ResourceDictionary
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.repository.ResourceDictionaryRepository
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
@@ -40,9 +40,9 @@ class ResourceDictionaryHandler(private val resourceDictionaryRepository: Resour
*
* @param name name
* @return DataDictionary
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun getResourceDictionaryByName(name: String): ResourceDictionary {
Preconditions.checkArgument(StringUtils.isNotBlank(name), "Resource dictionary Name Information is missing.")
val resourceDictionaryDb = resourceDictionaryRepository.findByName(name)
@@ -84,7 +84,7 @@ class ResourceDictionaryHandler(private val resourceDictionaryRepository: Resour
* @param resourceDictionary resourceDictionary
* @return DataDictionary
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveResourceDictionary(resourceDictionary: ResourceDictionary): ResourceDictionary {
var resourceDictionary = resourceDictionary
@@ -133,7 +133,7 @@ class ResourceDictionaryHandler(private val resourceDictionaryRepository: Resour
* @param resourceDefinition ResourceDefinition
* @return ResourceDefinition
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveResourceDefinition(resourceDefinition: ResourceDefinition): ResourceDefinition {
val resourceDictionary = ResourceDictionary()
resourceDictionary.name = resourceDefinition.name
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintCatalogLoadService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintCatalogLoadService.kt
index bcb1ebbed..8d209449c 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintCatalogLoadService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintCatalogLoadService.kt
@@ -21,22 +21,22 @@ import kotlinx.coroutines.Deferred
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import org.apache.commons.lang.text.StrBuilder
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
import java.io.File
import java.util.UUID
@Service
-open class BlueprintCatalogLoadService(private val controllerBlueprintsCatalogService: BlueprintCatalogService) {
+open class BluePrintCatalogLoadService(private val controllerBlueprintsCatalogService: BluePrintCatalogService) {
- private val log = LoggerFactory.getLogger(BlueprintCatalogLoadService::class.java)
+ private val log = LoggerFactory.getLogger(BluePrintCatalogLoadService::class.java)
- open fun loadPathsBlueprintModelCatalog(paths: List<String>) {
- paths.forEach { loadPathBlueprintModelCatalog(it) }
+ open fun loadPathsBluePrintModelCatalog(paths: List<String>) {
+ paths.forEach { loadPathBluePrintModelCatalog(it) }
}
- open fun loadPathBlueprintModelCatalog(path: String) {
+ open fun loadPathBluePrintModelCatalog(path: String) {
val files = File(path).listFiles()
runBlocking {
@@ -45,7 +45,7 @@ open class BlueprintCatalogLoadService(private val controllerBlueprintsCatalogSe
for (file in files) {
deferredResults += async {
- loadBlueprintModelCatalog(errorBuilder, file)
+ loadBluePrintModelCatalog(errorBuilder, file)
}
}
@@ -59,7 +59,7 @@ open class BlueprintCatalogLoadService(private val controllerBlueprintsCatalogSe
}
}
- open suspend fun loadBlueprintModelCatalog(errorBuilder: StrBuilder, file: File) {
+ open suspend fun loadBluePrintModelCatalog(errorBuilder: StrBuilder, file: File) {
try {
controllerBlueprintsCatalogService.saveToDatabase(UUID.randomUUID().toString(), file)
} catch (e: Exception) {
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintDatabaseLoadService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintDatabaseLoadService.kt
index 0534e16a5..02d6ad3c1 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintDatabaseLoadService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintDatabaseLoadService.kt
@@ -18,24 +18,24 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
@Service
-open class BlueprintDatabaseLoadService(
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
+open class BluePrintDatabaseLoadService(
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val modelTypeLoadService: ModelTypeLoadService,
private val resourceDictionaryLoadService: ResourceDictionaryLoadService,
- private val bluePrintCatalogLoadService: BlueprintCatalogLoadService
+ private val bluePrintCatalogLoadService: BluePrintCatalogLoadService
) {
- private val log = LoggerFactory.getLogger(BlueprintDatabaseLoadService::class.java)
+ private val log = LoggerFactory.getLogger(BluePrintDatabaseLoadService::class.java)
open fun init() = runBlocking {
initModelTypes()
initResourceDictionary()
- initBlueprintCatalog()
+ initBluePrintCatalog()
}
open suspend fun initModelTypes() {
@@ -56,12 +56,12 @@ open class BlueprintDatabaseLoadService(
}
}
- open suspend fun initBlueprintCatalog() {
- log.info("cba load from paths(${bluePrintLoadConfiguration.loadBlueprintPaths})")
+ open suspend fun initBluePrintCatalog() {
+ log.info("cba load from paths(${bluePrintLoadConfiguration.loadBluePrintPaths})")
- val paths = bluePrintLoadConfiguration.loadBlueprintPaths?.split(",")
+ val paths = bluePrintLoadConfiguration.loadBluePrintPaths?.split(",")
paths?.let {
- bluePrintCatalogLoadService.loadPathsBlueprintModelCatalog(paths)
+ bluePrintCatalogLoadService.loadPathsBluePrintModelCatalog(paths)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt
index cb7953363..e96daf9f0 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt
@@ -24,8 +24,8 @@ import org.apache.commons.io.FilenameUtils
import org.apache.commons.lang3.text.StrBuilder
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.ModelTypeHandler
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.EntityType
@@ -118,19 +118,19 @@ open class ModelTypeLoadService(private val modelTypeHandler: ModelTypeHandler)
val definitionType: String?
when (T::class) {
DataType::class -> {
- definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
}
RelationshipType::class -> {
- definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE
+ definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE
}
ArtifactType::class -> {
- definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE
+ definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE
}
NodeType::class -> {
- definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE
+ definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE
}
else -> {
- throw BlueprintException("couldn't process model type($classType) definition")
+ throw BluePrintException("couldn't process model type($classType) definition")
}
}
modelType.definitionType = definitionType
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt
index 295e89a9e..15cf3dcb0 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt
@@ -22,7 +22,7 @@ import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.coroutineScope
import org.apache.commons.lang3.text.StrBuilder
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.ResourceDictionaryHandler
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.readNBText
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -75,7 +75,7 @@ open class ResourceDictionaryLoadService(private val resourceDictionaryHandler:
resourceDictionaryHandler.saveResourceDefinition(resourceDefinition)
log.trace("Resource dictionary(${file.name}) loaded successfully ")
} else {
- throw BlueprintException("couldn't get dictionary from content information")
+ throw BluePrintException("couldn't get dictionary from content information")
}
} catch (e: Exception) {
errorBuilder.appendln("Couldn't load Resource dictionary (${file.name}: ${e.message})")
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BlueprintRepoServiceImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BluePrintRepoServiceImpl.kt
index 19f4e61b7..420a9fcd7 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BlueprintRepoServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BluePrintRepoServiceImpl.kt
@@ -22,70 +22,70 @@ import com.google.common.base.Preconditions
import org.apache.commons.lang3.StringUtils
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.repository.ModelTypeRepository
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.repository.ResourceDictionaryRepository
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.springframework.stereotype.Service
-interface ResourceDefinitionRepoService : BlueprintRepoService {
+interface ResourceDefinitionRepoService : BluePrintRepoService {
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun getResourceDefinition(resourceDefinitionName: String): ResourceDefinition
}
@Service
-open class BlueprintRepoFileService(
+open class BluePrintRepoFileService(
private val modelTypeRepository: ModelTypeRepository,
private val resourceDictionaryRepository: ResourceDictionaryRepository
) : ResourceDefinitionRepoService {
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getNodeType(nodeTypeName: String): NodeType {
return getModelType(nodeTypeName, NodeType::class.java)
- ?: throw BlueprintException("couldn't get NodeType($nodeTypeName)")
+ ?: throw BluePrintException("couldn't get NodeType($nodeTypeName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getDataType(dataTypeName: String): DataType {
return getModelType(dataTypeName, DataType::class.java)
- ?: throw BlueprintException("couldn't get DataType($dataTypeName)")
+ ?: throw BluePrintException("couldn't get DataType($dataTypeName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getArtifactType(artifactTypeName: String): ArtifactType {
return getModelType(artifactTypeName, ArtifactType::class.java)
- ?: throw BlueprintException("couldn't get ArtifactType($artifactTypeName)")
+ ?: throw BluePrintException("couldn't get ArtifactType($artifactTypeName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getRelationshipType(relationshipTypeName: String): RelationshipType {
return getModelType(relationshipTypeName, RelationshipType::class.java)
- ?: throw BlueprintException("couldn't get RelationshipType($relationshipTypeName)")
+ ?: throw BluePrintException("couldn't get RelationshipType($relationshipTypeName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getCapabilityDefinition(capabilityDefinitionName: String): CapabilityDefinition {
return getModelType(capabilityDefinitionName, CapabilityDefinition::class.java)
- ?: throw BlueprintException("couldn't get CapabilityDefinition($capabilityDefinitionName)")
+ ?: throw BluePrintException("couldn't get CapabilityDefinition($capabilityDefinitionName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getResourceDefinition(resourceDefinitionName: String): ResourceDefinition {
val dbResourceDictionary = resourceDictionaryRepository.findByName(resourceDefinitionName)
return if (dbResourceDictionary != null) {
dbResourceDictionary.definition
} else {
- throw BlueprintException(String.format("failed to get resource dictionary (%s) from repo", resourceDefinitionName))
+ throw BluePrintException(String.format("failed to get resource dictionary (%s) from repo", resourceDefinitionName))
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
private fun <T> getModelType(modelName: String, valueClass: Class<T>): T? {
Preconditions.checkArgument(
StringUtils.isNotBlank(modelName),
@@ -101,14 +101,14 @@ open class BlueprintRepoFileService(
return JacksonUtils.readValue(modelDefinition, valueClass)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
private fun getModelDefinition(modelName: String): JsonNode {
val modelDefinition: JsonNode
val modelTypeDb = modelTypeRepository.findByModelName(modelName)
if (modelTypeDb != null) {
modelDefinition = modelTypeDb.definition
} else {
- throw BlueprintException(String.format("failed to get model definition (%s) from repo", modelName))
+ throw BluePrintException(String.format("failed to get model definition (%s) from repo", modelName))
}
return modelDefinition
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtils.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtils.kt
index b10b17025..6d72c2741 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtils.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtils.kt
@@ -19,20 +19,20 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils
import kotlinx.coroutines.reactive.awaitSingle
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
import org.onap.ccsdk.cds.controllerblueprints.core.deCompress
import org.onap.ccsdk.cds.controllerblueprints.core.deleteNBDir
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import org.onap.ccsdk.cds.controllerblueprints.core.reCreateNBDirs
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
import org.springframework.core.io.ByteArrayResource
import org.springframework.core.io.Resource
import org.springframework.http.HttpHeaders
@@ -42,58 +42,58 @@ import org.springframework.http.codec.multipart.FilePart
import java.io.File
import java.nio.file.Paths
-class BlueprintEnhancerUtils {
+class BluePrintEnhancerUtils {
companion object {
- val log = logger(BlueprintEnhancerUtils)
+ val log = logger(BluePrintEnhancerUtils)
fun populateDataTypes(
- bluePrintContext: BlueprintContext,
- bluePrintRepoService: BlueprintRepoService,
+ bluePrintContext: BluePrintContext,
+ bluePrintRepoService: BluePrintRepoService,
dataTypeName: String
): DataType {
val dataType = bluePrintContext.serviceTemplate.dataTypes?.get(dataTypeName)
?: bluePrintRepoService.getDataType(dataTypeName)
- ?: throw BlueprintException("couldn't get DataType($dataTypeName) from repo.")
+ ?: throw BluePrintException("couldn't get DataType($dataTypeName) from repo.")
bluePrintContext.serviceTemplate.dataTypes?.put(dataTypeName, dataType)
return dataType
}
fun populateRelationshipType(
- bluePrintContext: BlueprintContext,
- bluePrintRepoService: BlueprintRepoService,
+ bluePrintContext: BluePrintContext,
+ bluePrintRepoService: BluePrintRepoService,
relationshipName: String
): RelationshipType {
val relationshipType = bluePrintContext.serviceTemplate.relationshipTypes?.get(relationshipName)
?: bluePrintRepoService.getRelationshipType(relationshipName)
- ?: throw BlueprintException("couldn't get RelationshipType($relationshipName) from repo.")
+ ?: throw BluePrintException("couldn't get RelationshipType($relationshipName) from repo.")
bluePrintContext.serviceTemplate.relationshipTypes?.put(relationshipName, relationshipType)
return relationshipType
}
fun populateNodeType(
- bluePrintContext: BlueprintContext,
- bluePrintRepoService: BlueprintRepoService,
+ bluePrintContext: BluePrintContext,
+ bluePrintRepoService: BluePrintRepoService,
nodeTypeName: String
): NodeType {
val nodeType = bluePrintContext.serviceTemplate.nodeTypes?.get(nodeTypeName)
?: bluePrintRepoService.getNodeType(nodeTypeName)
- ?: throw BlueprintException("couldn't get NodeType($nodeTypeName) from repo.")
+ ?: throw BluePrintException("couldn't get NodeType($nodeTypeName) from repo.")
bluePrintContext.serviceTemplate.nodeTypes?.put(nodeTypeName, nodeType)
return nodeType
}
fun populateArtifactType(
- bluePrintContext: BlueprintContext,
- bluePrintRepoService: BlueprintRepoService,
+ bluePrintContext: BluePrintContext,
+ bluePrintRepoService: BluePrintRepoService,
artifactTypeName: String
): ArtifactType {
val artifactType = bluePrintContext.serviceTemplate.artifactTypes?.get(artifactTypeName)
?: bluePrintRepoService.getArtifactType(artifactTypeName)
- ?: throw BlueprintException("couldn't get ArtifactType($artifactTypeName) from repo.")
+ ?: throw BluePrintException("couldn't get ArtifactType($artifactTypeName) from repo.")
bluePrintContext.serviceTemplate.artifactTypes?.put(artifactTypeName, artifactType)
return artifactType
}
@@ -154,7 +154,7 @@ class BlueprintEnhancerUtils {
outputFileName: String = "enhanced-cba.zip"
): ByteArray {
val compressedFile = normalizedFile(archiveDir, outputFileName)
- BlueprintArchiveUtils.compress(Paths.get(enhanceDir).toFile(), compressedFile)
+ BluePrintArchiveUtils.compress(Paths.get(enhanceDir).toFile(), compressedFile)
return compressedFile.readBytes()
}
@@ -166,7 +166,7 @@ class BlueprintEnhancerUtils {
):
ResponseEntity<Resource> {
val compressedFile = normalizedFile(archiveDir, outputFileName)
- BlueprintArchiveUtils.compress(Paths.get(enhanceDir).toFile(), compressedFile)
+ BluePrintArchiveUtils.compress(Paths.get(enhanceDir).toFile(), compressedFile)
return prepareResourceEntity(compressedFile)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
index 78f9e1688..08de136d8 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
@@ -18,9 +18,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils
import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
@@ -41,25 +41,25 @@ class ModelTypeValidator {
fun validateModelTypeDefinition(definitionType: String, definitionContent: JsonNode): Boolean {
when (definitionType) {
- BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE -> {
JacksonUtils.readValue(definitionContent, DataType::class.java)
- ?: throw BlueprintException("Model type definition is not DataType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not DataType valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE -> {
JacksonUtils.readValue(definitionContent, NodeType::class.java)
- ?: throw BlueprintException("Model type definition is not NodeType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not NodeType valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE -> {
JacksonUtils.readValue(definitionContent, ArtifactType::class.java)
- ?: throw BlueprintException("Model type definition is not ArtifactType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not ArtifactType valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE -> {
JacksonUtils.readValue(definitionContent, CapabilityDefinition::class.java)
- ?: throw BlueprintException("Model type definition is not CapabilityDefinition valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not CapabilityDefinition valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE -> {
JacksonUtils.readValue(definitionContent, RelationshipType::class.java)
- ?: throw BlueprintException("Model type definition is not RelationshipType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not RelationshipType valid content $definitionContent")
}
}
return true
@@ -74,7 +74,7 @@ class ModelTypeValidator {
fun validateModelType(modelType: ModelType?): Boolean {
checkNotNull(modelType) { "Model Type Information is missing." }
- val validRootTypes = BlueprintTypes.validModelTypes()
+ val validRootTypes = BluePrintTypes.validModelTypes()
check(validRootTypes.contains(modelType.definitionType)) {
"Not Valid Model Root Type(${modelType.definitionType}), It should be $validRootTypes"
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandlerTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandlerTest.kt
index ed60f721a..a2f208367 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandlerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandlerTest.kt
@@ -30,15 +30,15 @@ import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.TokenAuthGrpcClientSe
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.compress
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementServiceGrpc
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput
import org.onap.ccsdk.cds.controllerblueprints.management.api.DownloadAction
import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk
import org.onap.ccsdk.cds.controllerblueprints.management.api.RemoveAction
@@ -58,13 +58,13 @@ import kotlin.test.assertTrue
classes = [DesignerApiTestConfiguration::class, ErrorCatalogTestConfiguration::class]
)
@TestPropertySource(locations = ["classpath:application-test.properties"])
-class BlueprintManagementGRPCHandlerTest {
+class BluePrintManagementGRPCHandlerTest {
@get:Rule
val grpcServerRule = GrpcServerRule().directExecutor()
@Autowired
- lateinit var bluePrintManagementGRPCHandler: BlueprintManagementGRPCHandler
+ lateinit var bluePrintManagementGRPCHandler: BluePrintManagementGRPCHandler
@BeforeTest
fun init() {
@@ -86,13 +86,13 @@ class BlueprintManagementGRPCHandlerTest {
@Test
fun testBootstrap() {
- val blockingStub = BlueprintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
+ val blockingStub = BluePrintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
val id = "123_Bootstrap"
val req = createBootstrapInputRequest(id)
val bootstrapOutput = blockingStub.bootstrapBlueprint(req)
assertEquals(200, bootstrapOutput.status.code)
assertTrue(
- bootstrapOutput.status.message!!.contentEquals(BlueprintConstants.STATUS_SUCCESS),
+ bootstrapOutput.status.message!!.contentEquals(BluePrintConstants.STATUS_SUCCESS),
"failed to get success status"
)
assertEquals(EventType.EVENT_COMPONENT_EXECUTED, bootstrapOutput.status.eventType)
@@ -101,14 +101,14 @@ class BlueprintManagementGRPCHandlerTest {
@Test
fun `test upload and download blueprint`() {
- val blockingStub = BlueprintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
+ val blockingStub = BluePrintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
val id = "123_upload"
val req = createUploadInputRequest(id, UploadAction.PUBLISH.toString())
val output = blockingStub.uploadBlueprint(req)
assertEquals(200, output.status.code)
assertTrue(
- output.status.message!!.contentEquals(BlueprintConstants.STATUS_SUCCESS),
+ output.status.message!!.contentEquals(BluePrintConstants.STATUS_SUCCESS),
"failed to get success status"
)
assertEquals(EventType.EVENT_COMPONENT_EXECUTED, output.status.eventType)
@@ -120,7 +120,7 @@ class BlueprintManagementGRPCHandlerTest {
val downloadOutput = blockingStub.downloadBlueprint(downloadReq)
assertEquals(200, downloadOutput.status.code)
assertTrue(
- downloadOutput.status.message!!.contentEquals(BlueprintConstants.STATUS_SUCCESS),
+ downloadOutput.status.message!!.contentEquals(BluePrintConstants.STATUS_SUCCESS),
"failed to get success status"
)
assertEquals(EventType.EVENT_COMPONENT_EXECUTED, downloadOutput.status.eventType)
@@ -130,14 +130,14 @@ class BlueprintManagementGRPCHandlerTest {
@Test
fun `test delete blueprint`() {
- val blockingStub = BlueprintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
+ val blockingStub = BluePrintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
val id = "123_delete"
val req = createUploadInputRequest(id, UploadAction.DRAFT.toString())
var output = blockingStub.uploadBlueprint(req)
assertEquals(200, output.status.code)
assertTrue(
- output.status.message!!.contentEquals(BlueprintConstants.STATUS_SUCCESS),
+ output.status.message!!.contentEquals(BluePrintConstants.STATUS_SUCCESS),
"failed to get success status"
)
assertEquals(id, output.commonHeader.requestId)
@@ -160,7 +160,7 @@ class BlueprintManagementGRPCHandlerTest {
val basicAuthGrpcClientService = TokenAuthGrpcClientService(tokenAuthGrpcClientProperties)
val channel = basicAuthGrpcClientService.channel()
- val blockingStub = BlueprintManagementServiceGrpc.newBlockingStub(channel)
+ val blockingStub = BluePrintManagementServiceGrpc.newBlockingStub(channel)
val bluePrintUploadInput = createUploadInputRequest("12345", UploadAction.DRAFT.toString())
@@ -169,7 +169,7 @@ class BlueprintManagementGRPCHandlerTest {
}
}
- private fun createBootstrapInputRequest(id: String): BlueprintBootstrapInput {
+ private fun createBootstrapInputRequest(id: String): BluePrintBootstrapInput {
val commonHeader = CommonHeader
.newBuilder()
.setTimestamp("2012-04-23T18:25:43.511Z")
@@ -177,7 +177,7 @@ class BlueprintManagementGRPCHandlerTest {
.setRequestId(id)
.setSubRequestId("1234-56").build()
- return BlueprintBootstrapInput.newBuilder()
+ return BluePrintBootstrapInput.newBuilder()
.setCommonHeader(commonHeader)
.setLoadModelType(false)
.setLoadResourceDictionary(false)
@@ -185,7 +185,7 @@ class BlueprintManagementGRPCHandlerTest {
.build()
}
- private fun createUploadInputRequest(id: String, action: String): BlueprintUploadInput {
+ private fun createUploadInputRequest(id: String, action: String): BluePrintUploadInput {
val file = normalizedFile("./target/blueprints/generated-cba.zip")
assertTrue(file.exists(), "couldnt get file ${file.absolutePath}")
@@ -205,14 +205,14 @@ class BlueprintManagementGRPCHandlerTest {
val fileChunk = FileChunk.newBuilder().setChunk(ByteString.copyFrom(file.inputStream().readBytes()))
.build()
- return BlueprintUploadInput.newBuilder()
+ return BluePrintUploadInput.newBuilder()
.setCommonHeader(commonHeader)
.setActionIdentifiers(actionIdentifier)
.setFileChunk(fileChunk)
.build()
}
- private fun createDownloadInputRequest(id: String, action: String): BlueprintDownloadInput {
+ private fun createDownloadInputRequest(id: String, action: String): BluePrintDownloadInput {
val commonHeader = CommonHeader
.newBuilder()
.setTimestamp("2012-04-23T18:25:43.511Z")
@@ -220,7 +220,7 @@ class BlueprintManagementGRPCHandlerTest {
.setRequestId(id)
.setSubRequestId("1234-56").build()
- return BlueprintDownloadInput.newBuilder()
+ return BluePrintDownloadInput.newBuilder()
.setCommonHeader(commonHeader)
.setActionIdentifiers(
ActionIdentifiers.newBuilder()
@@ -231,7 +231,7 @@ class BlueprintManagementGRPCHandlerTest {
.build()
}
- private fun createRemoveInputRequest(id: String): BlueprintRemoveInput {
+ private fun createRemoveInputRequest(id: String): BluePrintRemoveInput {
val commonHeader = CommonHeader
.newBuilder()
.setTimestamp("2012-04-23T18:25:43.511Z")
@@ -239,7 +239,7 @@ class BlueprintManagementGRPCHandlerTest {
.setRequestId(id)
.setSubRequestId("1234-56").build()
- return BlueprintRemoveInput.newBuilder()
+ return BluePrintRemoveInput.newBuilder()
.setCommonHeader(commonHeader)
.setActionIdentifiers(
ActionIdentifiers.newBuilder()
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt
index 92f369b01..a42ac05e7 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt
@@ -28,7 +28,7 @@ import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelSearch
import org.onap.ccsdk.cds.controllerblueprints.core.compress
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
@@ -79,7 +79,7 @@ class BlueprintModelControllerTest {
@Autowired
lateinit var webTestClient: WebTestClient
- private var bluePrintLoadConfiguration: BlueprintLoadConfiguration? = null
+ private var bluePrintLoadConfiguration: BluePrintLoadConfiguration? = null
private val blueprintDir = "./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
private var zipBlueprintFileName: String? = null
@@ -90,7 +90,7 @@ class BlueprintModelControllerTest {
fun setUp() {
assertNotNull(webTestClient, " Failed to create WebTestClient")
- bluePrintLoadConfiguration = BlueprintLoadConfiguration().apply {
+ bluePrintLoadConfiguration = BluePrintLoadConfiguration().apply {
blueprintArchivePath = "./target/blueprints/archive"
blueprintWorkingPath = "./target/blueprints/work"
blueprintDeployPath = "./target/blueprints/deploy"
@@ -113,7 +113,7 @@ class BlueprintModelControllerTest {
}
@Test
- fun test01_saveBlueprint() {
+ fun test01_saveBluePrint() {
bp = runBlocking {
val body = MultipartBodyBuilder().apply {
part(
@@ -146,7 +146,7 @@ class BlueprintModelControllerTest {
@Test
@Throws(JSONException::class)
- fun test02_getBlueprintByNameAndVersion() {
+ fun test02_getBluePrintByNameAndVersion() {
webTestClient(
HttpMethod.GET, null,
"/api/v1/blueprint-model/by-name/${bp!!.artifactName}/version/${bp!!.artifactVersion}",
@@ -172,7 +172,7 @@ class BlueprintModelControllerTest {
@Test
@Throws(JSONException::class)
- fun test05_downloadBlueprint() {
+ fun test05_downloadBluePrint() {
webTestClient(
HttpMethod.GET, null,
"/api/v1/blueprint-model/download/${bp!!.id}",
@@ -237,7 +237,7 @@ class BlueprintModelControllerTest {
}
@Test
- fun test10_deleteBlueprint() {
+ fun test10_deleteBluePrint() {
// webTestClient.delete().uri("/api/v1/blueprint-model/${bp!!.id}")
// .header("Authorization", "Basic " + Base64Utils
// .encodeToString(("ccsdkapps" + ":" + "ccsdkapps").toByteArray(UTF_8)))
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt
index bcce13e4c..8226aaad0 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt
@@ -23,7 +23,7 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
@@ -56,15 +56,15 @@ class ModelTypeControllerTest {
val content = JacksonUtils.getClassPathFileContent("model_type/data_type/datatype-property.json")
var modelType = ModelType()
- modelType.definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
- modelType.derivedFrom = BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT
+ modelType.definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ modelType.derivedFrom = BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT
modelType.description = "Definition for Sample Datatype "
modelType.definition = JacksonUtils.jsonNode(content)
modelType.modelName = modelName
modelType.version = "1.0.0"
modelType.tags = (
- "test-datatype ," + BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
- BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ "test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
)
modelType.updatedBy = "xxxxxx@xxx.com"
modelType = modelTypeController.saveModelType(modelType)
@@ -108,7 +108,7 @@ class ModelTypeControllerTest {
Assert.assertNotNull("Failed to get Id for api call getModelByName ", dbModelType!!.modelName)
val dbDatatypeModelTypes =
- modelTypeController.getModelTypeByDefinitionType(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
+ modelTypeController.getModelTypeByDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
Assert.assertNotNull("Failed to find getModelTypeByDefinitionType by tags", dbDatatypeModelTypes)
Assert.assertTrue("Failed to find getModelTypeByDefinitionType by count", dbDatatypeModelTypes.isNotEmpty())
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/TestDatabaseConfiguration.kt
index 7fcea4dcc..6808a2717 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/TestDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
import org.springframework.context.annotation.Bean
@@ -29,7 +29,7 @@ import org.springframework.transaction.PlatformTransactionManager
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = [
"org.onap.ccsdk.cds.blueprintsprocessor.db.primary",
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImplTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImplTest.kt
index 8bdfbbb22..a866dcad3 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImplTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImplTest.kt
@@ -25,8 +25,8 @@ import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfig
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load.ModelTypeLoadService
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load.ResourceDictionaryLoadService
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -38,7 +38,7 @@ import org.springframework.test.context.junit4.SpringRunner
classes = [DesignerApiTestConfiguration::class]
)
@TestPropertySource(locations = ["classpath:application-test.properties"])
-class BlueprintEnhancerServiceImplTest {
+class BluePrintEnhancerServiceImplTest {
@Autowired
lateinit var modelTypeLoadService: ModelTypeLoadService
@@ -47,10 +47,10 @@ class BlueprintEnhancerServiceImplTest {
lateinit var resourceDictionaryLoadService: ResourceDictionaryLoadService
@Autowired
- lateinit var bluePrintEnhancerService: BlueprintEnhancerService
+ lateinit var bluePrintEnhancerService: BluePrintEnhancerService
@Autowired
- lateinit var bluePrintValidatorService: BlueprintValidatorService
+ lateinit var bluePrintValidatorService: BluePrintValidatorService
@Test
@Throws(Exception::class)
@@ -100,8 +100,8 @@ class BlueprintEnhancerServiceImplTest {
val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)
- // Validate the Generated Blueprints
- val valid = bluePrintValidatorService.validateBlueprints(targetPath)
+ // Validate the Generated BluePrints
+ val valid = bluePrintValidatorService.validateBluePrints(targetPath)
Assert.assertTrue("blueprint($basePath) validation failed ", valid)
// Enable this to get the enhanced zip file
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt
index 3112bfb66..8ee2eb3a2 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
@@ -57,15 +57,15 @@ class ModelTypeServiceTest {
val content = JacksonUtils.getClassPathFileContent("model_type/data_type/datatype-property.json")
var modelType = ModelType()
- modelType.definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
- modelType.derivedFrom = BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT
+ modelType.definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ modelType.derivedFrom = BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT
modelType.description = "Definition for Sample Datatype "
modelType.definition = JacksonUtils.jsonNode(content)
modelType.modelName = modelName
modelType.version = "1.0.0"
modelType.tags = (
- "test-datatype ," + BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
- BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ "test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
)
modelType.updatedBy = "xxxxxx@xxx.com"
modelType = modelTypeHandler!!.saveModel(modelType)
@@ -110,11 +110,11 @@ class ModelTypeServiceTest {
Assert.assertNotNull("Failed to get response for api call getModelByName ", dbModelType)
Assert.assertNotNull("Failed to get Id for api call getModelByName ", dbModelType!!.modelName)
- val dbDatatypeModelTypes = modelTypeHandler.getModelTypeByDefinitionType(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
+ val dbDatatypeModelTypes = modelTypeHandler.getModelTypeByDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
Assert.assertNotNull("Failed to find getModelTypeByDefinitionType by tags", dbDatatypeModelTypes)
Assert.assertTrue("Failed to find getModelTypeByDefinitionType by count", dbDatatypeModelTypes.size > 0)
- val dbModelTypeByDerivedFroms = modelTypeHandler.getModelTypeByDerivedFrom(BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT)
+ val dbModelTypeByDerivedFroms = modelTypeHandler.getModelTypeByDerivedFrom(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT)
Assert.assertNotNull("Failed to find getModelTypeByDerivedFrom by tags", dbModelTypeByDerivedFroms)
Assert.assertTrue("Failed to find getModelTypeByDerivedFrom by count", dbModelTypeByDerivedFroms.size > 0)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt
index 9bc8c6291..ca85ed22f 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt
@@ -23,7 +23,7 @@ import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
@@ -59,15 +59,15 @@ class ModelTypeReactRepositoryTest {
val content = normalizedFile("./src/test/resources/model_type/data_type/datatype-property.json")
.readText(Charset.defaultCharset())
val modelType = ModelType()
- modelType.definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
- modelType.derivedFrom = BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT
+ modelType.definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ modelType.derivedFrom = BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT
modelType.description = "Definition for Sample Datatype "
modelType.definition = JacksonUtils.jsonNode(content)
modelType.modelName = modelName
modelType.version = "1.0.0"
modelType.tags = (
- "test-datatype ," + BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
- BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ "test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
)
modelType.updatedBy = "xxxxxx@xxx.com"
@@ -81,11 +81,11 @@ class ModelTypeReactRepositoryTest {
Assert.assertNotNull("Failed to findByModelName ", dbFindByModelName)
val dbFindByDefinitionType =
- modelTypeReactRepository.findByDefinitionType(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE).collectList().block()
+ modelTypeReactRepository.findByDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE).collectList().block()
Assert.assertNotNull("Failed to findByDefinitionType ", dbFindByDefinitionType)
Assert.assertTrue("Failed to findByDefinitionType count", dbFindByDefinitionType!!.size > 0)
- val dbFindByDerivedFrom = modelTypeReactRepository.findByDerivedFrom(BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT).collectList().block()
+ val dbFindByDerivedFrom = modelTypeReactRepository.findByDerivedFrom(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT).collectList().block()
Assert.assertNotNull("Failed to find findByDerivedFrom", dbFindByDerivedFrom)
Assert.assertTrue("Failed to find findByDerivedFrom by count", dbFindByDerivedFrom!!.size > 0)
@@ -94,12 +94,12 @@ class ModelTypeReactRepositoryTest {
Assert.assertTrue("Failed to findByModelNameIn by count", dbFindByModelNameIn!!.size > 0)
val dbFindByDefinitionTypeIn =
- modelTypeReactRepository.findByDefinitionTypeIn(Arrays.asList(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)).collectList().block()
+ modelTypeReactRepository.findByDefinitionTypeIn(Arrays.asList(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)).collectList().block()
Assert.assertNotNull("Failed to findByDefinitionTypeIn", dbFindByDefinitionTypeIn)
Assert.assertTrue("Failed to findByDefinitionTypeIn by count", dbFindByDefinitionTypeIn!!.size > 0)
val dbFindByDerivedFromIn =
- modelTypeReactRepository.findByDerivedFromIn(Arrays.asList(BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT)).collectList().block()
+ modelTypeReactRepository.findByDerivedFromIn(Arrays.asList(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT)).collectList().block()
Assert.assertNotNull("Failed to find findByDerivedFromIn", dbFindByDerivedFromIn)
Assert.assertTrue("Failed to find findByDerivedFromIn by count", dbFindByDerivedFromIn!!.size > 0)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtilsTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtilsTest.kt
index 461af84c4..c644aeedd 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtilsTest.kt
@@ -29,7 +29,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.reCreateDirs
import java.util.UUID
import kotlin.test.assertTrue
-class BlueprintEnhancerUtilsTest {
+class BluePrintEnhancerUtilsTest {
private val blueprintDir = "./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
private val blueprintArchivePath: String = "./target/blueprints/archive"
@@ -61,8 +61,8 @@ class BlueprintEnhancerUtilsTest {
val enhanceId = UUID.randomUUID().toString()
val blueprintArchiveLocation = normalizedPathName(blueprintArchivePath, enhanceId)
val blueprintEnrichmentLocation = normalizedPathName(blueprintEnrichmentPath, enhanceId)
- BlueprintEnhancerUtils.copyFilePartToEnhanceDir(filePart, blueprintArchiveLocation, blueprintEnrichmentLocation)
- BlueprintEnhancerUtils.compressEnhanceDirAndReturnFilePart(blueprintEnrichmentLocation, blueprintArchiveLocation)
+ BluePrintEnhancerUtils.copyFilePartToEnhanceDir(filePart, blueprintArchiveLocation, blueprintEnrichmentLocation)
+ BluePrintEnhancerUtils.compressEnhanceDirAndReturnFilePart(blueprintEnrichmentLocation, blueprintArchiveLocation)
}
}
}