Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface OperationSetContactTypeInfo

All Superinterfaces:
OperationSet
All Known Implementing Classes:
OperationSetContactTypeInfoImpl

public interface OperationSetContactTypeInfo
extends OperationSet

Operation set used for type of contacts, retrieving changing and creating contacts with types.

Author:
Damian Minkov

Method Summary
 String getContactType(Contact contact)
          Access the contact type.
 void setContactType(Contact contact, String contactType)
          Sets the contact type of the contact.
 void subscribe(ContactGroup parent, String contactIdentifier, String contactType)
          Persistently adds a subscription for the presence status of the contact corresponding to the specified contactIdentifier and indicates that it should be added to the specified group of the server stored contact list.
 void subscribe(String contactIdentifier, String contactType)
          Persistently adds a subscription for the presence status of the contact corresponding to the specified contactIdentifier to the top level group.
 

Method Detail

getContactType

String getContactType(Contact contact)
Access the contact type. If none specified null is returned.

Parameters:
contact - the contact to be queried for type.
Returns:
the contact type or null if missing.

setContactType

void setContactType(Contact contact,
                    String contactType)
Sets the contact type of the contact.

Parameters:
contact - the contact to be changed.
contactType - the type set to the contact.

subscribe

void subscribe(String contactIdentifier,
               String contactType)
               throws IllegalArgumentException,
                      IllegalStateException,
                      OperationFailedException
Persistently adds a subscription for the presence status of the contact corresponding to the specified contactIdentifier to the top level group. Note that this method, unlike the subscribe method in OperationSetPresence, is going the subscribe the specified contact in a persistent manner or in other words, it will add it to a server stored contact list and thus making the subscription for its presence status last along multiple registrations/logins/signons.

Apart from an exception in the case of an immediate failure, the method won't return any indication of success or failure. That would happen later on through a SubscriptionEvent generated by one of the methods of the SubscriptionListener.

Parameters:
contactIdentifier - the contact whose status updates we are subscribing for.

contactType - the type of the newly created contact.
Throws:
OperationFailedException - with code NETWORK_FAILURE if subscribing fails due to errors experienced during network communication
IllegalArgumentException - if contact is not a contact known to the underlying protocol provider
IllegalStateException - if the underlying protocol provider is not registered/signed on a public service.

subscribe

void subscribe(ContactGroup parent,
               String contactIdentifier,
               String contactType)
               throws IllegalArgumentException,
                      IllegalStateException,
                      OperationFailedException
Persistently adds a subscription for the presence status of the contact corresponding to the specified contactIdentifier and indicates that it should be added to the specified group of the server stored contact list. Note that apart from an exception in the case of an immediate failure, the method won't return any indication of success or failure. That would happen later on through a SubscriptionEvent generated by one of the methods of the SubscriptionListener.

Parameters:
contactIdentifier - the contact whose status updates we are subscribing for.
parent - the parent group of the server stored contact list where the contact should be added.

contactType - the type of the newly created contact.
Throws:
OperationFailedException - with code NETWORK_FAILURE if subscribing fails due to errors experienced during network communication
IllegalArgumentException - if contact or parent are not a contact known to the underlying protocol provider.
IllegalStateException - if the underlying protocol provider is not registered/signed on a public service.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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