Package org.apache.shindig.social.core.model

Examples of org.apache.shindig.social.core.model.ActivityEntryImpl


  @Test
  public void testHandleGetActivityEntryById() throws Exception {
    String path = "/activitystreams/john.doe/@friends/@app/myObjectId123"// TODO: change id=1 in DB for consistency
    RestHandler operation = registry.getRestHandler(path, "GET");

    ActivityEntry entry = new ActivityEntryImpl();
    org.easymock.EasyMock.expect(service.getActivityEntry(eq(JOHN_DOE.iterator().next()),
        eq(new GroupId(GroupId.Type.friends, null)),
        eq("appId"), eq(ImmutableSet.<String>of()), eq("myObjectId123"), eq(token))).andReturn(
        ImmediateFuture.newInstance(entry));
View Full Code Here


    String jsonActivityEntry = "{title: 'hi mom!', object: {id: 'testObject'}}";

    String path = "/activitystreams/john.doe/@self/@app";
    RestHandler operation = registry.getRestHandler(path, method);

    ActivityEntry entry = new ActivityEntryImpl();
    org.easymock.EasyMock.expect(converter.convertToObject(eq(jsonActivityEntry), eq(ActivityEntry.class)))
        .andReturn(entry);

    org.easymock.EasyMock.expect(service.createActivityEntry(eq(JOHN_DOE.iterator().next()),
        eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()),
View Full Code Here

    String jsonActivityEntry = "{title: 'hi mom!', object: {id: 'testObject'}}";

    String path = "/activitystreams/john.doe/@self/@app";
    RestHandler operation = registry.getRestHandler(path, "POST");

    ActivityEntry entry = new ActivityEntryImpl();
    org.easymock.EasyMock.expect(converter.convertToObject(eq(jsonActivityEntry), eq(ActivityEntry.class)))
        .andReturn(entry);

    org.easymock.EasyMock.expect(service.createActivityEntry(eq(JOHN_DOE.iterator().next()),
        eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()),
View Full Code Here

    String jsonActivityEntry = "{title: 'hi mom!', object: {id: 'testObject'}}";

    String path = "/activitystreams/john.doe/@self/@app/testObject";
    RestHandler operation = registry.getRestHandler(path, "PUT");

    ActivityEntry entry = new ActivityEntryImpl();
    org.easymock.EasyMock.expect(converter.convertToObject(eq(jsonActivityEntry), eq(ActivityEntry.class)))
        .andReturn(entry);

    org.easymock.EasyMock.expect(service.updateActivityEntry(eq(JOHN_DOE.iterator().next()),
        eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()),
View Full Code Here

  @Test
  public void testHandleGetActivityEntryById() throws Exception {
    String path = "/activitystreams/john.doe/@friends/@app/myObjectId123"// TODO: change id=1 in DB for consistency
    RestHandler operation = registry.getRestHandler(path, "GET");

    ActivityEntry entry = new ActivityEntryImpl();
    org.easymock.EasyMock.expect(service.getActivityEntry(eq(JOHN_DOE.iterator().next()),
        eq(new GroupId(GroupId.Type.friends, null)),
        eq("appId"), eq(ImmutableSet.<String>of()), eq("myObjectId123"), eq(token))).andReturn(
        Futures.immediateFuture(entry));
View Full Code Here

    String jsonActivityEntry = "{title: 'hi mom!', object: {id: 'testObject'}}";

    String path = "/activitystreams/john.doe/@self/@app";
    RestHandler operation = registry.getRestHandler(path, method);

    ActivityEntry entry = new ActivityEntryImpl();
    org.easymock.EasyMock.expect(converter.convertToObject(eq(jsonActivityEntry), eq(ActivityEntry.class)))
        .andReturn(entry);

    org.easymock.EasyMock.expect(service.createActivityEntry(eq(JOHN_DOE.iterator().next()),
        eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()),
View Full Code Here

    String jsonActivityEntry = "{title: 'hi mom!', object: {id: 'testObject'}}";

    String path = "/activitystreams/john.doe/@self/@app";
    RestHandler operation = registry.getRestHandler(path, "POST");

    ActivityEntry entry = new ActivityEntryImpl();
    org.easymock.EasyMock.expect(converter.convertToObject(eq(jsonActivityEntry), eq(ActivityEntry.class)))
        .andReturn(entry);

    org.easymock.EasyMock.expect(service.createActivityEntry(eq(JOHN_DOE.iterator().next()),
        eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()),
View Full Code Here

    String jsonActivityEntry = "{title: 'hi mom!', object: {id: 'testObject'}}";

    String path = "/activitystreams/john.doe/@self/@app/testObject";
    RestHandler operation = registry.getRestHandler(path, "PUT");

    ActivityEntry entry = new ActivityEntryImpl();
    org.easymock.EasyMock.expect(converter.convertToObject(eq(jsonActivityEntry), eq(ActivityEntry.class)))
        .andReturn(entry);

    org.easymock.EasyMock.expect(service.updateActivityEntry(eq(JOHN_DOE.iterator().next()),
        eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()),
View Full Code Here

        tmp.setUserId(uid);
        tmp.setGroupId(groupId.getObjectId().toString());
        tmp.setAppId(appId);

        ActivityStreamsEntry saved = repository.save(tmp);
        ActivityEntryImpl impl = converter.convert(saved);
        return Futures.immediateFuture((ActivityEntry) impl);
    }
View Full Code Here

  @Test
  public void testHandleGetActivityEntryById() throws Exception {
    String path = "/activitystreams/john.doe/@friends/@app/myObjectId123"// TODO: change id=1 in DB for consistency
    RestHandler operation = registry.getRestHandler(path, "GET");

    ActivityEntry entry = new ActivityEntryImpl();
    org.easymock.EasyMock.expect(service.getActivityEntry(eq(JOHN_DOE.iterator().next()),
        eq(new GroupId(GroupId.Type.friends, null)),
        eq("appId"), eq(ImmutableSet.<String>of()), eq("myObjectId123"), eq(token))).andReturn(
        Futures.immediateFuture(entry));
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.core.model.ActivityEntryImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.