Interface InvitationsManager


@Exported public interface InvitationsManager
The access point for all operations related to sending and receiving invitations among users for forming social connections.

An instance of this can be obtained via a call to ConnectionsServiceFactory.getInvitationsManager().

Since:
release specific (what release of product did this appear in)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    acceptInvitation(String invitationId)
    Allows the current user to accept a specific invitation that was sent to him/her previously by some other user.
    void
    Registers all the InvitationListeners to an arraylist of InvitationListener
    Returns List contatining all instances of class implementing InvitationListeners
    Returns the pending invitations that have been received by the current user.
    Returns the pending invitations that have been sent by the current user.
    void
    ignoreInvitation(String invitationId)
    Allows the current user to ignore a specific invitation that was sent to him/her previously by some other user.
    void
    inviteUser(String userGuid, String invitationMessage)
    Allows the current user to invite another user to form a connection.
    void
    inviteUser(String userGuid, String invitationMessage, Collection<String> connectionListNames)
    Allows the current user to invite another user to form a connection and additionally get the user added to specified connection lists belonging to the current user upon forming the connection.
    void
    rejectInvitation(String invitationId, String rejectionMessage)
    Allows the current user to decline a specific invitation that was sent to him/her previously by some other user.
    void
    Removes the InvitationListeners from the arraylist of InvitationListener
  • Method Details

    • addInvitationListener

      void addInvitationListener(InvitationListener listener) throws ConnectionsException
      Registers all the InvitationListeners to an arraylist of InvitationListener
      Parameters:
      object - of a class that implements InvitationListener
      Throws:
      ConnectionsException - If proper object of class implementing ConnectionListener is missing.
    • removeInvitationListener

      void removeInvitationListener(InvitationListener listener) throws ConnectionsException
      Removes the InvitationListeners from the arraylist of InvitationListener
      Parameters:
      object - of a class that implements InvitationListener
      Throws:
      ConnectionsException - If proper object of class implementing ConnectionListener is missing.
    • getAllInvitationListeners

      List<InvitationListener> getAllInvitationListeners() throws ConnectionsException
      Returns List contatining all instances of class implementing InvitationListeners
      Parameters:
      void -
      Throws:
      ConnectionsException - If any error occurs while fetching different instances of class implementing InvitationListener
    • inviteUser

      void inviteUser(String userGuid, String invitationMessage) throws ConnectionsException
      Allows the current user to invite another user to form a connection.

      Calling this method has the same effect as calling inviteUser(String, String, Collection<String>) passing userGuid, invitationMessage, null.

      Parameters:
      userGuid - GUID of a user in the system
      invitationMessage - An optional personal message intended for the user being invited (may be null)
      Throws:
      ConnectionsException - If the GUID of the user is null or invalid, or any error occurs initiating the invitation.
    • inviteUser

      void inviteUser(String userGuid, String invitationMessage, Collection<String> connectionListNames) throws ConnectionsException
      Allows the current user to invite another user to form a connection and additionally get the user added to specified connection lists belonging to the current user upon forming the connection.

      If the call to this method executes successfully, the invited user will see an invitation from the current user in his/her received invitations screen. However, if that user's connections settings have configured such that invitations are to be automatically accepted, then upon successful execution of this method, a connection would be created between the users and no invitation will show up in the invited user's received invitations screen.

      Parameters:
      userGuid - GUID of a user in the system
      invitationMessage - An optional personal message intended for the user being invited (may be null)
      connectionListNames - An optional list of names of connection lists belonging to the current user
      Throws:
      ConnectionsException - If the GUID of the user is null or invalid, or any error occurs initiating the invitation.
    • acceptInvitation

      void acceptInvitation(String invitationId) throws ConnectionsException
      Allows the current user to accept a specific invitation that was sent to him/her previously by some other user.

      If the call to this method goes through successfully, a connection would be created between the user who initiated the invitation and the current user.

      Parameters:
      invitationId - The ID of the invitation to be accepted
      Throws:
      ConnectionsException - If the invitation ID is null or any error occurs accepting the invitation.
    • rejectInvitation

      void rejectInvitation(String invitationId, String rejectionMessage) throws ConnectionsException
      Allows the current user to decline a specific invitation that was sent to him/her previously by some other user.

      Once the invitation has been declined, it is possible for the user who initiated the invitation to be aware of the decline (such as by noticing its disappearance from his/her sent invitations screen).

      Parameters:
      invitationId - The ID of the invitation to be declined
      rejectionMessage - An optional personal message intended for the user who initiated the invitation, with the intent of describing why the invitation is being declined (Note: as of now this is not being used)
      Throws:
      ConnectionsException - If the ID of invitation ID is null or any error occurs declining the invitation.
      See Also:
    • ignoreInvitation

      void ignoreInvitation(String invitationId) throws ConnectionsException
      Allows the current user to ignore a specific invitation that was sent to him/her previously by some other user.

      The effect of ignoring the invitation is that the current user stops seeing it in the received invitations screen. The invitation still stays active in the system and the user who initiated the invitation is not made aware of it being ignored and he/she still continues to see it in the sent invitations screen.

      Parameters:
      invitationId - ID of the invitation to be ignoreda
      Throws:
      ConnectionsException - If the invitation ID is null or any error occurs ignoring the invitation.
      See Also:
    • getReceivedInvitations

      List<Invitation> getReceivedInvitations() throws ConnectionsException
      Returns the pending invitations that have been received by the current user.
      Returns:
      The list of invitations received by the current user (from other users) that are still active i.e. that have not been accepted or declined
      Throws:
      ConnectionsException - If any error occurs retrieving invitations.
    • getSentInvitations

      List<Invitation> getSentInvitations() throws ConnectionsException
      Returns the pending invitations that have been sent by the current user.
      Returns:
      The list of invitations sent by the current user (to other users) that are still active i.e. that have not been accepted or declined
      Throws:
      ConnectionsException - If any error occurs retrieving invitations.