You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by an...@apache.org on 2014/02/25 15:39:42 UTC

svn commit: r1571712 - in /shindig/trunk/java/social-api/src: main/java/org/apache/shindig/social/opensocial/service/ main/java/org/apache/shindig/social/opensocial/spi/ test/java/org/apache/shindig/social/opensocial/service/

Author: ankon
Date: Tue Feb 25 14:39:42 2014
New Revision: 1571712

URL: http://svn.apache.org/r1571712
Log:
SHINDIG-1968: Create CollectionOptions via an injected CollectionOptionsFactory

Review: https://reviews.apache.org/r/18435/


Added:
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptionsFactory.java
Modified:
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityHandler.java
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandler.java
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/AlbumHandler.java
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/GroupHandler.java
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MediaItemHandler.java
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/PersonHandler.java
    shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptions.java
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityHandlerTest.java
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandlerTest.java
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/AlbumHandlerTest.java
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MediaItemHandlerTest.java
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MessageHandlerTest.java
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/PersonHandlerTest.java

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityHandler.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityHandler.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityHandler.java Tue Feb 25 14:39:42 2014
@@ -27,6 +27,7 @@ import org.apache.shindig.protocol.Servi
 import org.apache.shindig.social.opensocial.model.Activity;
 import org.apache.shindig.social.opensocial.spi.ActivityService;
 import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.UserId;
 
 import com.google.common.base.Objects;
