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