Refactor resource dictionary entity and repositories. 05/94705/1
authorBrinda Santh <brindasanth@in.ibm.com>
Fri, 30 Aug 2019 19:01:12 +0000 (15:01 -0400)
committerBrinda Santh <brindasanth@in.ibm.com>
Fri, 30 Aug 2019 19:01:12 +0000 (15:01 -0400)
Change-Id: I156d63df70d04e129e4a753cdc11e119ee97d37a
Issue-ID: CCSDK-1663
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
28 files changed:
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ControllerBlueprintExceptionHandler.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/domain/JpaJsonNodeConverter.kt [moved from ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/domain/JpaJsonNodeConverter.java with 57% similarity]
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/domain/JpaResourceDefinitionConverter.kt [moved from ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/domain/JpaResourceDefinitionConverter.java with 57% similarity]
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/domain/ModelType.kt [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/domain/ResourceDictionary.kt [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/BluePrintsReactRepository.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeRepository.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ResourceDictionaryRepository.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/ApplicationRegistrationService.kt [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/AutoResourceMappingService.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ResourceDictionaryRepositoryTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidatorTest.kt
ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/ApplicationRegistrationService.java [deleted file]
ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/ErrorMessage.java [deleted file]
ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/domain/ModelType.java [deleted file]
ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/domain/ResourceDictionary.java [deleted file]
ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/model/AutoMapResponse.java [deleted file]

index f4dabcd..0d2a7b7 100644 (file)
@@ -18,7 +18,6 @@ package org.onap.ccsdk.cds.blueprintsprocessor.designer.api
 
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode
-import org.onap.ccsdk.cds.controllerblueprints.service.common.ErrorMessage
 import org.slf4j.LoggerFactory
 import org.springframework.http.HttpStatus
 import org.springframework.http.ResponseEntity
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
new file mode 100644 (file)
index 0000000..5259ee1
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ *  Copyright © 2019 IBM.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.onap.ccsdk.cds.blueprintsprocessor.designer.api
+
+import com.fasterxml.jackson.annotation.JsonFormat
+import com.fasterxml.jackson.annotation.JsonInclude
+import com.fasterxml.jackson.annotation.JsonTypeInfo
+import com.fasterxml.jackson.annotation.JsonTypeName
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ResourceDictionary
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import java.io.Serializable
+import java.util.*
+
+/**
+ * ArtifactRequest.java Purpose: Provide Configuration Generator ArtifactRequest Model
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+class AutoMapResponse {
+    var resourceAssignments: List<ResourceAssignment>? = null
+    var dataDictionaries: List<ResourceDictionary>? = null
+}
+
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonTypeName("errorMessage")
+@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
+class ErrorMessage(var message: String?, var code: Int?, var debugMessage: String?) : Serializable {
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+    var timestamp = Date()
+}
\ No newline at end of file
index 4c2ec6a..bac2813 100644 (file)
@@ -20,7 +20,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.designer.api
 import kotlinx.coroutines.runBlocking
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.ModelTypeHandler
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
 import org.springframework.http.MediaType
 import org.springframework.web.bind.annotation.*
 
index 89744dd..bae890a 100644 (file)
 package org.onap.ccsdk.cds.blueprintsprocessor.designer.api
 
 import kotlinx.coroutines.runBlocking
+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.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary
 import org.springframework.http.MediaType
 import org.springframework.web.bind.annotation.*
 
  *  limitations under the License.
  */
 
-package org.onap.ccsdk.cds.controllerblueprints.service.domain;
+package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain
 
-import com.fasterxml.jackson.databind.JsonNode;
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
+import com.fasterxml.jackson.databind.JsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+
+import javax.persistence.AttributeConverter
+import javax.persistence.Converter
 
-import javax.persistence.AttributeConverter;
-import javax.persistence.Converter;
 /**
  * @author Brinda Santh
  */
 @Converter
-public class JpaJsonNodeConverter implements
-        AttributeConverter<JsonNode, String> {
+class JpaJsonNodeConverter : AttributeConverter<JsonNode, String> {
 
-    @Override
-    public String convertToDatabaseColumn(JsonNode node) {
-        return JacksonUtils.Companion.getJson(node, true);
+    override fun convertToDatabaseColumn(node: JsonNode): String {
+        return JacksonUtils.getJson(node, true)
     }
 
-    @Override
-    public JsonNode convertToEntityAttribute(String dbData) {
-        return JacksonUtils.Companion.jsonNode(dbData);
+    override fun convertToEntityAttribute(dbData: String): JsonNode {
+        return JacksonUtils.jsonNode(dbData)
     }
 }
\ No newline at end of file
  *  limitations under the License.
  */
 
-package org.onap.ccsdk.cds.controllerblueprints.service.domain;
+package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain
 
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
-import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition;
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+
+import javax.persistence.AttributeConverter
+import javax.persistence.Converter
 
-import javax.persistence.AttributeConverter;
-import javax.persistence.Converter;
 /**
  * @author Brinda Santh
  */
 @Converter
-public class JpaResourceDefinitionConverter implements
-        AttributeConverter<ResourceDefinition, String> {
-    @Override
-    public String convertToDatabaseColumn(ResourceDefinition resourceDefinition) {
-        return JacksonUtils.Companion.getJson(resourceDefinition);
+class JpaResourceDefinitionConverter : AttributeConverter<ResourceDefinition, String> {
+    override fun convertToDatabaseColumn(resourceDefinition: ResourceDefinition): String {
+        return JacksonUtils.getJson(resourceDefinition)
     }
 
-    @Override
-    public ResourceDefinition convertToEntityAttribute(String content) {
-        return JacksonUtils.Companion.readValue(content, ResourceDefinition.class);
+    override fun convertToEntityAttribute(content: String): ResourceDefinition? {
+        return JacksonUtils.readValue(content, ResourceDefinition::class.java)
     }
 }
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/domain/ModelType.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/domain/ModelType.kt
new file mode 100644 (file)
index 0000000..a964e04
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ *  Copyright © 2019 IBM.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain
+
+import com.fasterxml.jackson.annotation.JsonFormat
+import com.fasterxml.jackson.databind.JsonNode
+import io.swagger.annotations.ApiModelProperty
+import org.springframework.data.annotation.LastModifiedDate
+import org.springframework.data.jpa.domain.support.AuditingEntityListener
+import java.io.Serializable
+import java.util.*
+import javax.persistence.*
+
+/**
+ * Provide ModelType Entity
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+@EntityListeners(AuditingEntityListener::class)
+@Entity
+@Table(name = "MODEL_TYPE")
+class ModelType : Serializable {
+
+    @Id
+    @Column(name = "model_name", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var modelName: String
+
+    @Column(name = "derived_from", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var derivedFrom: String
+
+    @Column(name = "definition_type", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var definitionType: String
+
+    @Lob
+    @Convert(converter = JpaJsonNodeConverter::class)
+    @Column(name = "definition", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var definition: JsonNode
+
+    @Lob
+    @Column(name = "description", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var description: String
+
+    @Column(name = "version", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var version: String
+
+    @Lob
+    @Column(name = "tags", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var tags: String
+
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+    @LastModifiedDate
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name = "creation_date")
+    var creationDate: Date? = null
+
+    @Column(name = "updated_by", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var updatedBy: String
+
+    override fun toString(): String {
+        return "[" + "modelName = " + modelName +
+                ", derivedFrom = " + derivedFrom +
+                ", definitionType = " + definitionType +
+                ", description = " + description +
+                ", creationDate = " + creationDate +
+                ", version = " + version +
+                ", updatedBy = " + updatedBy +
+                ", tags = " + tags +
+                "]"
+    }
+
+    companion object {
+        private const val serialVersionUID = 1L
+    }
+}
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/domain/ResourceDictionary.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/domain/ResourceDictionary.kt
new file mode 100644 (file)
index 0000000..ac5ea20
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ *  Copyright © 2019 IBM.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain
+
+import com.fasterxml.jackson.annotation.JsonFormat
+import io.swagger.annotations.ApiModelProperty
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+import org.springframework.data.annotation.LastModifiedDate
+import org.springframework.data.jpa.domain.support.AuditingEntityListener
+import java.io.Serializable
+import java.util.*
+import javax.persistence.*
+
+/**
+ * Provide ResourceDictionary Entity
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+@EntityListeners(AuditingEntityListener::class)
+@Entity
+@Table(name = "RESOURCE_DICTIONARY")
+class ResourceDictionary : Serializable {
+
+    @Id
+    @Column(name = "name", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var name: String
+
+    @Column(name = "data_type", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var dataType: String
+
+    @Column(name = "entry_schema")
+    var entrySchema: String? = null
+
+    @Lob
+    @Convert(converter = JpaResourceDefinitionConverter::class)
+    @Column(name = "definition", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var definition: ResourceDefinition
+
+    @Lob
+    @Column(name = "description", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var description: String
+
+    @Lob
+    @Column(name = "tags", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var tags: String
+
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+    @LastModifiedDate
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name = "creation_date")
+    var creationDate: Date? = null
+
+    @Column(name = "updated_by", nullable = false)
+    @ApiModelProperty(required = true)
+    lateinit var updatedBy: String
+
+    override fun toString(): String {
+        return "[" + ", name = " + name +
+                ", dataType = " + dataType +
+                ", entrySchema = " + entrySchema +
+                ", definition =" + definition +
+                ", description = " + description +
+                ", updatedBy = " + updatedBy +
+                ", tags = " + tags +
+                ", creationDate = " + creationDate +
+                "]"
+    }
+
+    companion object {
+        private const val serialVersionUID = 1L
+    }
+
+
+}
index 034c407..5c7ba27 100644 (file)
@@ -20,7 +20,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler
 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.service.domain.ModelType
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
 import org.slf4j.LoggerFactory
 import org.springframework.stereotype.Service
 
index a7e8f20..8ba4c7b 100644 (file)
@@ -20,12 +20,12 @@ package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler
 import com.google.common.base.Preconditions
 import org.apache.commons.collections.CollectionUtils
 import org.apache.commons.lang3.StringUtils
+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.checkNotEmpty
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary
 import org.springframework.stereotype.Service
 
 @Service
@@ -88,11 +88,11 @@ class ResourceDictionaryHandler(private val resourceDictionaryRepository: Resour
         //TODO( Save Validator)
         //validate(resourceDefinition)
 
-        resourceDictionary.tags = resourceDefinition.tags
+        resourceDictionary.tags = resourceDefinition.tags!!
         resourceDefinition.updatedBy = resourceDictionary.updatedBy
         // Set the Property Definitions
         val propertyDefinition = resourceDefinition.property
-        resourceDictionary.description = propertyDefinition.description
+        resourceDictionary.description = propertyDefinition.description!!
         resourceDictionary.dataType = propertyDefinition.type
         if (propertyDefinition.entrySchema != null) {
             resourceDictionary.entrySchema = propertyDefinition.entrySchema!!.type
index 1434bcc..9f43740 100644 (file)
@@ -22,6 +22,7 @@ import kotlinx.coroutines.awaitAll
 import kotlinx.coroutines.coroutineScope
 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
@@ -29,7 +30,6 @@ import org.onap.ccsdk.cds.controllerblueprints.core.data.*
 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
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
 import org.slf4j.LoggerFactory
 import org.springframework.stereotype.Service
 import java.io.File
@@ -131,7 +131,7 @@ open class ModelTypeLoadService(private val modelTypeHandler: ModelTypeHandler)
             }
             modelType.definitionType = definitionType
             modelType.derivedFrom = definition.derivedFrom
-            modelType.description = definition.description
+            modelType.description = definition.description!!
             modelType.definition = JacksonUtils.jsonNode(definitionContent)
             modelType.modelName = dataKey
             modelType.version = definition.version
index 14dc447..95073e9 100644 (file)
@@ -22,13 +22,13 @@ import kotlinx.coroutines.awaitAll
 import kotlinx.coroutines.coroutineScope
 import org.apache.commons.lang3.StringUtils
 import org.apache.commons.lang3.text.StrBuilder
+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.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
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary
 import org.slf4j.LoggerFactory
 import org.springframework.stereotype.Service
 import java.io.File
@@ -82,7 +82,7 @@ open class ResourceDictionaryLoadService(private val resourceDictionaryHandler:
                 resourceDictionary.definition = resourceDefinition
 
                 checkNotNull(resourceDefinition.property) { "Property field is missing" }
-                resourceDictionary.description = resourceDefinition.property.description
+                resourceDictionary.description = resourceDefinition.property.description!!
                 resourceDictionary.dataType = resourceDefinition.property.type
 
                 if (resourceDefinition.property.entrySchema != null) {
@@ -95,7 +95,7 @@ open class ResourceDictionaryLoadService(private val resourceDictionaryHandler:
                             + ", " + resourceDefinition.updatedBy)
 
                 } else {
-                    resourceDictionary.tags = resourceDefinition.tags
+                    resourceDictionary.tags = resourceDefinition.tags!!
                 }
                 resourceDictionaryHandler.saveResourceDictionary(resourceDictionary)
 
index 82dc89c..3e36947 100644 (file)
@@ -16,7 +16,7 @@
 
 package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.repository
 
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
 import org.springframework.data.jpa.repository.JpaRepository
 import org.springframework.stereotype.Repository
 import javax.transaction.Transactional
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/ApplicationRegistrationService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/ApplicationRegistrationService.kt
new file mode 100644 (file)
index 0000000..edf4c8c
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ *  Copyright © 2019 IBM.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.service
+
+import org.apache.commons.collections.CollectionUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory
+import org.slf4j.LoggerFactory
+import org.springframework.beans.factory.annotation.Value
+import org.springframework.stereotype.Component
+import javax.annotation.PostConstruct
+
+@Component
+class ApplicationRegistrationService {
+
+    @Value("#{'\${resourceSourceMappings}'.split(',')}")
+    private val resourceSourceMappings: List<String>? = null
+
+    @PostConstruct
+    fun register() {
+        registerDictionarySources()
+    }
+
+    fun registerDictionarySources() {
+        log.info("Registering Dictionary Sources : {}", resourceSourceMappings)
+        if (CollectionUtils.isNotEmpty(resourceSourceMappings)) {
+            resourceSourceMappings!!.forEach { resourceSourceMapping ->
+                val mappingKeyValue = resourceSourceMapping.split("=".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
+                if (mappingKeyValue != null && mappingKeyValue.size == 2) {
+                    ResourceSourceMappingFactory.registerSourceMapping(mappingKeyValue[0].trim { it <= ' ' }, mappingKeyValue[1].trim { it <= ' ' })
+                } else {
+                    log.warn("failed to get resource source mapping {}", resourceSourceMapping)
+                }
+            }
+        }
+    }
+
+    companion object {
+        private val log = LoggerFactory.getLogger(ApplicationRegistrationService::class.java)
+    }
+}
index 56bd01e..be56264 100644 (file)
@@ -20,13 +20,13 @@ package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.service
 import com.google.common.base.Preconditions
 import org.apache.commons.collections.CollectionUtils
 import org.apache.commons.lang3.StringUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.AutoMapResponse
+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.data.PropertyDefinition
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary
-import org.onap.ccsdk.cds.controllerblueprints.service.model.AutoMapResponse
 import org.slf4j.LoggerFactory
 import org.springframework.stereotype.Service
 import java.util.*
index 7d66442..8ec0b9b 100644 (file)
 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.data.*
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
 
 class ModelTypeValidator {
     companion object {
index 6d3b3da..6fe7097 100644 (file)
@@ -26,7 +26,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguratio
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
 import org.slf4j.LoggerFactory
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.test.annotation.Commit
index 31ae540..00e78d2 100644 (file)
@@ -28,7 +28,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
 import org.slf4j.LoggerFactory
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.test.annotation.Commit
index 7adc1c9..55bc1e4 100644 (file)
@@ -28,7 +28,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfig
 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.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.test.annotation.Commit
 import org.springframework.test.context.ContextConfiguration
index bbf1751..70e1b8e 100644 (file)
@@ -25,9 +25,9 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
 import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ResourceDictionary
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.test.annotation.Commit
 import org.springframework.test.context.ContextConfiguration
@@ -90,8 +90,8 @@ class ResourceDictionaryReactRepositoryTest {
         val resourceDictionary = ResourceDictionary()
         resourceDictionary.name = resourceDefinition.name
         resourceDictionary.dataType = resourceDefinition.property.type
-        resourceDictionary.description = resourceDefinition.property.description
-        resourceDictionary.tags = resourceDefinition.tags
+        resourceDictionary.description = resourceDefinition.property.description!!
+        resourceDictionary.tags = resourceDefinition.tags!!
         resourceDictionary.updatedBy = resourceDefinition.updatedBy
         resourceDictionary.definition = resourceDefinition
         return resourceDictionary
index 1869ace..3c263b3 100644 (file)
@@ -16,9 +16,9 @@
 
 package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils
 
-import com.fasterxml.jackson.databind.JsonNode
 import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 
 class ModelTypeValidatorTest {
 
@@ -29,8 +29,7 @@ class ModelTypeValidatorTest {
         modelType.definitionType = ""
         modelType.derivedFrom = ""
         modelType.description = ""
-        val definitionContent: JsonNode? = null
-        modelType.definition = definitionContent
+        modelType.definition = JacksonUtils.objectMapper.createObjectNode()
         modelType.modelName = ""
         modelType.version = ""
         modelType.tags = ""
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/ApplicationRegistrationService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/ApplicationRegistrationService.java
deleted file mode 100644 (file)
index 51484ff..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  Copyright © 2017-2018 AT&T Intellectual Property.
- *  Modifications Copyright © 2018 IBM.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints.service;
-
-import org.apache.commons.collections.CollectionUtils;
-import org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.util.List;
-
-@Component
-@SuppressWarnings("unused")
-public class ApplicationRegistrationService {
-    private static Logger log = LoggerFactory.getLogger(ApplicationRegistrationService.class);
-
-    @Value("#{'${resourceSourceMappings}'.split(',')}")
-    private List<String> resourceSourceMappings;
-
-    @PostConstruct
-    public void register() {
-        registerDictionarySources();
-    }
-
-    public void registerDictionarySources() {
-        log.info("Registering Dictionary Sources : {}", resourceSourceMappings);
-        if (CollectionUtils.isNotEmpty(resourceSourceMappings)) {
-            resourceSourceMappings.forEach(resourceSourceMapping -> {
-                String[] mappingKeyValue = resourceSourceMapping.split("=");
-                if (mappingKeyValue != null && mappingKeyValue.length == 2) {
-                    ResourceSourceMappingFactory.INSTANCE.registerSourceMapping(mappingKeyValue[0].trim(), mappingKeyValue[1].trim());
-                } else {
-                    log.warn("failed to get resource source mapping {}", resourceSourceMapping);
-                }
-            });
-        }
-    }
-}
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/ErrorMessage.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/ErrorMessage.java
deleted file mode 100644 (file)
index 155a162..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints.service.common;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-
-import java.io.Serializable;
-import java.util.Date;
-
-@JsonInclude(Include.NON_NULL)
-@JsonTypeName("errorMessage")
-@JsonTypeInfo(include= JsonTypeInfo.As.WRAPPER_OBJECT, use=JsonTypeInfo.Id.NAME)
-public class ErrorMessage implements Serializable {
-    private String message;
-    private Integer code;
-    private String debugMessage;
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
-    private Date timestamp = new Date();
-
-    public ErrorMessage(String message, Integer code, String debugMessage){
-        this.message = message;
-        this.code = code;
-        this.debugMessage = debugMessage;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    public Integer getCode() {
-        return code;
-    }
-
-    public void setCode(Integer code) {
-        this.code = code;
-    }
-
-    public String getDebugMessage() {
-        return debugMessage;
-    }
-
-    public void setDebugMessage(String developerMessage) {
-        this.debugMessage = developerMessage;
-    }
-
-    public Date getTimestamp() {
-        return timestamp;
-    }
-
-    public void setTimestamp(Date timestamp) {
-        this.timestamp = timestamp;
-    }
-}
\ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/domain/ModelType.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/domain/ModelType.java
deleted file mode 100644 (file)
index 31b7924..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints.service.domain;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.databind.JsonNode;
-import io.swagger.annotations.ApiModelProperty;
-import org.springframework.data.annotation.LastModifiedDate;
-import org.springframework.data.jpa.domain.support.AuditingEntityListener;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-
-/**
- * AsdcReference.java Purpose: Provide Configuration Generator AsdcReference Entity
- *
- * @author Brinda Santh
- * @version 1.0
- */
-@EntityListeners({AuditingEntityListener.class})
-@Entity
-@Table(name = "MODEL_TYPE")
-public class ModelType implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @Column(name = "model_name", nullable = false)
-    @ApiModelProperty(required=true)
-    private String modelName;
-
-    @Column(name = "derived_from", nullable = false)
-    @ApiModelProperty(required=true)
-    private String derivedFrom;
-
-    @Column(name = "definition_type", nullable = false)
-    @ApiModelProperty(required=true)
-    private String definitionType;
-
-    @Lob
-    @Convert(converter  = JpaJsonNodeConverter.class)
-    @Column(name = "definition", nullable = false)
-    @ApiModelProperty(required=true)
-    private JsonNode definition;
-
-    @Lob
-    @Column(name = "description", nullable = false)
-    @ApiModelProperty(required=true)
-    private String description;
-
-    @Column(name = "version", nullable = false)
-    @ApiModelProperty(required=true)
-    private String version;
-
-    @Lob
-    @Column(name = "tags", nullable = false)
-    @ApiModelProperty(required=true)
-    private String tags;
-
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
-    @LastModifiedDate
-    @Temporal(TemporalType.TIMESTAMP)
-    @Column(name = "creation_date")
-    private Date creationDate;
-
-    @Column(name = "updated_by", nullable = false)
-    @ApiModelProperty(required=true)
-    private String updatedBy;
-
-    @Override
-    public String toString() {
-        return "[" + "modelName = " + modelName +
-                ", derivedFrom = " + derivedFrom +
-                ", definitionType = " + definitionType +
-                ", description = " + description +
-                ", creationDate = " + creationDate +
-                ", version = " + version +
-                ", updatedBy = " + updatedBy +
-                ", tags = " + tags +
-                "]";
-    }
-
-    public String getModelName() {
-        return modelName;
-    }
-
-    public void setModelName(String modelName) {
-        this.modelName = modelName;
-    }
-
-    public String getDerivedFrom() {
-        return derivedFrom;
-    }
-
-    public void setDerivedFrom(String derivedFrom) {
-        this.derivedFrom = derivedFrom;
-    }
-
-    public String getDefinitionType() {
-        return definitionType;
-    }
-
-    public void setDefinitionType(String definitionType) {
-        this.definitionType = definitionType;
-    }
-
-    public JsonNode getDefinition() {
-        return definition;
-    }
-
-    public void setDefinition(JsonNode definition) {
-        this.definition = definition;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getTags() {
-        return tags;
-    }
-
-    public void setTags(String tags) {
-        this.tags = tags;
-    }
-
-    public Date getCreationDate() {
-        return creationDate;
-    }
-
-    public void setCreationDate(Date creationDate) {
-        this.creationDate = creationDate;
-    }
-
-    public String getUpdatedBy() {
-        return updatedBy;
-    }
-
-    public void setUpdatedBy(String updatedBy) {
-        this.updatedBy = updatedBy;
-    }
-
-
-}
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/domain/ResourceDictionary.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/domain/ResourceDictionary.java
deleted file mode 100644 (file)
index 2a6ab45..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints.service.domain;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition;
-import org.springframework.data.annotation.LastModifiedDate;
-import org.springframework.data.jpa.domain.support.AuditingEntityListener;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity
- *
- * @author Brinda Santh
- * @version 1.0
- */
-@EntityListeners({AuditingEntityListener.class})
-@Entity
-@Table(name = "RESOURCE_DICTIONARY")
-public class ResourceDictionary implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @Id
-    @Column(name = "name", nullable = false)
-    @ApiModelProperty(required=true)
-    private String name;
-
-    @Column(name = "data_type", nullable = false)
-    @ApiModelProperty(required=true)
-    private String dataType;
-
-    @Column(name = "entry_schema")
-    private String entrySchema;
-
-    @Lob
-    @Convert(converter  = JpaResourceDefinitionConverter.class)
-    @Column(name = "definition", nullable = false)
-    @ApiModelProperty(required=true)
-    private ResourceDefinition definition;
-
-    @Lob
-    @Column(name = "description", nullable = false)
-    @ApiModelProperty(required=true)
-    private String description;
-
-    @Lob
-    @Column(name = "tags", nullable = false)
-    @ApiModelProperty(required=true)
-    private String tags;
-
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
-    @LastModifiedDate
-    @Temporal(TemporalType.TIMESTAMP)
-    @Column(name = "creation_date")
-    private Date creationDate;
-
-    @Column(name = "updated_by", nullable = false)
-    @ApiModelProperty(required=true)
-    private String updatedBy;
-
-    @Override
-    public String toString() {
-        return "[" + ", name = " + name +
-                ", dataType = " + dataType +
-                ", entrySchema = " + entrySchema +
-                ", definition =" + definition +
-                ", description = " + description +
-                ", updatedBy = " + updatedBy +
-                ", tags = " + tags +
-                ", creationDate = " + creationDate +
-                "]";
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public String getEntrySchema() {
-        return entrySchema;
-    }
-
-    public void setEntrySchema(String entrySchema) {
-        this.entrySchema = entrySchema;
-    }
-
-    public ResourceDefinition getDefinition() {
-        return definition;
-    }
-
-    public void setDefinition(ResourceDefinition definition) {
-        this.definition = definition;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getTags() {
-        return tags;
-    }
-
-    public void setTags(String tags) {
-        this.tags = tags;
-    }
-
-    public Date getCreationDate() {
-        return creationDate;
-    }
-
-    public void setCreationDate(Date creationDate) {
-        this.creationDate = creationDate;
-    }
-
-    public String getUpdatedBy() {
-        return updatedBy;
-    }
-
-    public void setUpdatedBy(String updatedBy) {
-        this.updatedBy = updatedBy;
-    }
-
-
-
-}
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/model/AutoMapResponse.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/model/AutoMapResponse.java
deleted file mode 100644 (file)
index 0fa3377..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints.service.model;
-
-import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment;
-import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary;
-
-import java.util.List;
-
-/**
- * ArtifactRequest.java Purpose: Provide Configuration Generator ArtifactRequest Model
- *
- * @author Brinda Santh
- * @version 1.0
- */
-public class AutoMapResponse {
-
-    private List<ResourceAssignment> resourceAssignments;
-    private List<ResourceDictionary> dataDictionaries;
-
-    public List<ResourceAssignment> getResourceAssignments() {
-        return resourceAssignments;
-    }
-
-    public void setResourceAssignments(List<ResourceAssignment> resourceAssignments) {
-        this.resourceAssignments = resourceAssignments;
-    }
-
-    public List<ResourceDictionary> getDataDictionaries() {
-        return dataDictionaries;
-    }
-
-    public void setDataDictionaries(List<ResourceDictionary> dataDictionaries) {
-        this.dataDictionaries = dataDictionaries;
-    }
-
-
-
-}