@@ -46,11 +47,15 @@ public class ActivityHandler  {
 
   private final ActivityService service;
   private final ContainerConfig config;
+  private final CollectionOptionsFactory collectionOptionsFactory;
 
   @Inject
-  public ActivityHandler(ActivityService service, ContainerConfig config) {
+  public ActivityHandler(
+      ActivityService service, ContainerConfig config,
+      CollectionOptionsFactory collectionOptionsFactory) {
     this.service = service;
     this.config = config;
+    this.collectionOptionsFactory = collectionOptionsFactory;
   }
 
   /**
@@ -117,7 +122,7 @@ public class ActivityHandler  {
     Set<UserId> userIds = request.getUsers();
     Set<String> optionalActivityIds = ImmutableSet.copyOf(request.getListParameter("activityId"));
 
-    CollectionOptions options = new CollectionOptions(request);
+    CollectionOptions options = collectionOptionsFactory.create(request);
 
     // Preconditions
     HandlerPreconditions.requireNotEmpty(userIds, "No userId specified");

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandler.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandler.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandler.java Tue Feb 25 14:39:42 2014
@@ -31,6 +31,7 @@ import org.apache.shindig.protocol.Servi
 import org.apache.shindig.social.opensocial.model.ActivityEntry;
 import org.apache.shindig.social.opensocial.spi.ActivityStreamService;
 import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.UserId;
 
 import com.google.common.base.Objects;
@@ -46,17 +47,22 @@ public class ActivityStreamHandler {
 
   private final ActivityStreamService service;
   private final ContainerConfig config;
+  private final CollectionOptionsFactory collectionOptionsFactory;
 
   /**
    * <p>Constructor for ActivityStreamHandler.</p>
    *
    * @param service a {@link org.apache.shindig.social.opensocial.spi.ActivityStreamService} object.
    * @param config a {@link org.apache.shindig.config.ContainerConfig} object.
+   * @param collectionOptionsFactory a {@link org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory} object.
    */
   @Inject
-  public ActivityStreamHandler(ActivityStreamService service, ContainerConfig config) {
+  public ActivityStreamHandler(
+      ActivityStreamService service, ContainerConfig config,
+      CollectionOptionsFactory collectionOptionsFactory) {
     this.service = service;
     this.config = config;
+    this.collectionOptionsFactory = collectionOptionsFactory;
   }
 
   /**
@@ -151,7 +157,7 @@ public class ActivityStreamHandler {
     Set<UserId> userIds = request.getUsers();
     Set<String> optionalActivityIds = ImmutableSet.copyOf(request.getListParameter("activityId"));
 
-    CollectionOptions options = new CollectionOptions(request);
+    CollectionOptions options = collectionOptionsFactory.create(request);
 
     // Preconditions
     HandlerPreconditions.requireNotEmpty(userIds, "No userId specified");

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/AlbumHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/AlbumHandler.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/AlbumHandler.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/AlbumHandler.java Tue Feb 25 14:39:42 2014
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Set;
 import java.util.concurrent.Future;
 
-import com.google.common.base.Objects;
 import org.apache.shindig.config.ContainerConfig;
 import org.apache.shindig.protocol.HandlerPreconditions;
 import org.apache.shindig.protocol.Operation;
@@ -31,9 +30,10 @@ import org.apache.shindig.protocol.Reque
 import org.apache.shindig.protocol.Service;
 import org.apache.shindig.social.opensocial.model.Album;
 import org.apache.shindig.social.opensocial.spi.AlbumService;
-import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.UserId;
 
+import com.google.common.base.Objects;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.inject.Inject;
@@ -48,11 +48,15 @@ public class AlbumHandler {
 
   private final AlbumService service;
   private final ContainerConfig config;
+  private final CollectionOptionsFactory collectionOptionsFactory;
 
   @Inject
-  public AlbumHandler(AlbumService service, ContainerConfig config) {
+  public AlbumHandler(
+      AlbumService service, ContainerConfig config,
+      CollectionOptionsFactory collectionOptionsFactory) {
     this.service = service;
     this.config = config;
+    this.collectionOptionsFactory = collectionOptionsFactory;
   }
 
   /*
@@ -111,7 +115,7 @@ public class AlbumHandler {
       } else {
         return service.getAlbums(Iterables.getOnlyElement(userIds),
             request.getAppId(), request.getFields(),
-            new CollectionOptions(request), optionalAlbumIds,
+            collectionOptionsFactory.create(request), optionalAlbumIds,
             request.getToken());
       }
     }
@@ -119,7 +123,7 @@ public class AlbumHandler {
     // Retrieve albums by group
     return service.getAlbums(userIds, request.getGroup(), request
         .getAppId(), request.getFields(),
-        new CollectionOptions(request), request.getToken());
+        collectionOptionsFactory.create(request), request.getToken());
   }
 
   /*

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/GroupHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/GroupHandler.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/GroupHandler.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/GroupHandler.java Tue Feb 25 14:39:42 2014
@@ -26,6 +26,7 @@ import org.apache.shindig.protocol.Opera
 import org.apache.shindig.protocol.ProtocolException;
 import org.apache.shindig.protocol.Service;
 import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.GroupService;
 import org.apache.shindig.social.opensocial.spi.UserId;
 
@@ -40,16 +41,18 @@ import com.google.inject.Inject;
 public class GroupHandler {
 
   private final GroupService service;
+  private final CollectionOptionsFactory collectionOptionsFactory;
 
   @Inject
-  public GroupHandler(GroupService service) {
+  public GroupHandler(GroupService service, CollectionOptionsFactory collectionOptionsFactory) {
     this.service = service;
+    this.collectionOptionsFactory = collectionOptionsFactory;
   }
 
   @Operation(httpMethods = "GET")
   public Future<?> get(SocialRequestItem request) throws ProtocolException {
     Set<UserId> userIds = request.getUsers();
-    CollectionOptions options = new CollectionOptions(request);
+    CollectionOptions options = collectionOptionsFactory.create(request);
 
     // Preconditions
     HandlerPreconditions.requireNotEmpty(userIds, "No userId specified");

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MediaItemHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MediaItemHandler.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MediaItemHandler.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MediaItemHandler.java Tue Feb 25 14:39:42 2014
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Set;
 import java.util.concurrent.Future;
 
-import com.google.common.base.Objects;
 import org.apache.shindig.config.ContainerConfig;
 import org.apache.shindig.protocol.HandlerPreconditions;
 import org.apache.shindig.protocol.Operation;
@@ -30,10 +29,11 @@ import org.apache.shindig.protocol.Proto
 import org.apache.shindig.protocol.RequestItem;
 import org.apache.shindig.protocol.Service;
 import org.apache.shindig.social.opensocial.model.MediaItem;
-import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.MediaItemService;
 import org.apache.shindig.social.opensocial.spi.UserId;
 
+import com.google.common.base.Objects;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.inject.Inject;
@@ -49,11 +49,15 @@ public class MediaItemHandler {
 
   private final MediaItemService service;
   private final ContainerConfig config;
+  private final CollectionOptionsFactory collectionOptionsFactory;
 
   @Inject
-  public MediaItemHandler(MediaItemService service, ContainerConfig config) {
+  public MediaItemHandler(
+      MediaItemService service, ContainerConfig config,
+      CollectionOptionsFactory collectionOptionsFactory) {
     this.service = service;
     this.config = config;
+    this.collectionOptionsFactory = collectionOptionsFactory;
   }
 
   /*
@@ -108,7 +112,7 @@ public class MediaItemHandler {
       } else {
         return service.getMediaItems(Iterables.getOnlyElement(userIds),
             request.getAppId(), albumId, optionalMediaItemIds,
-            request.getFields(), new CollectionOptions(request),
+            request.getFields(), collectionOptionsFactory.create(request),
             request.getToken());
       }
     }
@@ -117,13 +121,13 @@ public class MediaItemHandler {
     if (albumId != null) {
       return service.getMediaItems(Iterables.getOnlyElement(userIds),
           request.getAppId(), albumId, request.getFields(),
-          new CollectionOptions(request), request.getToken());
+          collectionOptionsFactory.create(request), request.getToken());
     }
 
     // Retrieve by users and groups
     return service.getMediaItems(userIds, request.getGroup(), request
         .getAppId(), request.getFields(),
-        new CollectionOptions(request), request.getToken());
+        collectionOptionsFactory.create(request), request.getToken());
   }
 
   /*

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/MessageHandler.java Tue Feb 25 14:39:42 2014
@@ -24,6 +24,7 @@ import org.apache.shindig.protocol.Proto
 import org.apache.shindig.protocol.Service;
 import org.apache.shindig.social.opensocial.model.Message;
 import org.apache.shindig.social.opensocial.model.MessageCollection;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.CollectionOptions;
 import org.apache.shindig.social.opensocial.spi.MessageService;
 import org.apache.shindig.social.opensocial.spi.UserId;
@@ -43,10 +44,12 @@ import com.google.inject.Inject;
 public class MessageHandler {
 
   private final MessageService service;
+  private final CollectionOptionsFactory collectionOptionsFactory;
 
   @Inject
-  public MessageHandler(MessageService service) {
+  public MessageHandler(MessageService service, CollectionOptionsFactory collectionOptionsFactory) {
     this.service = service;
+    this.collectionOptionsFactory = collectionOptionsFactory;
   }
 
   @Operation(httpMethods = "DELETE")
@@ -82,7 +85,7 @@ public class MessageHandler {
     String msgCollId = request.getParameter("msgCollId");
     List<String> messageIds = request.getListParameter("messageIds");
 
-    CollectionOptions options = new CollectionOptions(request);
+    CollectionOptions options = collectionOptionsFactory.create(request);
 
     HandlerPreconditions.requireNotEmpty(userIds, "No userId specified");
     HandlerPreconditions.requireSingular(userIds, "Multiple userIds not supported");

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/PersonHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/PersonHandler.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/PersonHandler.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/PersonHandler.java Tue Feb 25 14:39:42 2014
@@ -32,6 +32,7 @@ import org.apache.shindig.protocol.Restf
 import org.apache.shindig.protocol.Service;
 import org.apache.shindig.social.opensocial.model.Person;
 import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.GroupId;
 import org.apache.shindig.social.opensocial.spi.PersonService;
 import org.apache.shindig.social.opensocial.spi.UserId;
@@ -51,6 +52,7 @@ import com.google.inject.Inject;
 public class PersonHandler {
   private final PersonService personService;
   private final ContainerConfig config;
+  private final CollectionOptionsFactory collectionOptionsFactory;
 
 
   // Return a future for the first item of a collection
@@ -65,12 +67,15 @@ public class PersonHandler {
       };
     };
     return Futures.lazyTransform(collection, firstItem);
- }
+  }
 
   @Inject
-  public PersonHandler(PersonService personService, ContainerConfig config) {
+  public PersonHandler(
+      PersonService personService, ContainerConfig config,
+      CollectionOptionsFactory collectionOptionsFactory) {
     this.personService = personService;
     this.config = config;
+    this.collectionOptionsFactory = collectionOptionsFactory;
   }
 
   /**
@@ -91,7 +96,7 @@ public class PersonHandler {
       throw new IllegalArgumentException("Cannot fetch personIds for multiple userIds");
     }
 
-    CollectionOptions options = new CollectionOptions(request);
+    CollectionOptions options = collectionOptionsFactory.create(request);
 
     if (userIds.size() == 1) {
       if (optionalPersonId.isEmpty()) {

Modified: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptions.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptions.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptions.java (original)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptions.java Tue Feb 25 14:39:42 2014
@@ -28,6 +28,7 @@ import org.apache.shindig.protocol.Reque
 import org.apache.shindig.protocol.model.FilterOperation;
 import org.apache.shindig.protocol.model.SortOrder;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Objects;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
@@ -58,8 +59,11 @@ public class CollectionOptions {
       "userId",
       "groupId"
     };
+
+  @VisibleForTesting
   public CollectionOptions() {}
 
+  @VisibleForTesting
   public CollectionOptions(RequestItem request) {
     this.sortBy = request.getSortBy();
     this.sortOrder = request.getSortOrder();

Added: shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptionsFactory.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptionsFactory.java?rev=1571712&view=auto
==============================================================================
--- shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptionsFactory.java (added)
+++ shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/CollectionOptionsFactory.java Tue Feb 25 14:39:42 2014
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+package org.apache.shindig.social.opensocial.spi;
+
+import org.apache.shindig.protocol.RequestItem;
+
+/**
+ * Factory for {@link CollectionOptions}.
+ */
+public class CollectionOptionsFactory {
+  /**
+   * Create an instance of {@link CollectionOptions} from the provided {@code request}.
+   *
+   * @param requestItem
+   * @return a suitable instance of {@link CollectionOptions}, never {@code null}.
+   */
+  public CollectionOptions create(RequestItem requestItem) {
+    return new CollectionOptions(requestItem);
+  }
+}

Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityHandlerTest.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityHandlerTest.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityHandlerTest.java (original)
+++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityHandlerTest.java Tue Feb 25 14:39:42 2014
@@ -34,6 +34,7 @@ import org.apache.shindig.social.core.mo
 import org.apache.shindig.social.opensocial.model.Activity;
 import org.apache.shindig.social.opensocial.spi.ActivityService;
 import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.GroupId;
 import org.apache.shindig.social.opensocial.spi.UserId;
 
@@ -85,7 +86,7 @@ public class ActivityHandlerTest extends
          "}}}");
 
     containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
-    handler = new ActivityHandler(activityService, containerConfig);
+    handler = new ActivityHandler(activityService, containerConfig, new CollectionOptionsFactory());
     registry = new DefaultHandlerRegistry(null, converter,
         new HandlerExecutionListener.NoOpHandler());
     registry.addHandlers(ImmutableSet.<Object>of(handler));

Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandlerTest.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandlerTest.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandlerTest.java (original)
+++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandlerTest.java Tue Feb 25 14:39:42 2014
@@ -42,6 +42,7 @@ import org.apache.shindig.social.core.mo
 import org.apache.shindig.social.opensocial.model.ActivityEntry;
 import org.apache.shindig.social.opensocial.spi.ActivityStreamService;
 import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.GroupId;
 import org.apache.shindig.social.opensocial.spi.UserId;
 import org.json.JSONObject;
@@ -88,7 +89,7 @@ public class ActivityStreamHandlerTest e
          "}}}");
 
     containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
-    handler = new ActivityStreamHandler(service, containerConfig);
+    handler = new ActivityStreamHandler(service, containerConfig, new CollectionOptionsFactory());
     registry = new DefaultHandlerRegistry(null, converter,
         new HandlerExecutionListener.NoOpHandler());
     registry.addHandlers(ImmutableSet.<Object>of(handler));

Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/AlbumHandlerTest.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/AlbumHandlerTest.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/AlbumHandlerTest.java (original)
+++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/AlbumHandlerTest.java Tue Feb 25 14:39:42 2014
@@ -31,6 +31,7 @@ import org.apache.shindig.protocol.Handl
 import org.apache.shindig.protocol.RestHandler;
 import org.apache.shindig.protocol.conversion.BeanJsonConverter;
 import org.apache.shindig.social.opensocial.spi.AlbumService;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.json.JSONObject;
 import org.junit.Before;
 import org.junit.Test;
@@ -57,7 +58,7 @@ public class AlbumHandlerTest extends Ea
          "}}}");
 
     containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
