Remove unnecessary use of Calendar.getInstance()
[so.git] / bpmn / MSOGammaBPMN / src / main / java / com / att / domain2 / workflow / sdnc / adapter / schema / v1 / SDNCAdapterCallbackRequest.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 com.att.domain2.workflow.sdnc.adapter.schema.v1;
22
23 import java.io.StringWriter;
24
25 import javax.xml.bind.JAXBContext;
26 import javax.xml.bind.JAXBException;
27 import javax.xml.bind.Marshaller;
28 import javax.xml.bind.annotation.XmlAccessType;
29 import javax.xml.bind.annotation.XmlAccessorType;
30 import javax.xml.bind.annotation.XmlElement;
31 import javax.xml.bind.annotation.XmlRootElement;
32 import javax.xml.bind.annotation.XmlType;
33
34
35 /**
36  * <p>Java class for anonymous complex type.
37  * 
38  * <p>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://domain2.att.com/workflow/sdnc/adapter/schema/v1}CallbackHeader"/>
46  *         &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType" minOccurs="0"/>
47  *       &lt;/sequence>
48  *     &lt;/restriction>
49  *   &lt;/complexContent>
50  * &lt;/complexType>
51  * </pre>
52  * 
53  * 
54  */
55 @XmlAccessorType(XmlAccessType.FIELD)
56 @XmlType(name = "", namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1", propOrder = {
57     "callbackHeader",
58     "requestData"
59 })
60 @XmlRootElement(name = "SDNCAdapterCallbackRequest", namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
61 public class SDNCAdapterCallbackRequest {
62
63     @XmlElement(name = "CallbackHeader", required = true, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
64     protected CallbackHeader callbackHeader;
65     @XmlElement(name = "RequestData", required=false, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
66     protected Object requestData;
67
68     /**
69      * Gets the value of the callbackHeader property.
70      * 
71      * @return
72      *     possible object is
73      *     {@link CallbackHeader }
74      *     
75      */
76     public CallbackHeader getCallbackHeader() {
77         return callbackHeader;
78     }
79
80     /**
81      * Sets the value of the callbackHeader property.
82      * 
83      * @param value
84      *     allowed object is
85      *     {@link CallbackHeader }
86      *     
87      */
88     public void setCallbackHeader(CallbackHeader value) {
89         this.callbackHeader = 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         public String toString() {
117                 StringWriter writer = new StringWriter();
118                 try {
119                         JAXBContext context = JAXBContext
120                                         .newInstance(SDNCAdapterCallbackRequest.class);
121                         Marshaller m = context.createMarshaller();
122                         m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
123                         m.marshal(this, writer);
124                         return writer.getBuffer().toString();
125                 } catch (JAXBException e) {
126                         return "";
127                 }
128         }
129 }