1   /**
2    * RuntimeContext.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
6    */
7   
8   package oasis.names.tc.wsrp.v1.types;
9   
10  public class RuntimeContext  implements java.io.Serializable {
11      private java.lang.String userAuthentication;
12      private java.lang.String portletInstanceKey;
13      private java.lang.String namespacePrefix;
14      private oasis.names.tc.wsrp.v1.types.Templates templates;
15      private java.lang.String sessionID;
16      private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
17  
18      public RuntimeContext() {
19      }
20  
21      public RuntimeContext(
22             oasis.names.tc.wsrp.v1.types.Extension[] extensions,
23             java.lang.String namespacePrefix,
24             java.lang.String portletInstanceKey,
25             java.lang.String sessionID,
26             oasis.names.tc.wsrp.v1.types.Templates templates,
27             java.lang.String userAuthentication) {
28             this.userAuthentication = userAuthentication;
29             this.portletInstanceKey = portletInstanceKey;
30             this.namespacePrefix = namespacePrefix;
31             this.templates = templates;
32             this.sessionID = sessionID;
33             this.extensions = extensions;
34      }
35  
36  
37      /**
38       * Gets the userAuthentication value for this RuntimeContext.
39       * 
40       * @return userAuthentication
41       */
42      public java.lang.String getUserAuthentication() {
43          return userAuthentication;
44      }
45  
46  
47      /**
48       * Sets the userAuthentication value for this RuntimeContext.
49       * 
50       * @param userAuthentication
51       */
52      public void setUserAuthentication(java.lang.String userAuthentication) {
53          this.userAuthentication = userAuthentication;
54      }
55  
56  
57      /**
58       * Gets the portletInstanceKey value for this RuntimeContext.
59       * 
60       * @return portletInstanceKey
61       */
62      public java.lang.String getPortletInstanceKey() {
63          return portletInstanceKey;
64      }
65  
66  
67      /**
68       * Sets the portletInstanceKey value for this RuntimeContext.
69       * 
70       * @param portletInstanceKey
71       */
72      public void setPortletInstanceKey(java.lang.String portletInstanceKey) {
73          this.portletInstanceKey = portletInstanceKey;
74      }
75  
76  
77      /**
78       * Gets the namespacePrefix value for this RuntimeContext.
79       * 
80       * @return namespacePrefix
81       */
82      public java.lang.String getNamespacePrefix() {
83          return namespacePrefix;
84      }
85  
86  
87      /**
88       * Sets the namespacePrefix value for this RuntimeContext.
89       * 
90       * @param namespacePrefix
91       */
92      public void setNamespacePrefix(java.lang.String namespacePrefix) {
93          this.namespacePrefix = namespacePrefix;
94      }
95  
96  
97      /**
98       * Gets the templates value for this RuntimeContext.
99       * 
100      * @return templates
101      */
102     public oasis.names.tc.wsrp.v1.types.Templates getTemplates() {
103         return templates;
104     }
105 
106 
107     /**
108      * Sets the templates value for this RuntimeContext.
109      * 
110      * @param templates
111      */
112     public void setTemplates(oasis.names.tc.wsrp.v1.types.Templates templates) {
113         this.templates = templates;
114     }
115 
116 
117     /**
118      * Gets the sessionID value for this RuntimeContext.
119      * 
120      * @return sessionID
121      */
122     public java.lang.String getSessionID() {
123         return sessionID;
124     }
125 
126 
127     /**
128      * Sets the sessionID value for this RuntimeContext.
129      * 
130      * @param sessionID
131      */
132     public void setSessionID(java.lang.String sessionID) {
133         this.sessionID = sessionID;
134     }
135 
136 
137     /**
138      * Gets the extensions value for this RuntimeContext.
139      * 
140      * @return extensions
141      */
142     public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
143         return extensions;
144     }
145 
146 
147     /**
148      * Sets the extensions value for this RuntimeContext.
149      * 
150      * @param extensions
151      */
152     public void setExtensions(oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
153         this.extensions = extensions;
154     }
155 
156     public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
157         return this.extensions[i];
158     }
159 
160     public void setExtensions(int i, oasis.names.tc.wsrp.v1.types.Extension _value) {
161         this.extensions[i] = _value;
162     }
163 
164     private java.lang.Object __equalsCalc = null;
165     public synchronized boolean equals(java.lang.Object obj) {
166         if (!(obj instanceof RuntimeContext)) return false;
167         RuntimeContext other = (RuntimeContext) obj;
168         if (obj == null) return false;
169         if (this == obj) return true;
170         if (__equalsCalc != null) {
171             return (__equalsCalc == obj);
172         }
173         __equalsCalc = obj;
174         boolean _equals;
175         _equals = true && 
176             ((this.userAuthentication==null && other.getUserAuthentication()==null) || 
177              (this.userAuthentication!=null &&
178               this.userAuthentication.equals(other.getUserAuthentication()))) &&
179             ((this.portletInstanceKey==null && other.getPortletInstanceKey()==null) || 
180              (this.portletInstanceKey!=null &&
181               this.portletInstanceKey.equals(other.getPortletInstanceKey()))) &&
182             ((this.namespacePrefix==null && other.getNamespacePrefix()==null) || 
183              (this.namespacePrefix!=null &&
184               this.namespacePrefix.equals(other.getNamespacePrefix()))) &&
185             ((this.templates==null && other.getTemplates()==null) || 
186              (this.templates!=null &&
187               this.templates.equals(other.getTemplates()))) &&
188             ((this.sessionID==null && other.getSessionID()==null) || 
189              (this.sessionID!=null &&
190               this.sessionID.equals(other.getSessionID()))) &&
191             ((this.extensions==null && other.getExtensions()==null) || 
192              (this.extensions!=null &&
193               java.util.Arrays.equals(this.extensions, other.getExtensions())));
194         __equalsCalc = null;
195         return _equals;
196     }
197 
198     private boolean __hashCodeCalc = false;
199     public synchronized int hashCode() {
200         if (__hashCodeCalc) {
201             return 0;
202         }
203         __hashCodeCalc = true;
204         int _hashCode = 1;
205         if (getUserAuthentication() != null) {
206             _hashCode += getUserAuthentication().hashCode();
207         }
208         if (getPortletInstanceKey() != null) {
209             _hashCode += getPortletInstanceKey().hashCode();
210         }
211         if (getNamespacePrefix() != null) {
212             _hashCode += getNamespacePrefix().hashCode();
213         }
214         if (getTemplates() != null) {
215             _hashCode += getTemplates().hashCode();
216         }
217         if (getSessionID() != null) {
218             _hashCode += getSessionID().hashCode();
219         }
220         if (getExtensions() != null) {
221             for (int i=0;
222                  i<java.lang.reflect.Array.getLength(getExtensions());
223                  i++) {
224                 java.lang.Object obj = java.lang.reflect.Array.get(getExtensions(), i);
225                 if (obj != null &&
226                     !obj.getClass().isArray()) {
227                     _hashCode += obj.hashCode();
228                 }
229             }
230         }
231         __hashCodeCalc = false;
232         return _hashCode;
233     }
234 
235     // Type metadata
236     private static org.apache.axis.description.TypeDesc typeDesc =
237         new org.apache.axis.description.TypeDesc(RuntimeContext.class, true);
238 
239     static {
240         typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "RuntimeContext"));
241         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
242         elemField.setFieldName("userAuthentication");
243         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "userAuthentication"));
244         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
245         typeDesc.addFieldDesc(elemField);
246         elemField = new org.apache.axis.description.ElementDesc();
247         elemField.setFieldName("portletInstanceKey");
248         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "portletInstanceKey"));
249         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
250         elemField.setMinOccurs(0);
251         typeDesc.addFieldDesc(elemField);
252         elemField = new org.apache.axis.description.ElementDesc();
253         elemField.setFieldName("namespacePrefix");
254         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "namespacePrefix"));
255         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
256         elemField.setMinOccurs(0);
257         typeDesc.addFieldDesc(elemField);
258         elemField = new org.apache.axis.description.ElementDesc();
259         elemField.setFieldName("templates");
260         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "templates"));
261         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Templates"));
262         elemField.setMinOccurs(0);
263         typeDesc.addFieldDesc(elemField);
264         elemField = new org.apache.axis.description.ElementDesc();
265         elemField.setFieldName("sessionID");
266         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "sessionID"));
267         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
268         elemField.setMinOccurs(0);
269         typeDesc.addFieldDesc(elemField);
270         elemField = new org.apache.axis.description.ElementDesc();
271         elemField.setFieldName("extensions");
272         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "extensions"));
273         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Extension"));
274         elemField.setMinOccurs(0);
275         typeDesc.addFieldDesc(elemField);
276     }
277 
278     /**
279      * Return type metadata object
280      */
281     public static org.apache.axis.description.TypeDesc getTypeDesc() {
282         return typeDesc;
283     }
284 
285     /**
286      * Get Custom Serializer
287      */
288     public static org.apache.axis.encoding.Serializer getSerializer(
289            java.lang.String mechType, 
290            java.lang.Class _javaType,  
291            javax.xml.namespace.QName _xmlType) {
292         return 
293           new  org.apache.axis.encoding.ser.BeanSerializer(
294             _javaType, _xmlType, typeDesc);
295     }
296 
297     /**
298      * Get Custom Deserializer
299      */
300     public static org.apache.axis.encoding.Deserializer getDeserializer(
301            java.lang.String mechType, 
302            java.lang.Class _javaType,  
303            javax.xml.namespace.QName _xmlType) {
304         return 
305           new  org.apache.axis.encoding.ser.BeanDeserializer(
306             _javaType, _xmlType, typeDesc);
307     }
308 
309 }
310