source: 3thparty/jmessenger/src/nu/fw/jeti/jabber/elements/DiscoItem.java @ 3952

Revision 3952, 1.3 KB checked in by alexandrecorreia, 13 years ago (diff)

Ticket #1710 - Adicao do codigo fonte java do componente jmessenger(jabberit_messenger)

  • Property svn:executable set to *
Line 
1// Created on 26-apr-2003
2package nu.fw.jeti.jabber.elements;
3
4import java.util.Iterator;
5
6import nu.fw.jeti.backend.XMLData;
7import nu.fw.jeti.jabber.JID;
8
9/**
10 * @author E.S. de Boer
11 * The items used in the disco spec
12 * @see nu.fw.jeti.jabber.elements.IQDiscoItems
13 */
14public class DiscoItem extends XMLData implements DiscoveryItem
15{
16        private JID jid;
17        private String name;
18        private String node;
19        private String action;
20
21        public DiscoItem()
22        {}
23
24        public DiscoItem(JID jid,String name,String node,String action)
25        {
26                this.jid = jid;
27                this.name = name;
28                this.node = node;
29                this.action = action;
30        }
31
32       
33        public JID getJID()
34        {
35                return jid;
36        }
37
38        public String getName()
39        {
40                return name;
41        }
42
43        public String getNode()
44        {
45                return node;
46        }
47
48        public String getAction()
49        {
50                return action;
51        }
52       
53        //---------------DiscoveryItem------------------------
54        public Iterator getItems(){return null;}
55       
56        public int getSize() {return 0;}
57       
58        public boolean hasItems(){return false;}
59
60        public void appendToXML(StringBuffer xml)
61        {
62                xml.append("<item");
63                appendAttribute(xml, "jid", jid);
64                appendAttribute(xml, "name", name);
65                appendAttribute(xml, "node", node);
66                appendAttribute(xml, "action", action);
67                xml.append("/>");
68        }
69}
70
71/*
72 * Overrides for emacs
73 * Local variables:
74 * tab-width: 4
75 * End:
76 */
Note: See TracBrowser for help on using the repository browser.