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