diff options
Diffstat (limited to 'vid-app-common/src/main/java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java | 3 | ||||
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/model/SOWorkflows.kt | 19 |
2 files changed, 14 insertions, 8 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java b/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java index 8fe7c1fa1..2456ebd0f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java @@ -22,6 +22,7 @@ package org.onap.vid.controller; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.module.kotlin.KotlinModule; import io.joshworks.restclient.http.mapper.ObjectMapper; import org.onap.vid.aai.*; import org.onap.vid.aai.model.PortDetailsTranslator; @@ -55,7 +56,7 @@ public class WebConfig { */ @Bean public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() { - return new com.fasterxml.jackson.databind.ObjectMapper(); + return new com.fasterxml.jackson.databind.ObjectMapper().registerModule(new KotlinModule()); } diff --git a/vid-app-common/src/main/java/org/onap/vid/model/SOWorkflows.kt b/vid-app-common/src/main/java/org/onap/vid/model/SOWorkflows.kt index 25125cea6..82c720eed 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/SOWorkflows.kt +++ b/vid-app-common/src/main/java/org/onap/vid/model/SOWorkflows.kt @@ -1,21 +1,26 @@ package org.onap.vid.model -data class SOWorkflow @JvmOverloads constructor(var id: Long? = null, var name: String? = null) { +data class SOWorkflow constructor(val id: Long, val name: String) { fun clone(): SOWorkflow { return copy() } } -data class SOWorkflows @JvmOverloads constructor(var workflows: List<SOWorkflow>? = emptyList()) { +data class SOWorkflows @JvmOverloads constructor(val workflows: List<SOWorkflow> = emptyList()) { fun clone(): SOWorkflows { - return copy(workflows?.toMutableList()) + return copy(workflows.toMutableList()) } } - -enum class SOWorkflowType(var type: String? = "STRING") { +enum class SOWorkflowType(val type: String) { STRING("STRING") } -data class SOWorkflowParameterDefinition(var id: Long? = null, var name: String? = null, var pattern: String? = null, var type: SOWorkflowType? = null, val required: Boolean? = null) -data class SOWorkflowParameterDefinitions(var parameterDefinitions: List<SOWorkflowParameterDefinition>? = null)
\ No newline at end of file +data class SOWorkflowParameterDefinition constructor(val id: Long, val name: String, val pattern: String, + val type: SOWorkflowType, val required: Boolean) + +data class SOWorkflowParameterDefinitions constructor(val parameterDefinitions: List<SOWorkflowParameterDefinition> = emptyList()) { + fun clone(): SOWorkflowParameterDefinitions { + return copy(parameterDefinitions.toMutableList()) + } +}
\ No newline at end of file |