View Javadoc

1   //////////////////////////////////////////////////////////////////////////////
2   // dexterIM - Instant Messaging Framework
3   // Copyright (C) 2003  Christoph Walcher
4   //
5   // This program is free software; you can redistribute it and/or modify
6   // it under the terms of the GNU General Public License as published by
7   // the Free Software Foundation; either version 2 of the License, or
8   // (at your option) any later version.
9   //
10  // This program is distributed in the hope that it will be useful,
11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  // GNU General Public License for more details.
14  //
15  // You should have received a copy of the GNU General Public License
16  // along with this program; if not, write to the Free Software
17  // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  //////////////////////////////////////////////////////////////////////////////
19  package net.sf.dexterim.msn;
20  
21  import java.util.List;
22  
23  import net.sf.dexterim.core.DefaultStatus;
24  import net.sf.dexterim.core.DefaultStatusModel;
25  import net.sf.dexterim.core.Status;
26  
27  /***
28   *  Description of the Class
29   *
30   *@author     christoph
31   */
32  public class MsnStatusModel extends DefaultStatusModel {
33    /***
34     *  Description of the Field
35     */
36    public final static String ONLINE = "NLN";
37  
38    /***
39     *  Description of the Field
40     */
41    public final static String OFFLINE = "FLN";
42  
43    /***
44     *  Description of the Field
45     */
46    public final static String IDLE = "IDL";
47  
48    /***
49     *  Description of the Field
50     */
51    public final static String APPEAR_OFFLINE = "HDN";
52  
53    /***
54     *  Description of the Field
55     */
56    public final static String AWAY = "AWY";
57  
58    /***
59     *  Description of the Field
60     */
61    public final static String BUSY = "BSY";
62  
63    /***
64     *  Description of the Field
65     */
66    public final static String PHONE = "PHN";
67  
68    /***
69     *  Description of the Field
70     */
71    public final static String LUNCH = "LUN";
72  
73    /***
74     *  Description of the Field
75     */
76    public final static String RIGHT_BACK = "BRB";
77  
78    /***
79     *  Description of the Field
80     */
81    public final static String BLOCKED = "BLK";
82  
83    /***
84     *  Constructor for the MsnStatusModel object
85     */
86    public MsnStatusModel() {
87      super();
88    }
89  
90    /***
91     *  Description of the Method
92     *
93     *@return    Description of the Return Value
94     */
95    protected List createStatusList() {
96      List statusList = new java.util.Vector();
97  
98      Status s = new DefaultStatus("Online", ONLINE);
99  
100     statusList.add(s);
101     s = new DefaultStatus("Offline", OFFLINE);
102     statusList.add(s);
103     s = new DefaultStatus("Idle", IDLE);
104     statusList.add(s);
105     s = new DefaultStatus("Appear Offline", APPEAR_OFFLINE);
106     statusList.add(s);
107     s = new DefaultStatus("Away", AWAY);
108     statusList.add(s);
109     s = new DefaultStatus("Busy", BUSY);
110     statusList.add(s);
111     s = new DefaultStatus("On the Phone", PHONE);
112     statusList.add(s);
113     s = new DefaultStatus("Out to Lunch", LUNCH);
114     statusList.add(s);
115     s = new DefaultStatus("Be Right Back", RIGHT_BACK);
116     statusList.add(s);
117     s = new DefaultStatus("Blocked", BLOCKED);
118     statusList.add(s);
119 
120     return statusList;
121   }
122 }