1 package org.codehaus.xfire.service;
2
3 import javax.xml.namespace.QName;
4
5 import org.codehaus.xfire.wsdl.SchemaType;
6
7
8 /***
9 * Represents the description of a service operation message part.
10 * <p/>
11 * Message parts are created using the {@link MessageInfo#addMessagePart} or {@link FaultInfo#addMessagePart} method.
12 *
13 * @author <a href="mailto:poutsma@mac.com">Arjen Poutsma</a>
14 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
15 */
16 public class MessagePartInfo
17 implements Visitable
18 {
19 private QName name;
20 private Class typeClass;
21 private MessagePartContainer container;
22 private SchemaType schemaType;
23 private int index;
24
25 MessagePartInfo(QName name, Class typeClass, MessagePartContainer container)
26 {
27 this.name = name;
28 this.typeClass = typeClass;
29 this.container = container;
30 }
31
32 /***
33 * @return Returns the name.
34 */
35 public QName getName()
36 {
37 return name;
38 }
39
40 /***
41 * @param name The name to set.
42 */
43 public void setName(QName name)
44 {
45 this.name = name;
46 }
47
48 public Class getTypeClass()
49 {
50 return typeClass;
51 }
52
53 public void setTypeClass(Class typeClass)
54 {
55 this.typeClass = typeClass;
56 }
57
58 public MessagePartContainer getContainer()
59 {
60 return container;
61 }
62
63 public int getIndex()
64 {
65 return index;
66 }
67
68 public void setIndex(int index)
69 {
70 this.index = index;
71 }
72
73 public SchemaType getSchemaType()
74 {
75 return schemaType;
76 }
77
78 public void setSchemaType(SchemaType schemaType)
79 {
80 this.schemaType = schemaType;
81 }
82
83 /***
84 * Acceps the given visitor.
85 *
86 * @param visitor the visitor.
87 */
88 public void accept(Visitor visitor)
89 {
90 visitor.startMessagePart(this);
91 visitor.endMessagePart(this);
92 }
93 }