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=========================================================
20 package org.openecomp.mso.adapters.sdncrest;
22 import org.codehaus.jackson.annotate.JsonProperty;
23 import org.codehaus.jackson.map.annotate.JsonRootName;
24 import org.codehaus.jackson.map.annotate.JsonSerialize;
25 import org.jboss.resteasy.annotations.providers.NoJackson;
27 import javax.xml.bind.annotation.XmlElement;
28 import javax.xml.bind.annotation.XmlRootElement;
29 import java.io.Serializable;
31 // NOTE: the JAXB (XML) annotations are required with JBoss AS7 and RESTEasy,
32 // even though we are using JSON exclusively. The @NoJackson annotation
33 // is also required in this environment.
36 * SDNC adapter request for "agnostic" API services.
37 * The target action is determined by a service type and an operation.
39 @JsonRootName("SDNCServiceRequest")
40 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
41 @XmlRootElement(name = "SDNCServiceRequest")
43 public class SDNCServiceRequest extends SDNCRequestCommon implements Serializable {
44 private static final long serialVersionUID = 1L;
46 // Request Information specified by SDNC "agnostic" API
47 private RequestInformation requestInformation;
49 // Service Information specified by: SDNC "agnostic" API
50 private ServiceInformation serviceInformation;
52 // The SDNC service type specified by SDNC "agnostic" API
53 private String sdncService;
55 // The SDNC operation specified by SDNC "agnostic" API
56 private String sdncOperation;
58 // The SDNC service data type specified by SDNC "agnostic" API
59 private String sdncServiceDataType;
61 // The SDNC service data specified by SDNC "agnostic" API
62 private String sndcServiceData;
64 public SDNCServiceRequest() {
67 public SDNCServiceRequest(String bpNotificationUrl, String bpTimeout,
68 String sdncRequestId, String sdncService, String sdncOperation,
69 RequestInformation requestInformation,
70 ServiceInformation serviceInformation, String sdncServiceDataType,
71 String sndcServiceData) {
72 super(bpNotificationUrl, bpTimeout, sdncRequestId);
73 this.requestInformation = requestInformation;
74 this.serviceInformation = serviceInformation;
75 this.sdncService = sdncService;
76 this.sdncOperation = sdncOperation;
77 this.sdncServiceDataType = sdncServiceDataType;
78 this.sndcServiceData = sndcServiceData;
81 @JsonProperty("requestInformation")
82 @XmlElement(name = "requestInformation")
83 public RequestInformation getRequestInformation() {
84 return requestInformation;
87 @JsonProperty("requestInformation")
88 public void setRequestInformation(RequestInformation requestInformation) {
89 this.requestInformation = requestInformation;
92 @JsonProperty("serviceInformation")
93 @XmlElement(name = "serviceInformation")
94 public ServiceInformation getServiceInformation() {
95 return serviceInformation;
98 @JsonProperty("serviceInformation")
99 public void setServiceInformation(ServiceInformation serviceInformation) {
100 this.serviceInformation = serviceInformation;
103 @JsonProperty("sdncService")
104 @XmlElement(name = "sdncService")
105 public String getSDNCService() {
109 @JsonProperty("sdncService")
110 public void setSDNCService(String sdncService) {
111 this.sdncService = sdncService;
114 @JsonProperty("sdncOperation")
115 @XmlElement(name = "sdncOperation")
116 public String getSDNCOperation() {
117 return sdncOperation;
120 @JsonProperty("sdncOperation")
121 public void setSDNCOperation(String sdncOperation) {
122 this.sdncOperation = sdncOperation;
125 @JsonProperty("sdncServiceDataType")
126 @XmlElement(name = "sdncServiceDataType")
127 public String getSDNCServiceDataType() {
128 return sdncServiceDataType;
131 @JsonProperty("sdncServiceDataType")
132 public void setSDNCServiceDataType(String sdncServiceDataType) {
133 this.sdncServiceDataType = sdncServiceDataType;
136 @JsonProperty("sdncServiceData")
137 @XmlElement(name = "sdncServiceData")
138 public String getSDNCServiceData() {
139 return sndcServiceData;
142 @JsonProperty("sdncServiceData")
143 public void setSDNCServiceData(String sndcServiceData) {
144 this.sndcServiceData = sndcServiceData;