Interface MessagingService
-
public interface MessagingServiceThe MessagingService object is accessible from theUserobject, and provides access to messaging related capabilities and actions.The MessagingService object provides a set of APIs that allow application developers to manage text conversations along with rich media attachments.
In general, the capabilities and the set of allowed operations are dependent on the capabilities of the messaging server. A messaging conversation doesn't have any moderator once it is started by any user.
The client application is notified about status updates reported by the messaging server through listener that the application has added to the MessagingService object. These updates may be the result of local operations on the MessagingService object as well as remote changes initiated by either the server or other participants of any conversation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(MessagingServiceListener listener)Adds a new listener to the service.voidclearAllLocalData(MessagingCompletionHandler completionHandler)Removes all local data - messages, conversations and attachments.voidclearAllLocalData(MessagingCompletionHandler completionHandler, MessagingProviderType messagingProviderType)Removes all local data - messages, conversations and attachments.ConversationcreateConversation()Creates a new draft conversation.ConversationcreateConversation(MessagingProviderType messagingProviderType)Creates a new draft conversation.CapabilitygetAutomaticallyUpdateLastAccessTimeCapability()Returns aCapabilityobject that indicates if conversation last access timestamps will be updated automatically.CapabilitygetAutomaticallyUpdateLastAccessTimeCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject that indicates if conversation last access timestamps will be updated automatically.CapabilitygetClearLocalDataCapability()Returns aCapabilityobject that indicates if local data can be cleared.CapabilitygetClearLocalDataCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject that indicates if local data can be cleared.voidgetConversationForProviderId(MessagingProviderType messagingProviderType, java.lang.String providerConversationId, ConversationCompletionHandler completionHandler)Gets aConversationassociated with provider conversation ID.CapabilitygetCreateConversationCapability()Returns aCapabilityobject allowing the client application to determine if it is currently possible to create a new conversation.CapabilitygetCreateConversationCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject allowing the client application to determine if it is currently possible to create a new conversation.CapabilitygetHtmlCapability()Returns aCapabilityobject allowing the client application to determine HTML capability.CapabilitygetHtmlCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject allowing the client application to determine HTML capability for the specified provider.CapabilitygetMessageDeliveryReadStateMonitoringCapability()Returns aCapabilityobject allowing the client application to determine if it is currently possible to report delivery state updates for sent messages.CapabilitygetMessageDeliveryReadStateMonitoringCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject allowing the client application to determine if it is currently possible to report delivery state updates for sent messages for the specific messaging provider.CapabilitygetMessageReadReportingCapability()Returns aCapabilityobject allowing the client application to determine if it is currently possible to report read state updates for sent messages.CapabilitygetMessageReadReportingCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject allowing the client application to determine if it is currently possible to report read state updates for sent messages for the specific messaging provider.MessagingLimitsgetMessagingLimits()Returns Messaging Limits, which are containing information about the limits of the messaging component.MessagingLimitsgetMessagingLimits(MessagingProviderType messagingProviderType)Returns Messaging Limits, which are containing information about the limits of the messaging component.intgetNumberOfConversationsWithUnreadContent()Returns number of conversations with unread content for current user.intgetNumberOfConversationsWithUnreadContent(MessagingProviderType messagingProviderType)Returns number of conversations with unread content for current user.intgetNumberOfConversationsWithUnreadContentSinceLastAccessChanged()Returns number of conversations with unread content since last access of current user.intgetNumberOfConversationsWithUnreadContentSinceLastAccessChanged(MessagingProviderType messagingProviderType)Returns number of conversations with unread content since last access of current user.RefreshTypegetRefreshMode()Refresh mode for polling.CapabilitygetRemoveConversationCapability(Conversation conversation)Returns aCapabilityobject that indicates if a specified conversation can be removed.CapabilitygetRemoveConversationCapability(Conversation conversation, MessagingProviderType messagingProviderType)Returns aCapabilityobject that indicates if a specified conversation can be removed.CapabilitygetRetrieveConversationCapability()Returns aCapabilityobject that indicates if conversations can be retrieved from the server.CapabilitygetRetrieveConversationCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject that indicates if conversations can be retrieved from the server.CapabilitygetRetrieveOlderConversationCapability()Returns aCapabilityobject that indicates if older conversations can be retrieved from the server.CapabilitygetRetrieveOlderConversationCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject that indicates if older conversations can be retrieved from the server for the provider.java.util.List<java.lang.String>getRoutableDomains()Generic list of all routable domains presented as strings.java.util.List<java.lang.String>getRoutableDomains(MessagingProviderType messagingProviderType)Generic list of all routable domains presented as strings.CapabilitygetSearchConversationCapability()Returns aCapabilityobject that indicates if conversations can be searched.CapabilitygetSearchConversationCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject that indicates if conversations can be searched.java.lang.StringgetSelfAddress()String value containing address of currently logged in user.java.lang.StringgetSelfAddress(MessagingProviderType messagingProviderType)String value containing address of currently logged in user.CapabilitygetUpdateRefreshModeCapability()Returns aCapabilityobject that indicates if the refresh mode can be changed.CapabilitygetUpdateRefreshModeCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject that indicates if the refresh mode can be changed.CapabilitygetValidateParticipantAddressesCapability()Returns aCapabilityobject that indicates if participant addresses can be validated.CapabilitygetValidateParticipantAddressesCapability(MessagingProviderType messagingProviderType)Returns aCapabilityobject that indicates if participant addresses can be validated.booleanisMessageDeliveryReadStateMonitoringSupported()Does the last connected messaging service support reporting the message delivery status?booleanisMessageReadReportingSupported()Does the last connected messaging service support reporting the message read status?booleanisServiceAvailable()A Boolean value indicating whether the messaging service is available.booleanisServiceAvailable(MessagingProviderType messagingProviderType)A Boolean value indicating whether the messaging provider is available.voidleaveAllConversations(DataRetrievalWatcher<LeaveConversationResponse> dataRetrievalWatcher)Leave all conversations for the currently logged in user.voidleaveConversations(DataRetrievalWatcher<LeaveConversationResponse> dataRetrievalWatcher, java.util.List<Conversation> list)Leave a specified list of conversations.voidmarkMessagesAsRead(java.util.List<Message> messages)Mark multiple messages as read.voidrefresh(MessagingCompletionHandler completionHandler)Perform a manual refresh of messaging data from the server.voidrefresh(MessagingCompletionHandler completionHandler, MessagingProviderType messagingProviderType)Perform a manual refresh of messaging data from the server.voidremoveConversation(Conversation conversation, MessagingCompletionHandler completionHandler)Removes a conversation.voidremoveListener(MessagingServiceListener listener)Removes a listener from the service.voidretrieveActiveConversations(DataRetrievalWatcher<Conversation> dataRetrievalWatcher)Performs a retrieval of all active conversations for the currently logged in user and watches for changes to this collection.voidretrieveActiveConversationsForContact(DataRetrievalWatcher<Conversation> dataRetrievalWatcher, Contact contact)Retrieves the list of active conversations for a specified contact.voidsearchConversations(DataRetrievalWatcher<SearchConversation> dataRetrievalWatcher, MessagingQuery messagingQuery)Searches the user's conversations using specified filter criteria.voidsetRefreshMode(RefreshType refreshType, MessagingCompletionHandler completionHandler)Sets refresh mode with completion handler.voidvalidateAddresses(DataRetrievalWatcher<AddressValidationResponse> dataRetrievalWatcher, Contact contact)Validates a supplied contact to determine if they are valid messaging addresses.voidvalidateAddresses(DataRetrievalWatcher<AddressValidationResponse> dataRetrievalWatcher, Contact contact, MessagingProviderType messagingProviderType)Validates a supplied contact to determine if they are valid messaging addresses.voidvalidateAddresses(DataRetrievalWatcher<AddressValidationResponse> dataRetrievalWatcher, java.util.List<java.lang.String> addresses)Validates a list of supplied addresses to determine if they are valid messaging addresses.voidvalidateAddresses(DataRetrievalWatcher<AddressValidationResponse> dataRetrievalWatcher, java.util.List<java.lang.String> addresses, MessagingProviderType messagingProviderType)Validates a list of supplied addresses to determine if they are valid messaging addresses.
-
-
-
Method Detail
-
addListener
void addListener(MessagingServiceListener listener)
Adds a new listener to the service.- Parameters:
listener-MessagingServiceListenerto be added to the service.
-
removeListener
void removeListener(MessagingServiceListener listener)
Removes a listener from the service.- Parameters:
listener-MessagingServiceListenerinstance that is removed from the service.
-
isServiceAvailable
boolean isServiceAvailable()
A Boolean value indicating whether the messaging service is available. This value is closely connected with capabilities - if the service is not running, usually all of the capabilities related to the service won't be allowed.- Returns:
- true if the service is currently available for use.
- See Also:
MessagingServiceListener.onMessagingServiceAvailable(MessagingService)
-
isServiceAvailable
boolean isServiceAvailable(MessagingProviderType messagingProviderType)
A Boolean value indicating whether the messaging provider is available. This value is closely connected with capabilities - if the service is not running, usually all of the capabilities related to the service won't be allowed.- Parameters:
messagingProviderType- type of the provider- Returns:
- True if the messaging provider is available for use.
- See Also:
MessagingServiceListener.onMessagingServiceAvailable(MessagingService),MessagingServiceListener.onMessagingProviderAvailable(MessagingService, MessagingProviderType)
-
getRefreshMode
RefreshType getRefreshMode()
Refresh mode for polling.Push mode means continuous notifications in real time.
- Returns:
- refresh mode for polling.
- See Also:
refresh(MessagingCompletionHandler)
-
getRoutableDomains
java.util.List<java.lang.String> getRoutableDomains()
Generic list of all routable domains presented as strings.This list helps to determine if a specific address can be used within the messaging component.
- Returns:
- list of all routable domains presented as string
- See Also:
MessagingServiceListener.onRoutableDomainsChanged(MessagingService, List)
-
getSelfAddress
java.lang.String getSelfAddress()
String value containing address of currently logged in user. This value must be provided in the user configuration. Note that this address can be different than in other services.- Returns:
- String value containing address of currently logged in user.
-
getNumberOfConversationsWithUnreadContent
int getNumberOfConversationsWithUnreadContent()
Returns number of conversations with unread content for current user.- Returns:
- number of conversations with unread content for current user.
- See Also:
MessagingServiceListener.onNumberOfConversationsWithUnreadContentChanged(MessagingService, int)
-
getNumberOfConversationsWithUnreadContentSinceLastAccessChanged
int getNumberOfConversationsWithUnreadContentSinceLastAccessChanged()
Returns number of conversations with unread content since last access of current user.- Returns:
- number of conversations with unread content since last access of current user.
- See Also:
MessagingServiceListener.onNumberOfConversationsWithUnreadContentSinceLastAccessChanged(MessagingService, int)
-
refresh
void refresh(MessagingCompletionHandler completionHandler)
Perform a manual refresh of messaging data from the server. This method is meant to be used when the RefreshMode parameter is set to manual.- Parameters:
completionHandler-MessagingCompletionHandlerfor this operation.- See Also:
getRefreshMode()
-
retrieveActiveConversations
void retrieveActiveConversations(DataRetrievalWatcher<Conversation> dataRetrievalWatcher)
Performs a retrieval of all active conversations for the currently logged in user and watches for changes to this collection.This method retrieves the dynamically-updated collection of conversations that are associated with the currently logged in user. Normally the client application will only need to call this method once to install a watcher object to monitor the initial download of conversations and then continue to watch for updates to the collection.
If the client application calls this method additional times, no actual download of conversations from the server occurs, but the watcher callbacks that report progress will fire (i.e. "progress" and "done" callbacks). However, no additions to the conversation collection will occur as a result of the subsequent calls. If a different watcher object is supplied in a subsequent call, the previous watcher object is "unlinked" from the underlying conversation object collection and will never receive any additional updates.
To determine when it is appropriate to call the retrieveActiveConversations method, the client application should query the
getRetrieveConversationCapability()method.- Parameters:
dataRetrievalWatcher- aDataRetrievalWatcherobject, created by the application, to track the progress of the requested operation.- See Also:
getRetrieveConversationCapability(),getRetrieveOlderConversationCapability(),retrieveActiveConversationsForContact(DataRetrievalWatcher, Contact),refresh(MessagingCompletionHandler)
-
retrieveActiveConversationsForContact
void retrieveActiveConversationsForContact(DataRetrievalWatcher<Conversation> dataRetrievalWatcher, Contact contact)
Retrieves the list of active conversations for a specified contact.Note that unlike the
retrieveActiveConversations(DataRetrievalWatcher)method, once the data retrieval has completed, no further updates will be received through the supplied watcher argument.To determine when it is appropriate to call the retrieveActiveConversationsForContact method, the client should query the
getRetrieveConversationCapability()method.- Parameters:
dataRetrievalWatcher-DataRetrievalWatcherobject, created by the application, to track the progress of the requested operation.contact- TheContactobject for which matching conversations are to be retrieved.- See Also:
getSearchConversationCapability(),retrieveActiveConversations(DataRetrievalWatcher)
-
markMessagesAsRead
void markMessagesAsRead(java.util.List<Message> messages)
Mark multiple messages as read.- Parameters:
messages- list ofMessages to mark as read.
-
leaveConversations
void leaveConversations(DataRetrievalWatcher<LeaveConversationResponse> dataRetrievalWatcher, java.util.List<Conversation> list)
Leave a specified list of conversations.As conversations in the supplied list are processed, the onCollectionChanged callback on the supplied watcher object will fire with a list of conversations that have been left.
- Parameters:
dataRetrievalWatcher-DataRetrievalWatcherobject, created by the application, to track the progress of the requested operation.list- the list of conversations to leave.- See Also:
leaveAllConversations(DataRetrievalWatcher)
-
leaveAllConversations
void leaveAllConversations(DataRetrievalWatcher<LeaveConversationResponse> dataRetrievalWatcher)
Leave all conversations for the currently logged in user.As conversations are left, the onCollectionChanged event on the supplied watcher object will fire with a list of conversations that have been left.
- Parameters:
dataRetrievalWatcher-DataRetrievalWatcherobject, created by the application, to track the progress of the requested operation.- See Also:
leaveConversations(DataRetrievalWatcher, List)
-
validateAddresses
void validateAddresses(DataRetrievalWatcher<AddressValidationResponse> dataRetrievalWatcher, java.util.List<java.lang.String> addresses)
Validates a list of supplied addresses to determine if they are valid messaging addresses.As the addresses are validated, the onCollectionChanged event on the supplied watcher object will fire with a list of addresses that have been validated.
- Parameters:
dataRetrievalWatcher-DataRetrievalWatcherobject, created by the application, to track the progress of the requested operation.addresses- list of addresses to validate.
-
validateAddresses
void validateAddresses(DataRetrievalWatcher<AddressValidationResponse> dataRetrievalWatcher, Contact contact)
Validates a supplied contact to determine if they are valid messaging addresses.As the addresses are validated, the onCollectionChanged event on the supplied watcher object will fire with a contact that have been validated.
- Parameters:
dataRetrievalWatcher-DataRetrievalWatcherobject, created by the application, to track the progress of the requested operation.contact- contact to validate.
-
createConversation
Conversation createConversation()
Creates a new draft conversation.The client application should query the
getCreateConversationCapability()method to determine when it is possible to create a new conversation.- Returns:
- Returns a draft Conversation object, or null if a conversation could not be created.
- See Also:
getCreateConversationCapability(),Conversation.start(MessagingCompletionHandler),Conversation.addParticipantAddresses(List, AddParticipantAddressesCompletionHandler),Conversation.createMessage()
-
removeConversation
void removeConversation(Conversation conversation, MessagingCompletionHandler completionHandler)
Removes a conversation.- Parameters:
conversation- theConversationto be removed.completionHandler-MessagingCompletionHandlerfor this operation.
-
searchConversations
void searchConversations(DataRetrievalWatcher<SearchConversation> dataRetrievalWatcher, MessagingQuery messagingQuery)
Searches the user's conversations using specified filter criteria.- Parameters:
dataRetrievalWatcher-DataRetrievalWatcherobject, created by the application, to track the progress of the requested operation.messagingQuery-MessagingQueryquery object on which a search will be done.
-
clearAllLocalData
void clearAllLocalData(MessagingCompletionHandler completionHandler)
Removes all local data - messages, conversations and attachments.- Parameters:
completionHandler-MessagingCompletionHandlerfor this operation.- See Also:
getClearLocalDataCapability()
-
setRefreshMode
void setRefreshMode(RefreshType refreshType, MessagingCompletionHandler completionHandler)
Sets refresh mode with completion handler. Using this method and changing refresh mode will impact how often client gets updates from the server.- Parameters:
refreshType- new refresh type value.completionHandler-MessagingCompletionHandlerfor this operation.- See Also:
RefreshType
-
getMessagingLimits
MessagingLimits getMessagingLimits()
Returns Messaging Limits, which are containing information about the limits of the messaging component.- Returns:
MessagingLimitsobject.
-
getCreateConversationCapability
Capability getCreateConversationCapability()
Returns aCapabilityobject allowing the client application to determine if it is currently possible to create a new conversation.Typically this capability would only be disabled when the client is offline and cannot access the messaging server.
- Returns:
- a
Capabilityobject allowing the client application to determine if it is currently possible to create a new conversation. - See Also:
createConversation()
-
getMessageDeliveryReadStateMonitoringCapability
Capability getMessageDeliveryReadStateMonitoringCapability()
Returns aCapabilityobject allowing the client application to determine if it is currently possible to report delivery state updates for sent messages.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports send delivery receipts.
- Returns:
- a
Capabilityobject allowing the client application to determine if it is currently possible to report delivery state updates for sent messages.
-
getMessageReadReportingCapability
Capability getMessageReadReportingCapability()
Returns aCapabilityobject allowing the client application to determine if it is currently possible to report read state updates for sent messages.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports send read receipts.
- Returns:
- a
Capabilityobject allowing the client application to determine if it is currently possible to report read state updates for sent messages.
-
getRetrieveConversationCapability
Capability getRetrieveConversationCapability()
Returns aCapabilityobject that indicates if conversations can be retrieved from the server.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports retrieving conversations.
- Returns:
- a
Capabilityobject that indicates if conversations can be retrieved from the server. - See Also:
retrieveActiveConversations(DataRetrievalWatcher),retrieveActiveConversationsForContact(DataRetrievalWatcher, Contact)
-
getRetrieveOlderConversationCapability
Capability getRetrieveOlderConversationCapability()
Returns aCapabilityobject that indicates if older conversations can be retrieved from the server.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports retrieving conversations.
- The messaging server has older conversations available to download.
The client application should call
retrieveActiveConversations(DataRetrievalWatcher)to retrieve older conversations from the server.- Returns:
- a
Capabilityobject that indicates if the older conversations can be retrieved from the server. - See Also:
getRetrieveConversationCapability(),retrieveActiveConversations(DataRetrievalWatcher)
-
getSearchConversationCapability
Capability getSearchConversationCapability()
Returns aCapabilityobject that indicates if conversations can be searched.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports searching conversations.
- Returns:
- a
Capabilityobject that indicates if conversations can be searched. - See Also:
searchConversations(DataRetrievalWatcher, MessagingQuery)
-
getUpdateRefreshModeCapability
Capability getUpdateRefreshModeCapability()
Returns aCapabilityobject that indicates if the refresh mode can be changed.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports changing the refresh mode.
- Returns:
- a
Capabilityobject that indicates if the refresh mode can be changed. - See Also:
setRefreshMode(RefreshType, MessagingCompletionHandler)
-
getValidateParticipantAddressesCapability
Capability getValidateParticipantAddressesCapability()
Returns aCapabilityobject that indicates if participant addresses can be validated.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports validation of participant addresses.
- Returns:
- a
Capabilityobject that indicates if participant addresses can be validated. - See Also:
validateAddresses(DataRetrievalWatcher, List)
-
getClearLocalDataCapability
Capability getClearLocalDataCapability()
Returns aCapabilityobject that indicates if local data can be cleared.This capability is currently always Allowed.
- Returns:
- a
Capabilityobject that indicates if local data can be cleared. - See Also:
clearAllLocalData(MessagingCompletionHandler)
-
getRemoveConversationCapability
Capability getRemoveConversationCapability(Conversation conversation)
Returns aCapabilityobject that indicates if a specified conversation can be removed.This capability is Allowed when all of the following conditions are true:
- The conversation argument is a valid Conversation object.
- he Conversation is in a "draft" state.
- Parameters:
conversation- a valid Conversation object @{link Conversation}.- Returns:
- a
Capabilityobject that indicates if a specified conversation can be removed. - See Also:
removeConversation(Conversation, MessagingCompletionHandler)
-
getAutomaticallyUpdateLastAccessTimeCapability
Capability getAutomaticallyUpdateLastAccessTimeCapability()
Returns aCapabilityobject that indicates if conversation last access timestamps will be updated automatically.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports automatic update of conversation last access timestamps.
- Returns:
- a
Capabilityobject that indicates if conversation last access timestamps will be updated automatically. - See Also:
Conversation.getLastAccessedTime(),Conversation.setLastAccessTime(MessagingCompletionHandler)
-
getRoutableDomains
java.util.List<java.lang.String> getRoutableDomains(MessagingProviderType messagingProviderType)
Generic list of all routable domains presented as strings.This list helps to determine if a specific address can be used within the messaging component.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- list of all routable domains presented as string
- See Also:
MessagingServiceListener.onMessagingProviderRoutableDomainsChanged(MessagingService, List, MessagingProviderType)
-
getSelfAddress
java.lang.String getSelfAddress(MessagingProviderType messagingProviderType)
String value containing address of currently logged in user. This value must be provided in the user configuration. Note that this address can be different than in other services.- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- String value containing address of currently logged in user.
-
getNumberOfConversationsWithUnreadContent
int getNumberOfConversationsWithUnreadContent(MessagingProviderType messagingProviderType)
Returns number of conversations with unread content for current user.- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- number of conversations with unread content for current user.
- See Also:
MessagingServiceListener.onMessagingProviderNumberOfConversationsWithUnreadContentChanged(MessagingService, int, MessagingProviderType)
-
getNumberOfConversationsWithUnreadContentSinceLastAccessChanged
int getNumberOfConversationsWithUnreadContentSinceLastAccessChanged(MessagingProviderType messagingProviderType)
Returns number of conversations with unread content since last access of current user.- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- number of conversations with unread content since last access of current user.
- See Also:
MessagingServiceListener.onMessagingProviderNumberOfConversationsWithUnreadContentSinceLastAccessChanged(MessagingService, int, MessagingProviderType)
-
refresh
void refresh(MessagingCompletionHandler completionHandler, MessagingProviderType messagingProviderType)
Perform a manual refresh of messaging data from the server. This method is meant to be used when the RefreshMode parameter is set to manual.- Parameters:
completionHandler-MessagingCompletionHandlerfor this operation.messagingProviderType- type of the provider @{link MessagingProviderType}.- See Also:
getRefreshMode()
-
validateAddresses
void validateAddresses(DataRetrievalWatcher<AddressValidationResponse> dataRetrievalWatcher, java.util.List<java.lang.String> addresses, MessagingProviderType messagingProviderType)
Validates a list of supplied addresses to determine if they are valid messaging addresses.As the addresses are validated, the onCollectionChanged event on the supplied watcher object will fire with a list of addresses that have been validated.
- Parameters:
dataRetrievalWatcher-DataRetrievalWatcherobject, created by the application, to track the progress of the requested operation.addresses- list of addresses to validate.messagingProviderType- type of the provider @{link MessagingProviderType}.
-
validateAddresses
void validateAddresses(DataRetrievalWatcher<AddressValidationResponse> dataRetrievalWatcher, Contact contact, MessagingProviderType messagingProviderType)
Validates a supplied contact to determine if they are valid messaging addresses.As the addresses are validated, the onCollectionChanged event on the supplied watcher object will fire with a contact that have been validated.
- Parameters:
dataRetrievalWatcher-DataRetrievalWatcherobject, created by the application, to track the progress of the requested operation.contact- contact to validate.messagingProviderType- type of the provider @{link MessagingProviderType}.
-
createConversation
Conversation createConversation(MessagingProviderType messagingProviderType)
Creates a new draft conversation.The client application should query the
getCreateConversationCapability()method to determine when it is possible to create a new conversation.- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- Returns a draft Conversation object, or null if a conversation could not be created.
- See Also:
getCreateConversationCapability(),Conversation.start(MessagingCompletionHandler),Conversation.addParticipantAddresses(List, AddParticipantAddressesCompletionHandler),Conversation.createMessage()
-
clearAllLocalData
void clearAllLocalData(MessagingCompletionHandler completionHandler, MessagingProviderType messagingProviderType)
Removes all local data - messages, conversations and attachments.- Parameters:
completionHandler-MessagingCompletionHandlerfor this operation.messagingProviderType- type of the provider @{link MessagingProviderType}.- See Also:
getClearLocalDataCapability()
-
getMessagingLimits
MessagingLimits getMessagingLimits(MessagingProviderType messagingProviderType)
Returns Messaging Limits, which are containing information about the limits of the messaging component.- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
MessagingLimitsobject.
-
getCreateConversationCapability
Capability getCreateConversationCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject allowing the client application to determine if it is currently possible to create a new conversation.Typically this capability would only be disabled when the client is offline and cannot access the messaging server.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject allowing the client application to determine if it is currently possible to create a new conversation. - See Also:
createConversation(MessagingProviderType)
-
getMessageDeliveryReadStateMonitoringCapability
Capability getMessageDeliveryReadStateMonitoringCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject allowing the client application to determine if it is currently possible to report delivery state updates for sent messages for the specific messaging provider.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server) for the specific messaging provider.
- The messaging server supports send delivery receipts for the specific messaging provider.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject allowing the client application to determine if it is currently possible to report delivery state updates for sent messages.
-
getMessageReadReportingCapability
Capability getMessageReadReportingCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject allowing the client application to determine if it is currently possible to report read state updates for sent messages for the specific messaging provider.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server) for the specific messaging provider.
- The messaging server supports send read receipts for the specific messaging provider.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject allowing the client application to determine if it is currently possible to report read state updates for sent messages.
-
getRetrieveConversationCapability
Capability getRetrieveConversationCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject that indicates if conversations can be retrieved from the server.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports retrieving conversations.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject that indicates if conversations can be retrieved from the server. - See Also:
retrieveActiveConversations(DataRetrievalWatcher),retrieveActiveConversationsForContact(DataRetrievalWatcher, Contact)
-
getRetrieveOlderConversationCapability
Capability getRetrieveOlderConversationCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject that indicates if older conversations can be retrieved from the server for the provider.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports retrieving conversations.
- The messaging server has older conversations available to download.
The client application should call
retrieveActiveConversations(DataRetrievalWatcher)to retrieve older conversations from the server.- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject that indicates if the older conversations can be retrieved from the server. - See Also:
retrieveActiveConversations(DataRetrievalWatcher)
-
getSearchConversationCapability
Capability getSearchConversationCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject that indicates if conversations can be searched.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports searching conversations.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject that indicates if conversations can be searched. - See Also:
searchConversations(DataRetrievalWatcher, MessagingQuery)
-
getUpdateRefreshModeCapability
Capability getUpdateRefreshModeCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject that indicates if the refresh mode can be changed.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports changing the refresh mode.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject that indicates if the refresh mode can be changed. - See Also:
setRefreshMode(RefreshType, MessagingCompletionHandler)
-
getValidateParticipantAddressesCapability
Capability getValidateParticipantAddressesCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject that indicates if participant addresses can be validated.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports validation of participant addresses.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject that indicates if participant addresses can be validated. - See Also:
validateAddresses(DataRetrievalWatcher, List, MessagingProviderType)
-
getClearLocalDataCapability
Capability getClearLocalDataCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject that indicates if local data can be cleared.This capability is currently always Allowed.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject that indicates if local data can be cleared. - See Also:
clearAllLocalData(MessagingCompletionHandler, MessagingProviderType)
-
getRemoveConversationCapability
Capability getRemoveConversationCapability(Conversation conversation, MessagingProviderType messagingProviderType)
Returns aCapabilityobject that indicates if a specified conversation can be removed.This capability is Allowed when all of the following conditions are true:
- The conversation argument is a valid Conversation object.
- he Conversation is in a "draft" state.
- Parameters:
conversation- a valid Conversation object @{link Conversation}.messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject that indicates if a specified conversation can be removed. - See Also:
removeConversation(Conversation, MessagingCompletionHandler)
-
getAutomaticallyUpdateLastAccessTimeCapability
Capability getAutomaticallyUpdateLastAccessTimeCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject that indicates if conversation last access timestamps will be updated automatically.This capability is Allowed when all of the following conditions are true:
- The messaging service is online (has an active connection to the server).
- The messaging server supports automatic update of conversation last access timestamps.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.- Returns:
- a
Capabilityobject that indicates if conversation last access timestamps will be updated automatically. - See Also:
Conversation.getLastAccessedTime(),Conversation.setLastAccessTime(MessagingCompletionHandler)
-
getHtmlCapability
Capability getHtmlCapability()
Returns aCapabilityobject allowing the client application to determine HTML capability.Typically this capability would only be enabled when messaging server supports HTML.
If there is one messaging provider configured this selector will operate on the configured provider. Otherwise the
MessagingProviderType.AVAYA_MULTIMEDIA_MESSAGINGprovider will be used.- Returns:
- a
Capabilityobject that indicates if the client application can use HTML.
-
getHtmlCapability
Capability getHtmlCapability(MessagingProviderType messagingProviderType)
Returns aCapabilityobject allowing the client application to determine HTML capability for the specified provider.Typically this capability would only be enabled when messaging server supports HTML.
- Parameters:
messagingProviderType- type of the providerMessagingProviderType.- Returns:
- a
Capabilityobject that indicates if a specified provider is HTML capable. - See Also:
getHtmlCapability()
-
getConversationForProviderId
void getConversationForProviderId(MessagingProviderType messagingProviderType, java.lang.String providerConversationId, ConversationCompletionHandler completionHandler)
Gets aConversationassociated with provider conversation ID.This method can be used to find a conversation object corresponding to push notification.
- Parameters:
messagingProviderType- type of the provider @{link MessagingProviderType}.providerConversationId- provider level conversation ID.completionHandler-ConversationCompletionHandlerfor this operation.
-
isMessageReadReportingSupported
boolean isMessageReadReportingSupported()
Does the last connected messaging service support reporting the message read status?- Returns:
- true if the last connected service supported message read reporting.
-
isMessageDeliveryReadStateMonitoringSupported
boolean isMessageDeliveryReadStateMonitoringSupported()
Does the last connected messaging service support reporting the message delivery status?- Returns:
- true if the last connected service supported message delivery read state monitoring.
-
-