Interface MessageManager
-
public interface MessageManagerThis interface handles messages and message collections related to people and applications Implement this interface to according to the persistence storage of social data
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateMessage(String userId, String appId, String msgCollectionId, Message message)Posts a message to the user's specified message collection, to be sent to the set of recipients specified in the messagevoidcreateMessage(String userId, String msgCollectionId, Message message)Posts a message to the user's specified message collection, to be sent to the set of recipients specified in the messagevoidcreateMessageCollection(String userId, MessageCollection msgCollection, String messageCollectionId)Creates a MessageCollection of the the user with given id and attributesvoiddeleteMessageCollection(String userId, String messageCollectionId)Deletes a message collection for the given argumentsvoiddeleteMessages(String userId, String msgCollectionId, List<String> messageIds)Deletes a set of messages for a given user/message collectionMessageCollection[]getMessageCollections(String userId, Set<String> fields, FilterOptions options)Returns an array of message collections corresponding to the given user detailsMessage[]getMessages(String userId, String msgCollectionId, Set<String> fields, List<String> msgIds, FilterOptions options)Returns an array of messages that correspond to the passed in datavoidmodifyMessage(String userId, String msgCollId, String messageId, Message message)Modifies/Updates a specific message with new datavoidmodifyMessageCollection(String userId, MessageCollection msgCollection, String messageCollectionId)Modifies/Updates a message collection for the given arguments
-
-
-
Method Detail
-
getMessageCollections
MessageCollection[] getMessageCollections(String userId, Set<String> fields, FilterOptions options) throws SocialMessageException
Returns an array of message collections corresponding to the given user details- Parameters:
userId- The userId to fetch forfields- The fields to fetch for the message collectionsoptions- Pagination details- Returns:
- An array of MessageCollection
- Throws:
SocialMessageException
-
createMessageCollection
void createMessageCollection(String userId, MessageCollection msgCollection, String messageCollectionId) throws SocialMessageException
Creates a MessageCollection of the the user with given id and attributes- Parameters:
userId- The userId to which the collection belongs tomsgCollection- The MessageCollection object to retrieve the attrobutesmessageCollectionId- The id of the message collection- Throws:
SocialMessageException
-
deleteMessageCollection
void deleteMessageCollection(String userId, String messageCollectionId) throws SocialMessageException
Deletes a message collection for the given arguments- Parameters:
userId- The userId to create the message collection formessageCollectionId- The message Collection ID to be removed- Throws:
SocialMessageException
-
modifyMessageCollection
void modifyMessageCollection(String userId, MessageCollection msgCollection, String messageCollectionId) throws SocialMessageException
Modifies/Updates a message collection for the given arguments- Parameters:
userId- The userId to modify the message collection formsgCollection- Data for the message collection to be modifiedmessageCollectionId- The message Collection ID to modify- Throws:
SocialMessageException
-
getMessages
Message[] getMessages(String userId, String msgCollectionId, Set<String> fields, List<String> msgIds, FilterOptions options) throws SocialMessageException
Returns an array of messages that correspond to the passed in data- Parameters:
userId- The userId of the person to fetch message formsgCollectionId- The message Collection ID to fetch from, default @allfields- The fields to fetch for the messagesmsgIds- An explicit set of message ids to fetchoptions- Options to control the fetch- Returns:
- Throws:
SocialMessageException
-
createMessage
void createMessage(String userId, String msgCollectionId, Message message) throws SocialMessageException
Posts a message to the user's specified message collection, to be sent to the set of recipients specified in the message- Parameters:
userId- The user posting the messagemsgCollectionId- The message collection Id to post to, default @outboxmessage- The message object- Throws:
SocialMessageException
-
createMessage
void createMessage(String userId, String appId, String msgCollectionId, Message message) throws SocialMessageException
Posts a message to the user's specified message collection, to be sent to the set of recipients specified in the message- Parameters:
userId- The user posting the messageappId- The app idmsgCollectionId- The message collection Id to post to, default @outboxmessage- The message to post- Throws:
SocialMessageException
-
deleteMessages
void deleteMessages(String userId, String msgCollectionId, List<String> messageIds) throws SocialMessageException
Deletes a set of messages for a given user/message collection- Parameters:
userId- The userId of the person whose messages to be deletedmsgCollectionId- The Message Collection ID to delete from, default @allmessageIds- List of messageIds to delete- Throws:
SocialMessageException
-
modifyMessage
void modifyMessage(String userId, String msgCollId, String messageId, Message message) throws SocialMessageException
Modifies/Updates a specific message with new data- Parameters:
userId- The userId of the person whose messaged to be modifiedmsgCollId- The Message Collection ID to modify from, default @allmessageId- The messageId to modifymessage- The message details to modify- Throws:
SocialMessageException
-
-