KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > webservice > action > Rule


1 /**
2  * Rule.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
6  */

7
8 package org.alfresco.webservice.action;
9
10 public class Rule implements java.io.Serializable JavaDoc {
11     private java.lang.String JavaDoc id;
12
13     private java.lang.String JavaDoc ruleType;
14
15     private java.lang.String JavaDoc title;
16
17     private java.lang.String JavaDoc description;
18
19     private boolean executeAsynchronously;
20
21     private org.alfresco.webservice.action.Condition[] conditions;
22
23     private org.alfresco.webservice.action.Action[] actions;
24
25     private java.lang.String JavaDoc runAsUserName;
26
27     private org.alfresco.webservice.types.Reference reference;
28
29     public Rule() {
30     }
31
32     public Rule(
33            java.lang.String JavaDoc id,
34            java.lang.String JavaDoc ruleType,
35            java.lang.String JavaDoc title,
36            java.lang.String JavaDoc description,
37            boolean executeAsynchronously,
38            org.alfresco.webservice.action.Condition[] conditions,
39            org.alfresco.webservice.action.Action[] actions,
40            java.lang.String JavaDoc runAsUserName,
41            org.alfresco.webservice.types.Reference reference) {
42            this.id = id;
43            this.ruleType = ruleType;
44            this.title = title;
45            this.description = description;
46            this.executeAsynchronously = executeAsynchronously;
47            this.conditions = conditions;
48            this.actions = actions;
49            this.runAsUserName = runAsUserName;
50            this.reference = reference;
51     }
52
53
54     /**
55      * Gets the id value for this Rule.
56      *
57      * @return id
58      */

59     public java.lang.String JavaDoc getId() {
60         return id;
61     }
62
63
64     /**
65      * Sets the id value for this Rule.
66      *
67      * @param id
68      */

69     public void setId(java.lang.String JavaDoc id) {
70         this.id = id;
71     }
72
73
74     /**
75      * Gets the ruleType value for this Rule.
76      *
77      * @return ruleType
78      */

79     public java.lang.String JavaDoc getRuleType() {
80         return ruleType;
81     }
82
83
84     /**
85      * Sets the ruleType value for this Rule.
86      *
87      * @param ruleType
88      */

89     public void setRuleType(java.lang.String JavaDoc ruleType) {
90         this.ruleType = ruleType;
91     }
92
93
94     /**
95      * Gets the title value for this Rule.
96      *
97      * @return title
98      */

99     public java.lang.String JavaDoc getTitle() {
100         return title;
101     }
102
103
104     /**
105      * Sets the title value for this Rule.
106      *
107      * @param title
108      */

109     public void setTitle(java.lang.String JavaDoc title) {
110         this.title = title;
111     }
112
113
114     /**
115      * Gets the description value for this Rule.
116      *
117      * @return description
118      */

119     public java.lang.String JavaDoc getDescription() {
120         return description;
121     }
122
123
124     /**
125      * Sets the description value for this Rule.
126      *
127      * @param description
128      */

129     public void setDescription(java.lang.String JavaDoc description) {
130         this.description = description;
131     }
132
133
134     /**
135      * Gets the executeAsynchronously value for this Rule.
136      *
137      * @return executeAsynchronously
138      */

139     public boolean isExecuteAsynchronously() {
140         return executeAsynchronously;
141     }
142
143
144     /**
145      * Sets the executeAsynchronously value for this Rule.
146      *
147      * @param executeAsynchronously
148      */

149     public void setExecuteAsynchronously(boolean executeAsynchronously) {
150         this.executeAsynchronously = executeAsynchronously;
151     }
152
153
154     /**
155      * Gets the conditions value for this Rule.
156      *
157      * @return conditions
158      */

159     public org.alfresco.webservice.action.Condition[] getConditions() {
160         return conditions;
161     }
162
163
164     /**
165      * Sets the conditions value for this Rule.
166      *
167      * @param conditions
168      */

169     public void setConditions(org.alfresco.webservice.action.Condition[] conditions) {
170         this.conditions = conditions;
171     }
172
173     public org.alfresco.webservice.action.Condition getConditions(int i) {
174         return this.conditions[i];
175     }
176
177     public void setConditions(int i, org.alfresco.webservice.action.Condition _value) {
178         this.conditions[i] = _value;
179     }
180
181
182     /**
183      * Gets the actions value for this Rule.
184      *
185      * @return actions
186      */

187     public org.alfresco.webservice.action.Action[] getActions() {
188         return actions;
189     }
190
191
192     /**
193      * Sets the actions value for this Rule.
194      *
195      * @param actions
196      */

197     public void setActions(org.alfresco.webservice.action.Action[] actions) {
198         this.actions = actions;
199     }
200
201     public org.alfresco.webservice.action.Action getActions(int i) {
202         return this.actions[i];
203     }
204
205     public void setActions(int i, org.alfresco.webservice.action.Action _value) {
206         this.actions[i] = _value;
207     }
208
209
210     /**
211      * Gets the runAsUserName value for this Rule.
212      *
213      * @return runAsUserName
214      */

215     public java.lang.String JavaDoc getRunAsUserName() {
216         return runAsUserName;
217     }
218
219
220     /**
221      * Sets the runAsUserName value for this Rule.
222      *
223      * @param runAsUserName
224      */

225     public void setRunAsUserName(java.lang.String JavaDoc runAsUserName) {
226         this.runAsUserName = runAsUserName;
227     }
228
229
230     /**
231      * Gets the reference value for this Rule.
232      *
233      * @return reference
234      */

235     public org.alfresco.webservice.types.Reference getReference() {
236         return reference;
237     }
238
239
240     /**
241      * Sets the reference value for this Rule.
242      *
243      * @param reference
244      */

245     public void setReference(org.alfresco.webservice.types.Reference reference) {
246         this.reference = reference;
247     }
248
249     private java.lang.Object JavaDoc __equalsCalc = null;
250     public synchronized boolean equals(java.lang.Object JavaDoc obj) {
251         if (!(obj instanceof Rule)) return false;
252         Rule other = (Rule) obj;
253         if (obj == null) return false;
254         if (this == obj) return true;
255         if (__equalsCalc != null) {
256             return (__equalsCalc == obj);
257         }
258         __equalsCalc = obj;
259         boolean _equals;
260         _equals = true &&
261             ((this.id==null && other.getId()==null) ||
262              (this.id!=null &&
263               this.id.equals(other.getId()))) &&
264             ((this.ruleType==null && other.getRuleType()==null) ||
265              (this.ruleType!=null &&
266               this.ruleType.equals(other.getRuleType()))) &&
267             ((this.title==null && other.getTitle()==null) ||
268              (this.title!=null &&
269               this.title.equals(other.getTitle()))) &&
270             ((this.description==null && other.getDescription()==null) ||
271              (this.description!=null &&
272               this.description.equals(other.getDescription()))) &&
273             this.executeAsynchronously == other.isExecuteAsynchronously() &&
274             ((this.conditions==null && other.getConditions()==null) ||
275              (this.conditions!=null &&
276               java.util.Arrays.equals(this.conditions, other.getConditions()))) &&
277             ((this.actions==null && other.getActions()==null) ||
278              (this.actions!=null &&
279               java.util.Arrays.equals(this.actions, other.getActions()))) &&
280             ((this.runAsUserName==null && other.getRunAsUserName()==null) ||
281              (this.runAsUserName!=null &&
282               this.runAsUserName.equals(other.getRunAsUserName()))) &&
283             ((this.reference==null && other.getReference()==null) ||
284              (this.reference!=null &&
285               this.reference.equals(other.getReference())));
286         __equalsCalc = null;
287         return _equals;
288     }
289
290     private boolean __hashCodeCalc = false;
291     public synchronized int hashCode() {
292         if (__hashCodeCalc) {
293             return 0;
294         }
295         __hashCodeCalc = true;
296         int _hashCode = 1;
297         if (getId() != null) {
298             _hashCode += getId().hashCode();
299         }
300         if (getRuleType() != null) {
301             _hashCode += getRuleType().hashCode();
302         }
303         if (getTitle() != null) {
304             _hashCode += getTitle().hashCode();
305         }
306         if (getDescription() != null) {
307             _hashCode += getDescription().hashCode();
308         }
309         _hashCode += (isExecuteAsynchronously() ? Boolean.TRUE : Boolean.FALSE).hashCode();
310         if (getConditions() != null) {
311             for (int i=0;
312                  i<java.lang.reflect.Array.getLength(getConditions());
313                  i++) {
314                 java.lang.Object JavaDoc obj = java.lang.reflect.Array.get(getConditions(), i);
315                 if (obj != null &&
316                     !obj.getClass().isArray()) {
317                     _hashCode += obj.hashCode();
318                 }
319             }
320         }
321         if (getActions() != null) {
322             for (int i=0;
323                  i<java.lang.reflect.Array.getLength(getActions());
324                  i++) {
325                 java.lang.Object JavaDoc obj = java.lang.reflect.Array.get(getActions(), i);
326                 if (obj != null &&
327                     !obj.getClass().isArray()) {
328                     _hashCode += obj.hashCode();
329                 }
330             }
331         }
332         if (getRunAsUserName() != null) {
333             _hashCode += getRunAsUserName().hashCode();
334         }
335         if (getReference() != null) {
336             _hashCode += getReference().hashCode();
337         }
338         __hashCodeCalc = false;
339         return _hashCode;
340     }
341
342     // Type metadata
343
private static org.apache.axis.description.TypeDesc typeDesc =
344         new org.apache.axis.description.TypeDesc(Rule.class, true);
345
346     static {
347         typeDesc.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "Rule"));
348         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
349         elemField.setFieldName("id");
350         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "id"));
351         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
352         elemField.setNillable(true);
353         typeDesc.addFieldDesc(elemField);
354         elemField = new org.apache.axis.description.ElementDesc();
355         elemField.setFieldName("ruleType");
356         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "ruleType"));
357         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
358         elemField.setNillable(false);
359         typeDesc.addFieldDesc(elemField);
360         elemField = new org.apache.axis.description.ElementDesc();
361         elemField.setFieldName("title");
362         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "title"));
363         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
364         elemField.setNillable(true);
365         typeDesc.addFieldDesc(elemField);
366         elemField = new org.apache.axis.description.ElementDesc();
367         elemField.setFieldName("description");
368         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "description"));
369         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
370         elemField.setNillable(true);
371         typeDesc.addFieldDesc(elemField);
372         elemField = new org.apache.axis.description.ElementDesc();
373         elemField.setFieldName("executeAsynchronously");
374         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "executeAsynchronously"));
375         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "boolean"));
376         elemField.setNillable(false);
377         typeDesc.addFieldDesc(elemField);
378         elemField = new org.apache.axis.description.ElementDesc();
379         elemField.setFieldName("conditions");
380         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "conditions"));
381         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "Condition"));
382         elemField.setMinOccurs(0);
383         elemField.setNillable(true);
384         elemField.setMaxOccursUnbounded(true);
385         typeDesc.addFieldDesc(elemField);
386         elemField = new org.apache.axis.description.ElementDesc();
387         elemField.setFieldName("actions");
388         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "actions"));
389         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "Action"));
390         elemField.setNillable(false);
391         elemField.setMaxOccursUnbounded(true);
392         typeDesc.addFieldDesc(elemField);
393         elemField = new org.apache.axis.description.ElementDesc();
394         elemField.setFieldName("runAsUserName");
395         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "runAsUserName"));
396         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
397         elemField.setNillable(true);
398         typeDesc.addFieldDesc(elemField);
399         elemField = new org.apache.axis.description.ElementDesc();
400         elemField.setFieldName("reference");
401         elemField.setXmlName(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/service/action/1.0", "reference"));
402         elemField.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "Reference"));
403         elemField.setNillable(true);
404         typeDesc.addFieldDesc(elemField);
405     }
406
407     /**
408      * Return type metadata object
409      */

410     public static org.apache.axis.description.TypeDesc getTypeDesc() {
411         return typeDesc;
412     }
413
414     /**
415      * Get Custom Serializer
416      */

417     public static org.apache.axis.encoding.Serializer getSerializer(
418            java.lang.String JavaDoc mechType,
419            java.lang.Class JavaDoc _javaType,
420            javax.xml.namespace.QName JavaDoc _xmlType) {
421         return
422           new org.apache.axis.encoding.ser.BeanSerializer(
423             _javaType, _xmlType, typeDesc);
424     }
425
426     /**
427      * Get Custom Deserializer
428      */

429     public static org.apache.axis.encoding.Deserializer getDeserializer(
430            java.lang.String JavaDoc mechType,
431            java.lang.Class JavaDoc _javaType,
432            javax.xml.namespace.QName JavaDoc _xmlType) {
433         return
434           new org.apache.axis.encoding.ser.BeanDeserializer(
435             _javaType, _xmlType, typeDesc);
436     }
437
438 }
439
Popular Tags