diff options
Diffstat (limited to 'ms/controllerblueprints/modules/core')
5 files changed, 31 insertions, 7 deletions
diff --git a/ms/controllerblueprints/modules/core/load/model_type/artifact_type/artifact-bpmn-camunda.json b/ms/controllerblueprints/modules/core/load/model_type/artifact_type/artifact-bpmn-camunda.json new file mode 100644 index 00000000..ac76b4f4 --- /dev/null +++ b/ms/controllerblueprints/modules/core/load/model_type/artifact_type/artifact-bpmn-camunda.json @@ -0,0 +1,8 @@ +{
+ "description": " Camunda BPM File",
+ "version": "1.0.0",
+ "file_ext": [
+ "bpmn"
+ ],
+ "derived_from": "tosca.artifacts.Implementation"
+}
\ No newline at end of file diff --git a/ms/controllerblueprints/modules/core/load/model_type/artifact_type/artifact-directed-graph.json b/ms/controllerblueprints/modules/core/load/model_type/artifact_type/artifact-directed-graph.json new file mode 100644 index 00000000..7ab3a543 --- /dev/null +++ b/ms/controllerblueprints/modules/core/load/model_type/artifact_type/artifact-directed-graph.json @@ -0,0 +1,9 @@ +{
+ "description": "Directed Graph File",
+ "version": "1.0.0",
+ "file_ext": [
+ "json",
+ "xml"
+ ],
+ "derived_from": "tosca.artifacts.Implementation"
+}
\ No newline at end of file diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/ConfigModelConstant.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/ConfigModelConstant.kt index bb5a78fd..97826912 100644 --- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/ConfigModelConstant.kt +++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/ConfigModelConstant.kt @@ -42,11 +42,6 @@ object ConfigModelConstant { const val CAPABILITY_PROPERTY_MAPPING = "mapping"
- const val SOURCE_INPUT = "input"
- const val SOURCE_DEFAULT = "default"
- const val SOURCE_MDSAL = "mdsal"
- const val SOURCE_DB = "db"
-
const val PROPERTY_RECIPE_NAMES = "action-names"
}
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt index 6d677ffa..a10f6d30 100644 --- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt +++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt @@ -155,7 +155,7 @@ class PropertyDefinition { var id: String? = null
var description: String? = null
var required: Boolean? = null
- var type: String? = null
+ lateinit var type: String
@get:JsonProperty("default")
var defaultValue: Any? = null
var status: String? = null
@@ -202,7 +202,7 @@ class OperationDefinition { }
class Implementation {
- var primary: String? = null
+ lateinit var primary: String
var dependencies: MutableList<String>? = null
}
@@ -240,6 +240,11 @@ class TriggerDefinition { var description: String? = null
@get:JsonProperty("event_type")
lateinit var eventType: String
+ @get:JsonProperty("target_filter")
+ var targetFilter: EventFilterDefinition? = null
+ var condition: ConditionClause? = null
+ var constraint: ConditionClause? = null
+ var method: String? = null
lateinit var action: String
}
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt index 95b2af7b..9621382c 100644 --- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt +++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt @@ -50,6 +50,13 @@ object JacksonUtils { }
@JvmStatic
+ fun <T> readValueFromFile(fileName: String, valueType: Class<T>): T? {
+ val content: String = FileUtils.readFileToString(File(fileName), Charset.defaultCharset())
+ ?: throw BluePrintException(format("Failed to read json file : {}", fileName))
+ return readValue(content, valueType)
+ }
+
+ @JvmStatic
fun jsonNodeFromObject(from: kotlin.Any): JsonNode = jacksonObjectMapper().convertValue(from, JsonNode::class.java)
@JvmStatic
|