Merge "Reorder modifiers"
[so.git] / mso-api-handlers / mso-api-handler-common / src / main / java / org / openecomp / mso / apihandler / camundabeans / CamundaResponse.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.mso.apihandler.camundabeans;
22
23 import java.util.Map;
24
25 import com.fasterxml.jackson.annotation.JsonProperty;
26 import com.fasterxml.jackson.annotation.JsonRootName;
27
28 // This class must be 100% JSON-compatible with the BPMN WorkflowResponse class.
29 // TODO: BPMN and the API-H should use a common class.
30
31 /**
32  * A synchronous response from a workflow.
33  */
34 @JsonRootName(value = "WorkflowResponse")
35 public class CamundaResponse {
36
37         @JsonProperty("processInstanceId")
38         private String processInstanceId;
39
40         @JsonProperty("messageCode")
41         private int messageCode;
42
43         @JsonProperty("message")
44         private String message;
45
46         @JsonProperty("variables")
47         private Map<String,String> variables;
48
49         @JsonProperty("content")
50         private String content;
51
52         public String getProcessInstanceId() {
53                 return processInstanceId;
54         }
55
56         public void setProcessInstanceId(String processInstanceId) {
57                 this.processInstanceId = processInstanceId;
58         }
59
60         public int getMessageCode() {
61                 return messageCode;
62         }
63
64         public void setMessageCode(int messageCode) {
65                 this.messageCode = messageCode;
66         }
67
68         public String getMessage() {
69                 return message;
70         }
71
72         public void setMessage(String message) {
73                 this.message = message;
74         }
75
76         public Map<String,String> getVariables() {
77                 return variables;
78         }
79
80         public void setVariables(Map<String,String> variables) {
81                 this.variables = variables;
82         }
83
84         public String getContent() {
85                 return content;
86         }
87
88         public void setContent(String content) {
89                 this.content = content;
90         }
91
92         @Override
93         public String toString() {
94                 return getClass().getSimpleName() + "["
95                         + "processInstanceId=" + processInstanceId
96                         + ",messageCode=" + messageCode
97                         + ",message=" + message
98                         + ",variables=" + variables
99                         + ",content=" + content
100                         + "]";
101         }
102 }