blob: 2b4afdf99d7936611a0fb5241cd989bf36a1e02c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.protocol.jabber;
/**
* The Jabber implementation for Volatile Contact
* @author Damian Minkov
*/
public class VolatileContactJabberImpl
extends ContactJabberImpl
{
/**
* This contact id
*/
private String contactId = null;
/**
* Creates an Volatile JabberContactImpl with the specified id
* @param id String the user id/address
* @param ssclCallback a reference to the ServerStoredContactListImpl
* instance that created us.
*/
VolatileContactJabberImpl(String id,
ServerStoredContactListJabberImpl ssclCallback)
{
super(null, ssclCallback, false, false);
this.contactId = id;
}
/**
* Returns the Jabber Userid of this contact
* @return the Jabber Userid of this contact
*/
public String getAddress()
{
return contactId;
}
/**
* Returns a String that could be used by any user interacting modules for
* referring to this contact. An alias is not necessarily unique but is
* often more human readable than an address (or id).
* @return a String that can be used for referring to this contact when
* interacting with the user.
*/
public String getDisplayName()
{
return contactId;
}
/**
* Returns a string representation of this contact, containing most of its
* representative details.
*
* @return a string representation of this contact.
*/
public String toString()
{
StringBuffer buff = new StringBuffer("VolatileJabberContact[ id=");
buff.append(getAddress()).append("]");
return buff.toString();
}
/**
* Determines whether or not this contact group is being stored by the
* server. Non persistent contact groups exist for the sole purpose of
* containing non persistent contacts.
* @return true if the contact group is persistent and false otherwise.
*/
public boolean isPersistent()
{
return false;
}
}
|