Revision 3030,
943 bytes
checked in by amuller, 14 years ago
(diff) |
Ticket #1135 - Aplicando alteracoes para o modulo jabberit_messenger.
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[3030] | 1 | package nu.fw.jeti.jabber.elements; |
---|
| 2 | |
---|
| 3 | import 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 | |
---|
| 14 | public 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.