1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.dexterim.msn.message;
20
21 import java.util.StringTokenizer;
22
23 import net.sf.dexterim.msn.MsnConnection;
24 import net.sf.dexterim.msn.util.SpecialCharacters;
25
26 /***
27 *@author Christoph Walcher
28 */
29 public class PersonalInformationMessage extends SingleLineMessage {
30 private String phoneNumber;
31 private String type;
32
33 /***
34 * Description of the Field
35 */
36 public final static String WORK = "PHW";
37
38 /***
39 * Description of the Field
40 */
41 public final static String HOME = "PHH";
42
43 /***
44 * Description of the Field
45 */
46 public final static String MOBILE = "PHM";
47
48 public final static String SCREEN_NAME = "MFN";
49
50 /***
51 * Creates a new instance of BuddyPhoneMessage
52 */
53 public PersonalInformationMessage() {
54 }
55
56 /***
57 * Gets the messageCommand attribute of the PersonalInformationMessage object
58 *
59 *@return The messageCommand value
60 */
61 public String getMessageCommand() {
62 return MsnMessageFactory.CMD_PERSONAL_PHONE_NUMBER;
63 }
64
65 /***
66 * Getter for property type.
67 *
68 *@return Value of property type.
69 */
70 public String getType() {
71 return type;
72 }
73
74 /***
75 * Getter for property phoneNumber.
76 *
77 *@return Value of property phoneNumber.
78 */
79 public String getPhoneNumber() {
80 return phoneNumber;
81 }
82
83 /***
84 * Adds a feature to the Line attribute of the PersonalInformationMessage object
85 *
86 *@param line The feature to be added to the Line attribute
87 *@return Description of the Return Value
88 */
89 public MsnMessage addLine(String line) {
90
91
92 StringTokenizer st = new StringTokenizer(line);
93
94 st.nextToken();
95
96
97 st.nextToken();
98
99
100 st.nextToken();
101
102
103 if (st.hasMoreTokens()) {
104 phoneNumber =
105 SpecialCharacters.getInstance().decode(
106 st.nextToken(),
107 true);
108 }
109
110 return this;
111 }
112
113
114
115
116 public void process(MsnConnection connection) {
117
118
119 }
120 }