Interface RosterItem

  • All Superinterfaces:
    Addressable, SubscriptionState
    All Known Implementing Classes:
    Contact

    public interface RosterItem
    extends Addressable, SubscriptionState
    Represents a roster item. This interface is implemented already by Contact and could be implemented by database entities as well to allow for easy conversion between database entities and XMPP elements.

    Subscription state of an XMPP entity is always represented in a roster item, therefore this interface extends SubscriptionState.

    • Method Detail

      • getName

        String getName()
        Gets the name of the contact.

        2.1.2.4. Name Attribute

        The 'name' attribute of the <item/> element specifies the "handle" to be associated with the JID, as determined by the user (not the contact). Although the value of the 'name' attribute MAY have meaning to a human user, it is opaque to the server. However, the 'name' attribute MAY be used by the server for matching purposes within the context of various XMPP extensions (one possible comparison method is that described for XMPP resourceparts in [XMPP-ADDR]).

        It is OPTIONAL for a client to include the 'name' attribute when adding or updating a roster item.

        Returns:
        The name.
      • isApproved

        boolean isApproved()
        Gets the subscription pre-approval status.

        2.1.2.1. Approved Attribute

        The boolean 'approved' attribute with a value of "true" is used to signal subscription pre-approval as described under Section 3.4

        Returns:
        True, if the contact is pre approved.
      • getGroups

        List<String> getGroups()
        Gets the groups of the contact.
        Returns:
        The groups.