public class ContactDetail
extends java.lang.Object
Example: A ContactDetail could define two types of communication, by declaring two supported operation sets OperationSetBasicInstantMessaging to indicate the support of instant messages and OperationSetBasicTelephony to indicate the support of telephony. It may then specify a certain ProtocolProviderService to go through only for instant messages. This would mean that for sending an instant message to this ContactDetail one should obtain an instance of the OperationSetBasicInstantMessaging from the specific ProtocolProviderService and send a message through it. However when no provider is specified for telephony operations, then one should try to obtain all currently available telephony providers and let the user make their choice.
Modifier and Type | Class and Description |
---|---|
static class |
ContactDetail.Category
Defines all possible categories for a ContactDetail.
|
static class |
ContactDetail.SubCategory
Defines all possible sub-categories for a ContactDetail.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
contactDetailValue
The address of this contact detail.
|
Constructor and Description |
---|
ContactDetail(java.lang.String contactDetailValue)
Creates a ContactDetail by specifying the contact address,
corresponding to this detail.
|
ContactDetail(java.lang.String contactDetailValue,
ContactDetail.Category category)
Initializes a new ContactDetail instance which is to represent a
specific contact address and which is to be optionally labeled with a
specific set of labels.
|
ContactDetail(java.lang.String contactDetailValue,
ContactDetail.Category category,
ContactDetail.SubCategory[] subCategories)
Initializes a new ContactDetail instance which is to represent a
specific contact address and which is to be optionally labeled with a
specific set of labels.
|
ContactDetail(java.lang.String contactDetailValue,
java.lang.String detailDisplayName)
Creates a ContactDetail by specifying the contact address,
corresponding to this detail.
|
ContactDetail(java.lang.String contactDetailValue,
java.lang.String detailDisplayName,
ContactDetail.Category category)
Initializes a new ContactDetail instance which is to represent a
specific contact address and which is to be optionally labeled with a
specific set of labels.
|
ContactDetail(java.lang.String contactDetailValue,
java.lang.String detailDisplayName,
ContactDetail.Category category,
ContactDetail.SubCategory[] subCategories)
Initializes a new ContactDetail instance which is to represent a
specific contact address and which is to be optionally labeled with a
specific set of labels.
|
Modifier and Type | Method and Description |
---|---|
void |
addSupportedOpSet(java.lang.Class<? extends OperationSet> supportedOpSet)
Adds a supported OpSet to the list of supported OpSets.
|
boolean |
containsSubCategory(ContactDetail.SubCategory subCategory)
Determines whether the set of labels of this ContactDetail
contains a specific label.
|
ContactDetail.Category |
getCategory()
Gets the category, if any, of this ContactQuery.
|
java.lang.String |
getDetail()
Returns the contact address corresponding to this detail.
|
java.lang.String |
getDisplayName()
Returns the display name of this detail.
|
java.lang.String |
getPreferredProtocol(java.lang.Class<? extends OperationSet> opSetClass)
Returns the name of the preferred protocol for the operation given by
the opSetClass.
|
ProtocolProviderService |
getPreferredProtocolProvider(java.lang.Class<? extends OperationSet> opSetClass)
Returns the preferred ProtocolProviderService when using the
given opSetClass.
|
java.util.Collection<ContactDetail.SubCategory> |
getSubCategories()
Gets the set of labels of this ContactDetail.
|
java.util.List<java.lang.Class<? extends OperationSet>> |
getSupportedOperationSets()
Returns a list of all supported OperationSet classes, which
would indicate what are the supported actions by this contact
(e.g.
|
void |
setPreferredProtocols(java.util.Map<java.lang.Class<? extends OperationSet>,java.lang.String> preferredProtocols)
Sets a mapping of a preferred preferredProtocol for a specific
OperationSet.
|
void |
setPreferredProviders(java.util.Map<java.lang.Class<? extends OperationSet>,ProtocolProviderService> preferredProviders)
Sets a mapping of preferred ProtocolProviderServices for
a specific OperationSet.
|
void |
setSupportedOpSets(java.util.List<java.lang.Class<? extends OperationSet>> supportedOpSets)
Creates a ContactDetail by specifying the corresponding contact
address and a list of all supportedOpSets, indicating what are
the supporting actions with this contact detail (e.g.
|
protected java.lang.String contactDetailValue
public ContactDetail(java.lang.String contactDetailValue)
contactDetailValue
- the contact detail value corresponding to this
detailpublic ContactDetail(java.lang.String contactDetailValue, java.lang.String detailDisplayName)
contactDetailValue
- the contact detail value corresponding to this
detaildetailDisplayName
- the display name of this detailpublic ContactDetail(java.lang.String contactDetailValue, ContactDetail.Category category)
contactDetailValue
- the contact detail value to be represented by
the new ContactDetail instancecategory
- public ContactDetail(java.lang.String contactDetailValue, java.lang.String detailDisplayName, ContactDetail.Category category)
contactDetailValue
- the contact detail value to be represented by
the new ContactDetail instancedetailDisplayName
- the display name of this detailcategory
- public ContactDetail(java.lang.String contactDetailValue, ContactDetail.Category category, ContactDetail.SubCategory[] subCategories)
contactDetailValue
- the contact detail value to be represented by
the new ContactDetail instancecategory
- subCategories
- the set of sub categories with which the new
ContactDetail instance is to be labeled.public ContactDetail(java.lang.String contactDetailValue, java.lang.String detailDisplayName, ContactDetail.Category category, ContactDetail.SubCategory[] subCategories)
contactDetailValue
- the contact detail value to be represented by
the new ContactDetail instancedetailDisplayName
- the display name of this detailcategory
- subCategories
- the set of sub categories with which the new
ContactDetail instance is to be labeled.public void setPreferredProviders(java.util.Map<java.lang.Class<? extends OperationSet>,ProtocolProviderService> preferredProviders)
preferredProviders
- a mapping of preferred
ProtocolProviderServices for specific OperationSet
classespublic void setPreferredProtocols(java.util.Map<java.lang.Class<? extends OperationSet>,java.lang.String> preferredProtocols)
preferredProtocols
- a mapping of preferred
ProtocolProviderServices for specific OperationSet
classespublic void setSupportedOpSets(java.util.List<java.lang.Class<? extends OperationSet>> supportedOpSets)
supportedOpSets
- a list of all supportedOpSets, indicating
what are the supporting actions with this contact detail (e.g. sending a
message, making a call, etc.)public void addSupportedOpSet(java.lang.Class<? extends OperationSet> supportedOpSet)
supportedOpSet
- the OpSet to support.public ContactDetail.Category getCategory()
public java.lang.String getDetail()
public java.lang.String getDisplayName()
public ProtocolProviderService getPreferredProtocolProvider(java.lang.Class<? extends OperationSet> opSetClass)
opSetClass
- the OperationSet class corresponding to a
certain action (e.g. sending an instant message, making a call, etc.).public java.lang.String getPreferredProtocol(java.lang.Class<? extends OperationSet> opSetClass)
opSetClass
- the OperationSet class corresponding to a
certain action (e.g. sending an instant message, making a call, etc.).public java.util.List<java.lang.Class<? extends OperationSet>> getSupportedOperationSets()
public boolean containsSubCategory(ContactDetail.SubCategory subCategory)
subCategory
- the subCategory to be determined whether
it is contained in this ContactDetailpublic java.util.Collection<ContactDetail.SubCategory> getSubCategories()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.