2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.so.apihandler.camundabeans;
27 import org.onap.so.apihandler.common.CommonConstants;
29 import com.fasterxml.jackson.annotation.JsonProperty;
30 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31 import com.fasterxml.jackson.annotation.JsonRootName;
34 * JavaBean JSON class for a "variables" which contains the xml payload that
35 * will be passed to the Camunda process
38 @JsonPropertyOrder({ CommonConstants.CAMUNDA_SERVICE_INPUT, CommonConstants.CAMUNDA_HOST,
39 CommonConstants.SCHEMA_VERSION_HEADER, CommonConstants.REQUEST_ID_HEADER, CommonConstants.SERVICE_INSTANCE_ID_HEADER,
40 CommonConstants. REQUEST_TIMEOUT_HEADER, CommonConstants.CAMUNDA_SERVICE_INPUT})
41 @JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT)
42 public class CamundaRequest {
44 @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
45 private CamundaInput serviceInput;
47 @JsonProperty(CommonConstants.CAMUNDA_HOST)
48 private CamundaInput host;
50 @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
51 private CamundaInput schema;
53 @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
54 private CamundaInput reqid;
56 @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
57 private CamundaInput svcid;
59 @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
60 private CamundaInput timeout;
62 public CamundaRequest() {
65 @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
66 public CamundaInput getServiceInput() {
70 @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
71 public void setServiceInput(CamundaInput serviceInput) {
72 this.serviceInput = serviceInput;
75 @JsonProperty(CommonConstants.CAMUNDA_HOST)
76 public CamundaInput getHost() {
80 @JsonProperty(CommonConstants.CAMUNDA_HOST)
81 public void setHost(CamundaInput host) {
85 @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
86 public CamundaInput getSchema() {
90 @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
91 public void setSchema(CamundaInput schema) {
95 @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
96 public CamundaInput getReqid() {
100 @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
101 public void setReqid(CamundaInput reqid) {
105 @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
106 public CamundaInput getSvcid() {
110 @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
111 public void setSvcid(CamundaInput svcid) {
116 @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
117 public CamundaInput getTimeout() {
121 @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
122 public void setTimeout(CamundaInput timeout) {
123 this.timeout = timeout;
129 public String toString() {
130 return "CamundaRequest [serviceInput=" + serviceInput + ", host="
131 + host + ", schema=" + schema + ", reqid=" + reqid + ", svcid="
132 + svcid + ", timeout=" + timeout + "]";