KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > description > FaultDesc


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.axis.description;
18
19 import javax.xml.namespace.QName JavaDoc;
20 import java.io.Serializable JavaDoc;
21 import java.util.ArrayList JavaDoc;
22
23 /**
24  * Holds information about a fault for an operation
25  *
26  * @author Glen Daniels (gdaniels@apache.org)
27  * @author Tom Jordahl (tomj@apache.org)
28  */

29 public class FaultDesc implements Serializable JavaDoc {
30     private String JavaDoc name;
31     private QName JavaDoc qname;
32     private ArrayList JavaDoc parameters;
33     private String JavaDoc className;
34     private QName JavaDoc xmlType;
35     private boolean complex;
36
37     /**
38      * Default constructor
39      */

40     public FaultDesc() {
41     }
42
43     /**
44      * Full constructor
45      */

46     public FaultDesc(QName JavaDoc qname, String JavaDoc className,
47                      QName JavaDoc xmlType, boolean complex) {
48         this.qname = qname;
49         this.className = className;
50         this.xmlType = xmlType;
51         this.complex = complex;
52     }
53
54     public QName JavaDoc getQName() {
55         return qname;
56     }
57
58     public void setQName(QName JavaDoc name) {
59         this.qname = name;
60     }
61
62     public String JavaDoc getName()
63     {
64         return name;
65     }
66
67     public void setName(String JavaDoc name)
68     {
69         this.name = name;
70     }
71
72     public ArrayList JavaDoc getParameters() {
73         return parameters;
74     }
75
76     public void setParameters(ArrayList JavaDoc parameters) {
77         this.parameters = parameters;
78     }
79
80     public String JavaDoc getClassName() {
81         return className;
82     }
83
84     public void setClassName(String JavaDoc className) {
85         this.className = className;
86     }
87
88     public boolean isComplex() {
89         return complex;
90     }
91
92     public void setComplex(boolean complex) {
93         this.complex = complex;
94     }
95
96     public QName JavaDoc getXmlType() {
97         return xmlType;
98     }
99
100     public void setXmlType(QName JavaDoc xmlType) {
101         this.xmlType = xmlType;
102     }
103
104     public String JavaDoc toString() {
105         return toString("");
106     }
107     public String JavaDoc toString(String JavaDoc indent) {
108         String JavaDoc text ="";
109         text+= indent + "name: " + getName() + "\n";
110         text+= indent + "qname: " + getQName() + "\n";
111         text+= indent + "type: " + getXmlType() + "\n";
112         text+= indent + "Class: " + getClassName() + "\n";
113         for (int i=0; parameters != null && i < parameters.size(); i++) {
114             text+= indent +" ParameterDesc[" + i + "]:\n";
115             text+= indent + ((ParameterDesc)parameters.get(i)).toString(" ") + "\n";
116         }
117         return text;
118     }
119 }
120
Popular Tags