Source code: plugins/Messenger/DefaultContact.java
1 /*
2 This file is part of DeXter - Java Internet Communication Solution
3 Copyright (c) 2002 Tobias Riemer
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library 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 Lesser General Public
16 License 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
20 /*
21 * DefaultContact.java
22 *
23 * Created on 03. Oktober 2002, 14:59
24 */
25
26 package plugins.Messenger;
27
28
29 /**
30 *
31 * @author Tobias Riemer
32 */
33 public class DefaultContact implements plugins.Messenger.entity.Contact {
34
35
36 /** Creates a new instance of DefaultContact */
37 public DefaultContact() {
38 }
39
40 private String nick; // the login as it appears on the list
41 private String account; // the hotmail passport (xxxxx@hotmail.com
42 private String status; // user status
43
44 boolean blocked = false;
45 boolean reverseList = false;
46 boolean forwardList = false;
47
48 //public Vector pics = new Vector();
49 //public Vector tokkens = new Vector();
50
51
52 public DefaultContact(String account, String nick) {
53 this.nick = nick;
54 this.account = account;
55 this.status = "FLN";
56 }
57
58
59 public String getNick() {
60 return nick;
61 }
62
63 /** Getter for property blocked.
64 * @return Value of property blocked.
65 */
66 public boolean isBlocked() {
67 return blocked;
68 }
69
70 /** Setter for property blocked.
71 * @param blocked New value of property blocked.
72 */
73 public void setBlocked(boolean blocked) {
74 this.blocked = blocked;
75 }
76
77 /** Getter for property reverseList.
78 * @return Value of property reverseList.
79 */
80 public boolean isReverseList() {
81 return reverseList;
82 }
83
84 /** Setter for property reverseList.
85 * @param reverseList New value of property reverseList.
86 */
87 public void setReverseList(boolean reverseList) {
88 this.reverseList = reverseList;
89 }
90
91 /** Getter for property forwardList.
92 * @return Value of property forwardList.
93 */
94 public boolean isForwardList() {
95 return forwardList;
96 }
97
98 /** Setter for property forwardList.
99 * @param forwardList New value of property forwardList.
100 */
101 public void setForwardList(boolean forwardList) {
102 this.forwardList = forwardList;
103 }
104
105
106 public String getAccount() {
107 return account;
108 }
109
110 public String getStatus() {
111 return status;
112 }
113
114 public void setNick(String nick) {
115 this.nick = nick;
116 }
117
118 public void setStatus(String status) {
119 this.status = status;
120 }
121
122 public boolean isOnline() {
123 if (status.equals("FLN")) return false;
124 return true;
125 }
126
127
128 }