-    handler = new AlbumHandler(albumService, containerConfig);
+    handler = new AlbumHandler(albumService, containerConfig, new CollectionOptionsFactory());
 
     registry = new DefaultHandlerRegistry(null, converter,
         new HandlerExecutionListener.NoOpHandler());

Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MediaItemHandlerTest.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MediaItemHandlerTest.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MediaItemHandlerTest.java (original)
+++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MediaItemHandlerTest.java Tue Feb 25 14:39:42 2014
@@ -30,6 +30,7 @@ import org.apache.shindig.protocol.Handl
 import org.apache.shindig.protocol.HandlerRegistry;
 import org.apache.shindig.protocol.RestHandler;
 import org.apache.shindig.protocol.conversion.BeanJsonConverter;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.MediaItemService;
 import org.json.JSONObject;
 import org.junit.Before;
@@ -57,7 +58,7 @@ public class MediaItemHandlerTest extend
          "}}}");
 
     containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
-    handler = new MediaItemHandler(mediaService, containerConfig);
+    handler = new MediaItemHandler(mediaService, containerConfig, new CollectionOptionsFactory());
 
     registry = new DefaultHandlerRegistry(null, converter,
         new HandlerExecutionListener.NoOpHandler());

Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MessageHandlerTest.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MessageHandlerTest.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MessageHandlerTest.java (original)
+++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MessageHandlerTest.java Tue Feb 25 14:39:42 2014
@@ -30,6 +30,7 @@ import org.apache.shindig.protocol.RestH
 import org.apache.shindig.protocol.conversion.BeanJsonConverter;
 import org.apache.shindig.social.core.model.MessageImpl;
 import org.apache.shindig.social.opensocial.model.Message;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.MessageService;
 import org.apache.shindig.social.opensocial.spi.UserId;
 import org.easymock.EasyMock;
