Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.contactlist
Class UIContactDetail

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.contactlist.UIContactDetail

public abstract class UIContactDetail
extends Object

The UIContactDetail corresponds to a particular contact detail, phone number, IM identifier, email, etc. which has it's preferred mode of transport ProtocolProviderService.

Author:
Yana Stamcheva

Constructor Summary
UIContactDetail(String address, String displayName, String category, Collection<String> labels, ImageIcon statusIcon, ProtocolProviderService preferredProvider, String preferredProtocol)
          Creates a UIContactDetail by specifying the contact address, the displayName and preferredProvider.
 
Method Summary
 String getAddress()
          Returns the address of this detail.
 String getCategory()
          Returns the category of the underlying detail.
 String getDisplayName()
          Returns the display name of this detail.
 Iterator<String> getLabels()
          Returns an iterator over the collection of labels associated with this detail.
 String getPreferredProtocol(Class<? extends OperationSet> opSetClass)
          Returns the name of the protocol preferred for contacting this detail for the given OperationSet class if no preferred protocol provider is set.
 ProtocolProviderService getPreferredProtocolProvider(Class<? extends OperationSet> opSetClass)
          Returns the protocol provider preferred for contacting this detail for the given OperationSet class.
 String getPrefix()
          Returns the prefix to be used when calling this contact detail.
abstract  PresenceStatus getPresenceStatus()
          Returns the PresenceStatus of this ContactDetail or null if the detail doesn't support presence.
 ImageIcon getStatusIcon()
          Returns the status icon of this contact detail.
 void setPrefix(String prefix)
          Sets the prefix to be used when calling this contact detail.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIContactDetail

public UIContactDetail(String address,
                       String displayName,
                       String category,
                       Collection<String> labels,
                       ImageIcon statusIcon,
                       ProtocolProviderService preferredProvider,
                       String preferredProtocol)
Creates a UIContactDetail by specifying the contact address, the displayName and preferredProvider.

Parameters:
address - the contact address
displayName - the contact display name
category - the category of the underlying contact detail
labels - the collection of labels associated with this detail
statusIcon - the status icon of this contact detail
preferredProvider - the preferred protocol provider
preferredProtocol - the preferred protocol if no protocol provider is set
Method Detail

getDisplayName

public String getDisplayName()
Returns the display name of this detail.

Returns:
the display name of this detail

getAddress

public String getAddress()
Returns the address of this detail.

Returns:
the address of this detail

getCategory

public String getCategory()
Returns the category of the underlying detail.

Returns:
the category of the underlying detail

getLabels

public Iterator<String> getLabels()
Returns an iterator over the collection of labels associated with this detail.

Returns:
an iterator over the collection of labels associated with this detail

getStatusIcon

public ImageIcon getStatusIcon()
Returns the status icon of this contact detail.

Returns:
the status icon of this contact detail

getPreferredProtocolProvider

public ProtocolProviderService getPreferredProtocolProvider(Class<? extends OperationSet> opSetClass)
Returns the protocol provider preferred for contacting this detail for the given OperationSet class.

Parameters:
opSetClass - the OperationSet class for which we're looking for provider
Returns:
the protocol provider preferred for contacting this detail

getPreferredProtocol

public String getPreferredProtocol(Class<? extends OperationSet> opSetClass)
Returns the name of the protocol preferred for contacting this detail for the given OperationSet class if no preferred protocol provider is set.

Parameters:
opSetClass - the OperationSet class for which we're looking for protocol
Returns:
the name of the protocol preferred for contacting this detail

getPrefix

public String getPrefix()
Returns the prefix to be used when calling this contact detail.

Returns:
the prefix to be used when calling this contact detail

setPrefix

public void setPrefix(String prefix)
Sets the prefix to be used when calling this contact detail.

Parameters:
prefix - the prefix to be used when calling this contact detail

getPresenceStatus

public abstract PresenceStatus getPresenceStatus()
Returns the PresenceStatus of this ContactDetail or null if the detail doesn't support presence.

Returns:
the PresenceStatus of this ContactDetail or null if the detail doesn't support presence

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.