summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-01-15 16:17:17 -0500
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-01-18 13:56:01 -0500
commitc96644c5d07d5634916db30f01c9ed5279791b38 (patch)
tree33449ce045cf9371cfa0ef5dd213e09c84540618 /ms/blueprintsprocessor/modules/commons
parentbdf3467390d8f5884c9ea0b5691630e15e1a9760 (diff)
Add support for async REST
Change-Id: Ieb53cbd75c2e21355b153611f6490c1b2af6053b Issue-ID: CCSDK-662 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons')
-rw-r--r--ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt196
1 files changed, 97 insertions, 99 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
index b0483dc3f..438e755cf 100644
--- a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
+++ b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
@@ -1,99 +1,97 @@
-/*
- * 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.apps.blueprintsprocessor.core.api.data
-
-import com.fasterxml.jackson.annotation.JsonFormat
-import com.fasterxml.jackson.databind.node.ObjectNode
-import io.swagger.annotations.ApiModelProperty
-import java.util.*
-
-/**
- * BlueprintProcessorData
- * @author Brinda Santh
- * DATE : 8/15/2018
- */
-
-open class ExecutionServiceInput {
- @get:ApiModelProperty(required = true)
- lateinit var commonHeader: CommonHeader
- @get:ApiModelProperty(required = true)
- lateinit var actionIdentifiers: ActionIdentifiers
- @get:ApiModelProperty(required = true)
- lateinit var payload: ObjectNode
-}
-
-open class ExecutionServiceOutput {
- @get:ApiModelProperty(required = true)
- lateinit var commonHeader: CommonHeader
- @get:ApiModelProperty(required = true)
- lateinit var actionIdentifiers: ActionIdentifiers
- @get:ApiModelProperty(required = true)
- var status: Status = Status()
- @get:ApiModelProperty(required = true)
- lateinit var payload: ObjectNode
-}
-
-open class ActionIdentifiers {
- @get:ApiModelProperty(required = false)
- lateinit var blueprintName: String
- @get:ApiModelProperty(required = false)
- lateinit var blueprintVersion: String
- @get:ApiModelProperty(required = true)
- lateinit var actionName: String
- @get:ApiModelProperty(required = true, allowableValues = "sync, async")
- lateinit var mode: String
-}
-
-open class CommonHeader {
- @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z")
- @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
- var timestamp: Date = Date()
- @get:ApiModelProperty(required = true)
- lateinit var originatorId: String
- @get:ApiModelProperty(required = true)
- lateinit var requestId: String
- @get:ApiModelProperty(required = true)
- lateinit var subRequestId: String
- @get:ApiModelProperty(required = false)
- var flags: Flags? = null
-}
-
-open class Flags {
- var isForce: Boolean = false
- @get:ApiModelProperty(value = "3600")
- var ttl: Int = 3600
-}
-
-open class Status {
- @get:ApiModelProperty(required = true)
- var code: Int = 200
- @get:ApiModelProperty(required = true)
- var eventType: String = "EVENT-ACTION-RESPONSE"
- @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z")
- @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
- var timestamp: Date = Date()
- @get:ApiModelProperty(required = false)
- var errorMessage: String? = null
- @get:ApiModelProperty(required = true)
- var message: String = "success"
-}
-
-
-
-
-
+/*
+ * 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.apps.blueprintsprocessor.core.api.data
+
+import com.fasterxml.jackson.annotation.JsonFormat
+import com.fasterxml.jackson.databind.node.ObjectNode
+import io.swagger.annotations.ApiModelProperty
+import java.util.*
+
+/**
+ * BlueprintProcessorData
+ * @author Brinda Santh
+ * DATE : 8/15/2018
+ */
+
+open class ExecutionServiceInput {
+ @get:ApiModelProperty(required = true)
+ lateinit var commonHeader: CommonHeader
+ @get:ApiModelProperty(required = true)
+ lateinit var actionIdentifiers: ActionIdentifiers
+ @get:ApiModelProperty(required = true)
+ lateinit var payload: ObjectNode
+}
+
+open class ExecutionServiceOutput {
+ @get:ApiModelProperty(required = true)
+ lateinit var commonHeader: CommonHeader
+ @get:ApiModelProperty(required = true)
+ lateinit var actionIdentifiers: ActionIdentifiers
+ @get:ApiModelProperty(required = true)
+ var status: Status = Status()
+ @get:ApiModelProperty(required = true)
+ lateinit var payload: ObjectNode
+}
+
+const val ACTION_MODE_ASYNC = "async"
+const val ACTION_MODE_SYNC = "sync"
+
+open class ActionIdentifiers {
+ @get:ApiModelProperty(required = false)
+ lateinit var blueprintName: String
+ @get:ApiModelProperty(required = false)
+ lateinit var blueprintVersion: String
+ @get:ApiModelProperty(required = true)
+ lateinit var actionName: String
+ @get:ApiModelProperty(required = true, allowableValues = "sync, async")
+ lateinit var mode: String
+}
+
+open class CommonHeader {
+ @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z")
+ @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ var timestamp: Date = Date()
+ @get:ApiModelProperty(required = true)
+ lateinit var originatorId: String
+ @get:ApiModelProperty(required = true)
+ lateinit var requestId: String
+ @get:ApiModelProperty(required = true)
+ lateinit var subRequestId: String
+ @get:ApiModelProperty(required = false)
+ var flags: Flags? = null
+}
+
+open class Flags {
+ var isForce: Boolean = false
+ @get:ApiModelProperty(value = "3600")
+ var ttl: Int = 3600
+}
+
+open class Status {
+ @get:ApiModelProperty(required = true)
+ var code: Int = 200
+ @get:ApiModelProperty(required = true)
+ var eventType: String = "EVENT-ACTION-RESPONSE"
+ @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z")
+ @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ var timestamp: Date = Date()
+ @get:ApiModelProperty(required = false)
+ var errorMessage: String? = null
+ @get:ApiModelProperty(required = true)
+ var message: String = "success"
+}