diff options
author | Damian Minkov <damencho@jitsi.org> | 2012-08-17 08:43:13 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2012-08-17 08:43:13 +0000 |
commit | d100493139446a9fc27e40932b1bb9dabd1e0a8f (patch) | |
tree | bd4e3daac0c8923d0622967654373f32bf7f43ff /src/net/java/sip/communicator/service | |
parent | 5012fc910a3cfe22d82ba13125c394e0555e9a5c (diff) | |
download | jitsi-d100493139446a9fc27e40932b1bb9dabd1e0a8f.zip jitsi-d100493139446a9fc27e40932b1bb9dabd1e0a8f.tar.gz jitsi-d100493139446a9fc27e40932b1bb9dabd1e0a8f.tar.bz2 |
Adds get/set data to SourceContacts. Moves custom buttons to ExternalContactSource. Adds listener to refresh contact sources.
Diffstat (limited to 'src/net/java/sip/communicator/service')
3 files changed, 35 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/service/contactsource/GenericSourceContact.java b/src/net/java/sip/communicator/service/contactsource/GenericSourceContact.java index cf84e06..ab382ee 100644 --- a/src/net/java/sip/communicator/service/contactsource/GenericSourceContact.java +++ b/src/net/java/sip/communicator/service/contactsource/GenericSourceContact.java @@ -9,6 +9,7 @@ package net.java.sip.communicator.service.contactsource; import java.util.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
/**
* Implements a generic <tt>SourceContact</tt> for the purposes of the support
@@ -17,6 +18,7 @@ import net.java.sip.communicator.service.protocol.*; * @author Lyubomir Marinov
*/
public class GenericSourceContact
+ extends DataObject
implements SourceContact
{
/**
diff --git a/src/net/java/sip/communicator/service/contactsource/SourceContact.java b/src/net/java/sip/communicator/service/contactsource/SourceContact.java index 9d4536e..d013d7f 100644 --- a/src/net/java/sip/communicator/service/contactsource/SourceContact.java +++ b/src/net/java/sip/communicator/service/contactsource/SourceContact.java @@ -91,4 +91,36 @@ public interface SourceContact * @return the byte array of the image or null if no image is available */ public byte[] getImage(); + + /** + * Gets the user data associated with this instance and a specific key. + * + * @param key the key of the user data associated with this instance to be + * retrieved + * @return an <tt>Object</tt> which represents the value associated with + * this instance and the specified <tt>key</tt>; <tt>null</tt> if no + * association with the specified <tt>key</tt> exists in this instance + */ + public Object getData(Object key); + + /** + * Sets a user-specific association in this instance in the form of a + * key-value pair. If the specified <tt>key</tt> is already associated in + * this instance with a value, the existing value is overwritten with the + * specified <tt>value</tt>. + * <p> + * The user-defined association created by this method and stored in this + * instance is not serialized by this instance and is thus only meant for + * runtime use. + * </p> + * <p> + * The storage of the user data is implementation-specific and is thus not + * guaranteed to be optimized for execution time and memory use. + * </p> + * + * @param key the key to associate in this instance with the specified value + * @param value the value to be associated in this instance with the + * specified <tt>key</tt> + */ + public void setData(Object key, Object value); } diff --git a/src/net/java/sip/communicator/service/contactsource/contactsource.manifest.mf b/src/net/java/sip/communicator/service/contactsource/contactsource.manifest.mf index 7b06df7..4ae0097 100644 --- a/src/net/java/sip/communicator/service/contactsource/contactsource.manifest.mf +++ b/src/net/java/sip/communicator/service/contactsource/contactsource.manifest.mf @@ -4,5 +4,6 @@ Bundle-Vendor: jitsi.org Bundle-Version: 0.0.1 System-Bundle: yes Import-Package: org.osgi.framework, + net.java.sip.communicator.util, net.java.sip.communicator.service.protocol Export-Package: net.java.sip.communicator.service.contactsource |