4eacff6623e3dd8005e9bf35f6003ef8d1f85e67
[so.git] / mso-api-handlers / mso-api-handler-common / src / main / java / org / openecomp / mso / apihandler / camundabeans / CamundaRequest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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
24
25 import org.codehaus.jackson.annotate.JsonProperty;
26 import org.codehaus.jackson.map.annotate.JsonRootName;
27 import org.codehaus.jackson.annotate.JsonPropertyOrder;
28
29 import org.openecomp.mso.apihandler.common.CommonConstants;
30
31 /**
32  * JavaBean JSON class for a "variables" which contains the xml payload that
33  * will be passed to the Camunda process
34  * 
35  */
36 @JsonPropertyOrder({ CommonConstants.CAMUNDA_SERVICE_INPUT, CommonConstants.CAMUNDA_HOST, 
37         CommonConstants.SCHEMA_VERSION_HEADER, CommonConstants.REQUEST_ID_HEADER, CommonConstants.SERVICE_INSTANCE_ID_HEADER,
38         CommonConstants. REQUEST_TIMEOUT_HEADER, CommonConstants.CAMUNDA_SERVICE_INPUT})
39 @JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT)
40 public class CamundaRequest {
41
42         @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
43         private CamundaInput serviceInput;
44         
45         @JsonProperty(CommonConstants.CAMUNDA_HOST)
46         private CamundaInput host;
47         
48         @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
49         private CamundaInput schema;
50         
51         @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
52         private CamundaInput reqid;
53         
54         @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
55         private CamundaInput svcid;
56         
57         @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
58         private CamundaInput timeout;
59         
60         public CamundaRequest() {
61         }
62         
63         @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
64         public CamundaInput getServiceInput() {
65                 return serviceInput;
66         }
67
68         @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
69         public void setServiceInput(CamundaInput serviceInput) {
70                 this.serviceInput = serviceInput;
71         }
72         
73         @JsonProperty(CommonConstants.CAMUNDA_HOST)
74         public CamundaInput getHost() {
75                 return host;
76         }
77
78         @JsonProperty(CommonConstants.CAMUNDA_HOST)
79         public void setHost(CamundaInput host) {
80                 this.host = host;
81         }
82
83         @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
84         public CamundaInput getSchema() {
85                 return schema;
86         }
87
88         @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
89         public void setSchema(CamundaInput schema) {
90                 this.schema = schema;
91         }
92
93         @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
94         public CamundaInput getReqid() {
95                 return reqid;
96         }
97
98         @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
99         public void setReqid(CamundaInput reqid) {
100                 this.reqid = reqid;
101         }
102
103         @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
104         public CamundaInput getSvcid() {
105                 return svcid;
106         }
107
108         @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
109         public void setSvcid(CamundaInput svcid) {
110                 this.svcid = svcid;
111         }
112         
113
114         @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
115         public CamundaInput getTimeout() {
116                 return timeout;
117         }
118
119         @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
120         public void setTimeout(CamundaInput timeout) {
121                 this.timeout = timeout;
122         }
123
124                 
125         
126         @Override
127         public String toString() {
128                 return "CamundaRequest [serviceInput=" + serviceInput + ", host="
129                                 + host + ", schema=" + schema + ", reqid=" + reqid + ", svcid="
130                                 + svcid + ", timeout=" + timeout + "]";
131         }       
132         
133 }