2 * Copyright © 2019 IBM.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.ccsdk.cds.controllerblueprints.core.dsl
19 import com.fasterxml.jackson.annotation.JsonIgnore
20 import com.fasterxml.jackson.databind.JsonNode
21 import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
22 import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
23 import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
24 import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
25 import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
26 import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
27 import org.onap.ccsdk.cds.controllerblueprints.core.data.Step
30 * This is simplified version of DSL, which is used for generating the Service template
31 * @author Brinda Santh
36 var metadata: MutableMap<String, String> = hashMapOf()
37 var properties: MutableMap<String, JsonNode>? = null
38 var dataTypes: MutableMap<String, DataType> = hashMapOf()
39 var artifactTypes: MutableMap<String, ArtifactType> = hashMapOf()
40 var components: MutableMap<String, DSLComponent> = hashMapOf()
41 var registryComponents: MutableMap<String, DSLRegistryComponent> = hashMapOf()
42 var workflows: MutableMap<String, DSLWorkflow> = hashMapOf()
48 var id: String? = null
49 lateinit var description: String
50 lateinit var actionName: String
51 lateinit var steps: MutableMap<String, Step>
52 var inputs: MutableMap<String, PropertyDefinition>? = null
53 var outputs: MutableMap<String, PropertyDefinition>? = null
59 lateinit var id: String
60 lateinit var type: String
61 lateinit var version: String
62 lateinit var description: String
63 var implementation: Implementation? = null
64 var attributes: MutableMap<String, AttributeDefinition>? = null
65 var properties: MutableMap<String, PropertyDefinition>? = null
66 var artifacts: MutableMap<String, ArtifactDefinition>? = null
67 var inputs: MutableMap<String, PropertyDefinition>? = null
68 var outputs: MutableMap<String, PropertyDefinition>? = null
71 class DSLRegistryComponent {
73 lateinit var id: String
74 lateinit var type: String
75 lateinit var version: String
76 lateinit var interfaceName: String
77 lateinit var description: String
78 var implementation: Implementation? = null
79 var properties: MutableMap<String, JsonNode>? = null
80 var artifacts: MutableMap<String, ArtifactDefinition>? = null
81 var inputs: MutableMap<String, JsonNode>? = null
82 var outputs: MutableMap<String, JsonNode>? = null