diff options
author | 2019-02-14 15:13:04 +0100 | |
---|---|---|
committer | 2019-02-22 12:30:24 +0100 | |
commit | 3c6a1844083f02796e67fd185306a8d0cdd7da07 (patch) | |
tree | 4ce0ecaaf6e2c513f88e384d42dc0ce5aa824d22 /vid-app-common/src/main/java/org | |
parent | f5f3e8ee869ab0359dd4768f4b6bf554b5cc1371 (diff) |
Introduced dynamic workflow properties in VID FE
VID FE will get workflows from SO API (mocked at this moment),then call SO for the parameters and dynamically render those parameters on the
page.
(contains PR of @Wojciech Sliwka about mocked parameters API from SO)
Change-Id: If2cd156cd96a120e79746a4da44d4926f8d6cbcf
Issue-ID: VID-398
Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'vid-app-common/src/main/java/org')
-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 |