src/net/java/sip/communicator/impl/protocol/jabber/OperationSetContactCapabilitiesJabberImpl.java
/**
     * Notifies this listener that an <tt>EntityCapsManager</tt> has changed a
     * record for a specific user about the caps node the user has.
     *
     * @param user the user (full JID)
     * @param fullJids a list of all resources of the user (full JIDs)
     * @param online indicates if the given user is online
     */
Notifies this listener that an EntityCapsManager has changed a
record for a specific user about the caps node the user has.

@param user the user (full JID)
@param fullJids a list of all resources of the user (full JIDs)
@param online indicates if the given user is online
Notifies this listener that an EntityCapsManager has changed a record for a specific user about the caps node the user has . @param user the user ( full JID ) @param fullJids a list of all resources of the user ( full JIDs ) @param online indicates if the given user is online
private void userCapsNodeChanged(Jid user, List<Jid> fullJids,
                                     boolean online)
    {
        OperationSetPresence opsetPresence
        = parentProvider.getOperationSet(OperationSetPresence.class);
        if (opsetPresence != null) {
            if(JabberActivator.getConfigurationService()
                .getBoolean(
                    PROP_XMPP_USE_ALL_RESOURCES_FOR_CAPABILITIES,
                    USE_ALL_RESOURCES_FOR_CAPABILITIES_DEFAULT)
                && !fullJids.isEmpty())
            {
                Contact contact = opsetPresence.findContactByID(
                        user.asBareJid().toString());
                if (contact != null)
                {
                    fireContactCapabilitiesEvent(
                        contact,
                        ContactCapabilitiesEvent.
                        SUPPORTED_OPERATION_SETS_CHANGED,
                        getLargestSupportedOperationSet(fullJids));
                }
            }
            else
            {
                Contact contact = opsetPresence.findContactByID(
                        user.asBareJid().toString());
                if (contact != null)
                {
                    if(online)
                    {
                        fireContactCapabilitiesEvent(
                            contact,
                            ContactCapabilitiesEvent.
                            SUPPORTED_OPERATION_SETS_CHANGED,
                            getSupportedOperationSets(user, true));
                    }
                    else
                    {
                        fireContactCapabilitiesEvent(
                            contact,
                            ContactCapabilitiesEvent.
                            SUPPORTED_OPERATION_SETS_CHANGED,
                            getSupportedOperationSets(contact));
                    }
                }
            }
        }
    }
private void userCapsNodeChanged ( Jid user , List < Jid > fullJids , boolean online ) { OperationSetPresence opsetPresence = parentProvider . getOperationSet ( OperationSetPresence . class ) ; if ( opsetPresence != null ) { if ( JabberActivator . getConfigurationService ( ) . getBoolean ( PROP_XMPP_USE_ALL_RESOURCES_FOR_CAPABILITIES , USE_ALL_RESOURCES_FOR_CAPABILITIES_DEFAULT ) && ! fullJids . isEmpty ( ) ) { Contact contact = opsetPresence . findContactByID ( user . asBareJid ( ) . toString ( ) ) ; if ( contact != null ) { fireContactCapabilitiesEvent ( contact , ContactCapabilitiesEvent . SUPPORTED_OPERATION_SETS_CHANGED , getLargestSupportedOperationSet ( fullJids ) ) ; } } else { Contact contact = opsetPresence . findContactByID ( user . asBareJid ( ) . toString ( ) ) ; if ( contact != null ) { if ( online ) { fireContactCapabilitiesEvent ( contact , ContactCapabilitiesEvent . SUPPORTED_OPERATION_SETS_CHANGED , getSupportedOperationSets ( user , true ) ) ; } else { fireContactCapabilitiesEvent ( contact , ContactCapabilitiesEvent . SUPPORTED_OPERATION_SETS_CHANGED , getSupportedOperationSets ( contact ) ) ; } } } } }
Notifies this listener that an <tt>EntityCapsManager</tt> has changed a
 record for a specific user about the caps node the user has.
Notifies this listener that an <tt > EntityCapsManager< / tt > has changed a record for a specific user about the caps node the user has .
// If the contact isn't null and is online we try to discover // the new set of operation sets and to notify interested // parties. Otherwise we ignore the event. // when going online we have received a presence // and make sure we discover this particular jid // for getSupportedOperationSets // when offline, we use the contact, and selecting // the most connected jid // for getSupportedOperationSets