AT&T 1712 and 1802 release code
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / openecomp / mso / client / sdnc / sync / SDNCAdapterRequest.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.client.sdnc.sync;
22
23
24 import javax.xml.bind.annotation.XmlAccessType;
25 import javax.xml.bind.annotation.XmlAccessorType;
26 import javax.xml.bind.annotation.XmlElement;
27 import javax.xml.bind.annotation.XmlRootElement;
28 import javax.xml.bind.annotation.XmlType;
29
30 import org.w3c.dom.Document;
31 import org.w3c.dom.Node;
32
33 /**
34  * <p>Java class for anonymous complex type.
35  *
36  * <p>The following schema fragment specifies the expected content contained within this class.
37  *
38  * <pre>
39  * &lt;complexType>
40  *   &lt;complexContent>
41  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
42  *       &lt;sequence>
43  *         &lt;element ref="{http://org.openecomp/workflow/sdnc/adapter/schema/v1}RequestHeader"/>
44  *         &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
45  *       &lt;/sequence>
46  *     &lt;/restriction>
47  *   &lt;/complexContent>
48  * &lt;/complexType>
49  * </pre>
50  *
51  *
52  */
53 //BPEL to SDNCAdapter request
54 @XmlAccessorType(XmlAccessType.FIELD)
55 @XmlType(name = "", propOrder = {
56     "requestHeader",
57     "requestData"
58 })
59 @XmlRootElement(name = "SDNCAdapterRequest")
60 public class SDNCAdapterRequest {
61
62     @XmlElement(name = "RequestHeader", required = true)
63     protected RequestHeader requestHeader;
64     @XmlElement(name = "RequestData", required = true)
65     protected Object requestData;
66
67     /**
68      * Gets the value of the requestHeader property.
69      *
70      * @return
71      *     possible object is
72      *     {@link RequestHeader }
73      *
74      */
75     public RequestHeader getRequestHeader() {
76         return requestHeader;
77     }
78
79     /**
80      * Sets the value of the requestHeader property.
81      *
82      * @param value
83      *     allowed object is
84      *     {@link RequestHeader }
85      *
86      */
87     public void setRequestHeader(RequestHeader value) {
88         this.requestHeader = value;
89     }
90
91     /**
92      * Gets the value of the requestData property.
93      *
94      * @return
95      *     possible object is
96      *     {@link Object }
97      *
98      */
99     public Object getRequestData() {
100         return requestData;
101     }
102
103     /**
104      * Sets the value of the requestData property.
105      *
106      * @param value
107      *     allowed object is
108      *     {@link Object }
109      *
110      */
111     public void setRequestData(Object value) {
112         this.requestData = value;
113     }
114
115         @Override
116         public String toString() {
117
118                 String rd = "";
119                 if (requestData != null)
120                 {
121                         Node node = (Node) requestData;
122                         Document doc = node.getOwnerDocument();
123                         rd = Utils.domToStr(doc);
124                 }
125                 return "SDNCAdapterRequest [requestHeader=" + requestHeader.toString()
126                                 + ", requestData=" + rd + "]";
127         }
128 }