Interface InvitationsManager
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 TypeMethodDescriptionvoid
acceptInvitation
(String invitationId) Allows the current user to accept a specific invitation that was sent to him/her previously by some other user.void
addInvitationListener
(InvitationListener listener) Registers all the InvitationListeners to an arraylist of InvitationListenerReturns List contatining all instances of class implementing InvitationListenersReturns 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
removeInvitationListener
(InvitationListener listener) Removes the InvitationListeners from the arraylist of InvitationListener
-
Method Details
-
addInvitationListener
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
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
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
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>)
passinguserGuid
,invitationMessage
,null
.- Parameters:
userGuid
- GUID of a user in the systeminvitationMessage
- An optional personal message intended for the user being invited (may benull
)- Throws:
ConnectionsException
- If the GUID of the user isnull
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 systeminvitationMessage
- An optional personal message intended for the user being invited (may benull
)connectionListNames
- An optional list of names of connection lists belonging to the current user- Throws:
ConnectionsException
- If the GUID of the user isnull
or invalid, or any error occurs initiating the invitation.
-
acceptInvitation
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 isnull
or any error occurs accepting the invitation.
-
rejectInvitation
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 declinedrejectionMessage
- 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 isnull
or any error occurs declining the invitation.- See Also:
-
ignoreInvitation
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 isnull
or any error occurs ignoring the invitation.- See Also:
-
getReceivedInvitations
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
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.
-