Author: chico
Date: Fri May 29 14:49:53 2009
New Revision: 780003
URL: http://svn.apache.org/viewvc?rev=780003&view=rev
Log:
SHINDIG-1070 | Result includes fields that are specified by the fields request
parameter, but if the fields parameter has not been set then all fields are
returned by default (patch from Ben Smith)
Modified:
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java
Modified:
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java?rev=780003&r1=780002&r2=780003&view=diff
==============================================================================
---
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java
(original)
+++
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java
Fri May 29 14:49:53 2009
@@ -84,12 +84,12 @@
if (msgCollId == null) {
// No message collection specified, return list of message collections
- return service.getMessageCollections(user,
MessageCollection.Field.ALL_FIELDS,
- options, request.getToken());
+ Set<String> fields =
request.getFields(MessageCollection.Field.ALL_FIELDS);
+ return service.getMessageCollections(user, fields, options,
request.getToken());
}
// If messageIds are specified return them, otherwise return entries in
the given collection.
- return service.getMessages(user, msgCollId,
- Message.Field.ALL_FIELDS, messageIds, options, request.getToken());
+ Set<String> fields = request.getFields(Message.Field.ALL_FIELDS);
+ return service.getMessages(user, msgCollId, fields, messageIds, options,
request.getToken());
}
/**