org.apache.shindig.social.opensocial.spi
Class MessageService.NotImplementedMessageService

java.lang.Object
  extended by org.apache.shindig.social.opensocial.spi.MessageService.NotImplementedMessageService
All Implemented Interfaces:
MessageService
Enclosing interface:
MessageService

public static class MessageService.NotImplementedMessageService
extends Object
implements MessageService


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.shindig.social.opensocial.spi.MessageService
MessageService.NotImplementedMessageService
 
Constructor Summary
MessageService.NotImplementedMessageService()
           
 
Method Summary
 Future<Void> createMessage(UserId userId, String appId, String msgCollId, Message message, SecurityToken token)
          Posts a message to the user's specified message collection, to be sent to the set of recipients specified in the message.
 Future<MessageCollection> createMessageCollection(UserId userId, MessageCollection msgCollection, SecurityToken token)
          Creates a new message collection for the given arguments
 Future<Void> deleteMessageCollection(UserId userId, String msgCollId, SecurityToken token)
          Deletes a message collection for the given arguments
 Future<Void> deleteMessages(UserId userId, String msgCollId, List<String> ids, SecurityToken token)
          Deletes a set of messages for a given user/message collection
 Future<RestfulCollection<MessageCollection>> getMessageCollections(UserId userId, Set<String> fields, CollectionOptions options, SecurityToken token)
          Returns a list of message collections corresponding to the given user
 Future<RestfulCollection<Message>> getMessages(UserId userId, String msgCollId, Set<String> fields, List<String> msgIds, CollectionOptions options, SecurityToken token)
          Returns a list of messages that correspond to the passed in data
 Future<Void> modifyMessage(UserId userId, String msgCollId, String messageId, Message message, SecurityToken token)
          Modifies/Updates a specific message with new data
 Future<Void> modifyMessageCollection(UserId userId, MessageCollection msgCollection, SecurityToken token)
          Modifies/Updates a message collection for the given arguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageService.NotImplementedMessageService

public MessageService.NotImplementedMessageService()
Method Detail

getMessageCollections

public Future<RestfulCollection<MessageCollection>> getMessageCollections(UserId userId,
                                                                          Set<String> fields,
                                                                          CollectionOptions options,
                                                                          SecurityToken token)
                                                                   throws ProtocolException
Description copied from interface: MessageService
Returns a list of message collections corresponding to the given user

Specified by:
getMessageCollections in interface MessageService
Parameters:
userId - The User to fetch for
fields - The fields to fetch for the message collections
options - Pagination, etal
token - Given security token for this request
Returns:
a collection of message collections.
Throws:
ProtocolException - when invalid parameters are given

createMessageCollection

public Future<MessageCollection> createMessageCollection(UserId userId,
                                                         MessageCollection msgCollection,
                                                         SecurityToken token)
                                                  throws ProtocolException
Description copied from interface: MessageService
Creates a new message collection for the given arguments

Specified by:
createMessageCollection in interface MessageService
Parameters:
userId - The userId to create the message collection for
msgCollection - A message collection that is to be created
token - A security token for this request
Returns:
Data for the message collection that is created
Throws:
ProtocolException - when invalid parameters are given or not implemented

modifyMessageCollection

public Future<Void> modifyMessageCollection(UserId userId,
                                            MessageCollection msgCollection,
                                            SecurityToken token)
                                     throws ProtocolException
Description copied from interface: MessageService
Modifies/Updates a message collection for the given arguments

Specified by:
modifyMessageCollection in interface MessageService
Parameters:
userId - The userId to modify the message collection for
msgCollection - Data for the message collection to be modified
token - A security token for this request
Throws:
ProtocolException - when invalid parameters are given or not implemented

deleteMessageCollection

public Future<Void> deleteMessageCollection(UserId userId,
                                            String msgCollId,
                                            SecurityToken token)
                                     throws ProtocolException
Description copied from interface: MessageService
Deletes a message collection for the given arguments

Specified by:
deleteMessageCollection in interface MessageService
Parameters:
userId - The userId to create the message collection for
msgCollId - Data for the message collection to be modified
token - A security token for this request
Returns:
Future
Throws:
ProtocolException - when invalid parameters are given, the message collection does not exist or not implemented

getMessages

public Future<RestfulCollection<Message>> getMessages(UserId userId,
                                                      String msgCollId,
                                                      Set<String> fields,
                                                      List<String> msgIds,
                                                      CollectionOptions options,
                                                      SecurityToken token)
                                               throws ProtocolException
Description copied from interface: MessageService
Returns a list of messages that correspond to the passed in data

Specified by:
getMessages in interface MessageService
Parameters:
userId - The User to fetch for
msgCollId - The message Collection ID to fetch from, default @all
fields - The fields to fetch for the messages
msgIds - An explicit set of message ids to fetch
options - Options to control the fetch
token - Given security token for this request
Returns:
a collection of messages
Throws:
ProtocolException - when invalid parameters are given

createMessage

public Future<Void> createMessage(UserId userId,
                                  String appId,
                                  String msgCollId,
                                  Message message,
                                  SecurityToken token)
                           throws ProtocolException
Description copied from interface: MessageService
Posts a message to the user's specified message collection, to be sent to the set of recipients specified in the message.

Specified by:
createMessage in interface MessageService
Parameters:
userId - The user posting the message.
appId - The app id
msgCollId - The message collection Id to post to, default @outbox
message - The message to post
token - A valid security token @return a response item containing any errors/
Returns:
Void Future
Throws:
ProtocolException - when invalid parameters are given

deleteMessages

public Future<Void> deleteMessages(UserId userId,
                                   String msgCollId,
                                   List<String> ids,
                                   SecurityToken token)
                            throws ProtocolException
Description copied from interface: MessageService
Deletes a set of messages for a given user/message collection

Specified by:
deleteMessages in interface MessageService
Parameters:
userId - The User to delete for
msgCollId - The Message Collection ID to delete from, default @all
ids - List of IDs to delete
token - Given Security Token for this request
Returns:
Future
Throws:
ProtocolException

modifyMessage

public Future<Void> modifyMessage(UserId userId,
                                  String msgCollId,
                                  String messageId,
                                  Message message,
                                  SecurityToken token)
                           throws ProtocolException
Description copied from interface: MessageService
Modifies/Updates a specific message with new data

Specified by:
modifyMessage in interface MessageService
Parameters:
userId - The User to modify for
msgCollId - The Message Collection ID to modify from, default @all
messageId - The messageId to modify
message - The message details to modify
token - Given Security Token for this request
Returns:
Future
Throws:
ProtocolException - for invalid parameters or missing messages or users


Copyright © 2007-2012. All Rights Reserved.