@@ -63,7 +64,7 @@ public class MessageHandlerTest extends 
     sender = new UserId(UserId.Type.userId, "message.sender");
     recipients = ImmutableList.of("second.recipient", "first.recipient");
 
-    handler = new MessageHandler(messageService);
+    handler = new MessageHandler(messageService, new CollectionOptionsFactory());
     registry = new DefaultHandlerRegistry(null, converter,
         new HandlerExecutionListener.NoOpHandler());
     registry.addHandlers(ImmutableSet.<Object>of(handler));

Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/PersonHandlerTest.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/PersonHandlerTest.java?rev=1571712&r1=1571711&r2=1571712&view=diff
==============================================================================
--- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/PersonHandlerTest.java (original)
+++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/PersonHandlerTest.java Tue Feb 25 14:39:42 2014
@@ -35,6 +35,7 @@ import org.apache.shindig.protocol.model
 import org.apache.shindig.social.core.model.PersonImpl;
 import org.apache.shindig.social.opensocial.model.Person;
 import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.shindig.social.opensocial.spi.CollectionOptionsFactory;
 import org.apache.shindig.social.opensocial.spi.GroupId;
 import org.apache.shindig.social.opensocial.spi.PersonService;
 import org.apache.shindig.social.opensocial.spi.UserId;
@@ -98,7 +99,7 @@ public class PersonHandlerTest extends E
          "}}}");
 
     containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
-    handler = new PersonHandler(personService, containerConfig);
+    handler = new PersonHandler(personService, containerConfig, new CollectionOptionsFactory());
     registry = new DefaultHandlerRegistry(null, converter,
         new HandlerExecutionListener.NoOpHandler());
     registry.addHandlers(ImmutableSet.<Object>of(handler));