public class GenericSourceContact extends DataObject implements SourceContact
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ContactDetail> |
contactDetails
The ContactDetails of this SourceContact.
|
DATA_ID
Constructor and Description |
---|
GenericSourceContact(ContactSourceService contactSource,
java.lang.String displayName,
java.util.List<ContactDetail> contactDetails)
Initializes a new AddrBookSourceContact instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContactAddress()
Returns the address of the contact.
|
java.util.List<ContactDetail> |
getContactDetails()
Gets the ContactDetails of this SourceContact.
|
java.util.List<ContactDetail> |
getContactDetails(java.lang.Class<? extends OperationSet> operationSet)
Gets the ContactDetails of this SourceContact which
support a specific OperationSet.
|
java.util.List<ContactDetail> |
getContactDetails(ContactDetail.Category category)
Returns a list of all ContactDetails corresponding to the given
category.
|
ContactSourceService |
getContactSource()
Gets the ContactSourceService which has created this
SourceContact.
|
java.lang.String |
getDisplayDetails()
Gets the display details of this SourceContact.
|
java.lang.String |
getDisplayName()
Gets the display name of this SourceContact.
|
byte[] |
getImage()
Gets the image/avatar of this SourceContact.
|
int |
getIndex()
Returns the index of this source contact in its parent.
|
ContactDetail |
getPreferredContactDetail(java.lang.Class<? extends OperationSet> operationSet)
Gets the preferred ContactDetail for a specific
OperationSet.
|
PresenceStatus |
getPresenceStatus()
Returns the status of the source contact.
|
boolean |
isDefaultImage()
Whether the current image returned by @see #getImage() is the one
provided by the SourceContact by default, or is a one used and obtained
from external source.
|
void |
setContactAddress(java.lang.String contactAddress)
Sets the address of the contact.
|
java.lang.String |
setDisplayDetails(java.lang.String displayDetails)
Sets the display details of this SourceContact.
|
void |
setDisplayName(java.lang.String displayName)
Sets the display name of this SourceContact.
|
void |
setImage(byte[] image)
Sets the image/avatar of this SourceContact.
|
void |
setPresenceStatus(PresenceStatus presenceStatus)
Sets the status of the source contact.
|
getData, setData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getData, setData
protected final java.util.List<ContactDetail> contactDetails
public GenericSourceContact(ContactSourceService contactSource, java.lang.String displayName, java.util.List<ContactDetail> contactDetails)
contactSource
- the ContactSourceService which is creating
the new instancedisplayName
- the display name of the new instancecontactDetails
- the ContactDetails of the new instancepublic java.lang.String getContactAddress()
getContactAddress
in interface SourceContact
public java.util.List<ContactDetail> getContactDetails()
getContactDetails
in interface SourceContact
SourceContact.getContactDetails()
public java.util.List<ContactDetail> getContactDetails(java.lang.Class<? extends OperationSet> operationSet)
getContactDetails
in interface SourceContact
operationSet
- the OperationSet the supporting
ContactDetails of which are to be returnedSourceContact.getContactDetails(Class)
public java.util.List<ContactDetail> getContactDetails(ContactDetail.Category category)
getContactDetails
in interface SourceContact
category
- the OperationSet class we're looking forpublic ContactSourceService getContactSource()
getContactSource
in interface SourceContact
SourceContact.getContactSource()
public java.lang.String getDisplayDetails()
getDisplayDetails
in interface SourceContact
SourceContact.getDisplayDetails()
public void setContactAddress(java.lang.String contactAddress)
setContactAddress
in interface SourceContact
contactAddress
- the address to set.public java.lang.String setDisplayDetails(java.lang.String displayDetails)
displayDetails
- the display details of this SourceContactpublic java.lang.String getDisplayName()
getDisplayName
in interface SourceContact
SourceContact.getDisplayName()
public void setDisplayName(java.lang.String displayName)
displayName
- The display name of this SourceContactpublic byte[] getImage()
getImage
in interface SourceContact
SourceContact.getImage()
public ContactDetail getPreferredContactDetail(java.lang.Class<? extends OperationSet> operationSet)
getPreferredContactDetail
in interface SourceContact
operationSet
- the OperationSet to get the preferred
ContactDetail forSourceContact.getPreferredContactDetail(Class)
public void setImage(byte[] image)
image
- the image/avatar to be set on this SourceContactpublic boolean isDefaultImage()
isDefaultImage
in interface SourceContact
public PresenceStatus getPresenceStatus()
getPresenceStatus
in interface SourceContact
public void setPresenceStatus(PresenceStatus presenceStatus)
presenceStatus
- the status of this contactpublic int getIndex()
getIndex
in interface SourceContact
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.