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

Revision 3952, 896 bytes 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 
1package nu.fw.jeti.jabber.elements;
2
3/**
4 * <p>Title: im</p>
5 * <p>Description: </p>
6 * <p>Copyright: Copyright (c) 2001</p>
7 * <p>Company: </p>
8 * @author E.S. de Boer
9 * @version 1.0
10 */
11
12public class MessageBuilder extends PacketBuilder
13{
14        public String body;
15        public String thread;
16        public String subject;
17        public String type;
18
19        public void reset()
20        {
21                super.reset();
22            body = null;
23                thread=null;
24                subject=null;
25        }
26       
27        public void addXExtension(XExtension extension)
28        {
29                if(extension == null) return;
30            addExtension((Extension)extension);
31        }
32
33        public Packet build()
34        {
35                if(type==null) type = "normal";
36                else
37                {
38                    if(!(type.equals("headline")||
39                             type.equals("chat")||
40                             type.equals("groupchat")||
41                             type.equals("error")))
42                                 type = "normal";
43                }
44                return new Message(this);
45        }
46}
47/*
48 * Overrides for emacs
49 * Local variables:
50 * tab-width: 4
51 * End:
52 */
Note: See TracBrowser for help on using the repository browser.