Revision 1014,
1.6 KB
checked in by alexandrecorreia, 15 years ago
(diff) |
Ticket #552 - Inclusão do projeto Java referente ao applet do módulo.
|
Line | |
---|
1 | package nu.fw.jeti.jabber.elements; |
---|
2 | |
---|
3 | import java.util.ArrayList; |
---|
4 | import java.util.LinkedList; |
---|
5 | import java.util.List; |
---|
6 | |
---|
7 | import nu.fw.jeti.jabber.JID; |
---|
8 | |
---|
9 | /** |
---|
10 | * @author E.S. de Boer |
---|
11 | * @version 1.0 |
---|
12 | */ |
---|
13 | |
---|
14 | public class IQBrowseBuilder |
---|
15 | { |
---|
16 | private List namespaces; |
---|
17 | private String name; |
---|
18 | private String type; |
---|
19 | private String category; |
---|
20 | private JID jid; |
---|
21 | private String version; |
---|
22 | private List childItems; |
---|
23 | |
---|
24 | public void reset() |
---|
25 | { |
---|
26 | name=null; |
---|
27 | type =null; |
---|
28 | category=null; |
---|
29 | jid =null; |
---|
30 | namespaces =null; |
---|
31 | childItems = null; |
---|
32 | } |
---|
33 | |
---|
34 | public String getName(){return name;} |
---|
35 | |
---|
36 | public void setName(String name){this.name =name;} |
---|
37 | |
---|
38 | public String getType(){return type;} |
---|
39 | |
---|
40 | public void setType(String type){this.type = type;} |
---|
41 | |
---|
42 | public String getVersion(){return version;} |
---|
43 | |
---|
44 | public void setVersion(String version){this.version = version;} |
---|
45 | |
---|
46 | public String getCategory(){return category;} |
---|
47 | |
---|
48 | public void setCategory(String category){this.category =category;} |
---|
49 | |
---|
50 | public JID getJID(){return jid;} |
---|
51 | |
---|
52 | public void setJID(JID jid){this.jid = jid;} |
---|
53 | |
---|
54 | public List getItems(){return childItems;} |
---|
55 | |
---|
56 | public void addItem(IQBrowse item) |
---|
57 | { |
---|
58 | if(childItems == null) childItems = new ArrayList(); |
---|
59 | childItems.add(item); |
---|
60 | } |
---|
61 | |
---|
62 | public List getNamespaces() |
---|
63 | { |
---|
64 | return namespaces; |
---|
65 | } |
---|
66 | |
---|
67 | public void addNamespace(String namespace) |
---|
68 | { |
---|
69 | if(namespaces == null) namespaces = new LinkedList(); |
---|
70 | namespaces.add(namespace); |
---|
71 | } |
---|
72 | |
---|
73 | public IQBrowse build() |
---|
74 | { |
---|
75 | //if(jid == null) throw new InstantiationException("jid may not be null"); |
---|
76 | return new IQBrowse(this); |
---|
77 | } |
---|
78 | } |
---|
79 | |
---|
80 | /* |
---|
81 | * Overrides for emacs |
---|
82 | * Local variables: |
---|
83 | * tab-width: 4 |
---|
84 | * End: |
---|
85 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.