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

Revision 3952, 943 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
3import nu.fw.jeti.util.I18N;
4
5/**
6 * <p>Title: im</p>
7 * <p>Description: </p>
8 * <p>Copyright: Copyright (c) 2001</p>
9 * <p>Company: </p>
10 * @author E.S. de Boer
11 * @version 1.0
12 */
13
14public class InfoQueryBuilder extends PacketBuilder
15{
16        private String type;
17
18        public InfoQueryBuilder()
19    {
20                reset();
21    }
22
23        //public void reset(){reset;}
24
25        public void setType(String type){this.type =type;}
26
27        public String getType(){return type;}
28
29        public Packet build() throws InstantiationException
30        {
31                if(type == null) throw new InstantiationException(I18N.gettext("main.error.type_must_be_specified"));
32                if(!(type.equals("get") || type.equals("set") || type.equals("result") || type.equals("error")))
33                {
34                    throw new InstantiationException(I18N.gettext("main.error.wrong_type") + ": " + type);
35                }
36
37                return new InfoQuery(this);
38        }
39}
40/*
41 * Overrides for emacs
42 * Local variables:
43 * tab-width: 4
44 * End:
45 */
Note: See TracBrowser for help on using the repository browser.