1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.dexterim.msn;
20
21 import net.sf.dexterim.core.AbstractContact;
22 import net.sf.dexterim.core.ContactState;
23
24 /***
25 *@author Christoph Walcher
26 */
27 public class MsnContact extends AbstractContact {
28 private boolean reverseList = false;
29 private boolean forwardList = false;
30 private boolean allowList = false;
31 private boolean blockList = false;
32 private String phoneHome;
33 private String phoneWork;
34 private String phoneMobile;
35
36 /***
37 * Constructor for the MsnContact object
38 *
39 *@param account Description of the Parameter
40 *@param nick Description of the Parameter
41 *@param status Description of the Parameter
42 */
43 public MsnContact(String account, String nick, String status) {
44 super(account, nick, status);
45 }
46
47 /***
48 * Creates a new instance of MsnContact
49 *
50 *@param account Description of the Parameter
51 *@param nick Description of the Parameter
52 */
53 public MsnContact(String account, String nick) {
54 this(account, nick, "FLN");
55 }
56
57 /***
58 * Constructor for the MsnContact object
59 *
60 *@param account Description of the Parameter
61 */
62 public MsnContact(String account) {
63 this(account, account);
64 }
65
66 /***
67 * Getter for property reverseList.
68 *
69 *@return Value of property reverseList.
70 */
71 public boolean isReverseList() {
72 return reverseList;
73 }
74
75 /***
76 * Setter for property reverseList.
77 *
78 *@param reverseList New value of property reverseList.
79 */
80 public void setReverseList(boolean reverseList) {
81 this.reverseList = reverseList;
82 }
83
84 /***
85 * Getter for property forwardList.
86 *
87 *@return Value of property forwardList.
88 */
89 public boolean isForwardList() {
90 return forwardList;
91 }
92
93 /***
94 * Setter for property forwardList.
95 *
96 *@param forwardList New value of property forwardList.
97 */
98 public void setForwardList(boolean forwardList) {
99 this.forwardList = forwardList;
100 }
101
102 /***
103 * Getter for property phoneHome.
104 *
105 *@return Value of property phoneHome.
106 */
107 public java.lang.String getPhoneHome() {
108 return phoneHome;
109 }
110
111 /***
112 * Setter for property phoneHome.
113 *
114 *@param phoneHome New value of property phoneHome.
115 */
116 public void setPhoneHome(java.lang.String phoneHome) {
117 this.phoneHome = phoneHome;
118 }
119
120 /***
121 * Getter for property phoneWork.
122 *
123 *@return Value of property phoneWork.
124 */
125 public java.lang.String getPhoneWork() {
126 return phoneWork;
127 }
128
129 /***
130 * Setter for property phoneWork.
131 *
132 *@param phoneWork New value of property phoneWork.
133 */
134 public void setPhoneWork(java.lang.String phoneWork) {
135 this.phoneWork = phoneWork;
136 }
137
138 /***
139 * Getter for property phoneMobile.
140 *
141 *@return Value of property phoneMobile.
142 */
143 public java.lang.String getPhoneMobile() {
144 return phoneMobile;
145 }
146
147 /***
148 * Setter for property phoneMobile.
149 *
150 *@param phoneMobile New value of property phoneMobile.
151 */
152 public void setPhoneMobile(java.lang.String phoneMobile) {
153 this.phoneMobile = phoneMobile;
154 }
155
156 /***
157 * Gets the status attribute of the MsnContact object
158 *
159 *@return The status value
160 */
161 public String getStatus() {
162 if (isReverseList() && isForwardList()) {
163 if (isBlockList()) {
164 return "BLK";
165 }
166 else {
167 return super.getStatus();
168 }
169 }
170 else {
171 return "FLN";
172 }
173 }
174
175 /***
176 * Gets the online attribute of the MsnContact object
177 *
178 *@return The online value
179 */
180 public boolean isOnline() {
181 String status = getStatus();
182
183 return !"FLN".equals(status) && !"BLK".equals(status);
184 }
185
186 /***
187 * Getter for property allowList.
188 *
189 *@return Value of property allowList.
190 */
191 public boolean isAllowList() {
192 return allowList;
193 }
194
195 /***
196 * Setter for property allowList.
197 *
198 *@param allowList New value of property allowList.
199 */
200 public void setAllowList(boolean allowList) {
201 this.allowList = allowList;
202 }
203
204 /***
205 * Getter for property blockList.
206 *
207 *@return Value of property blockList.
208 */
209 public boolean isBlockList() {
210 return blockList;
211 }
212
213 /***
214 * Setter for property blockList.
215 *
216 *@param blockList New value of property blockList.
217 */
218 public void setBlockList(boolean blockList) {
219 this.blockList = blockList;
220 }
221
222 /***
223 * Gets the iD attribute of the MsnContact object
224 *
225 *@return The iD value
226 */
227 public Object getID() {
228 return getAccount();
229 }
230
231
232
233
234 public Object getIdentity() {
235
236 return null;
237 }
238
239
240
241
242 public String getFriendlyName() {
243
244 return null;
245 }
246
247
248
249
250 public ContactState getState() {
251
252 return null;
253 }
254
255
256
257
258 public void changeState(Object stateID) {
259
260 }
261 }