Examples of UserId


Examples of org.apache.shindig.social.opensocial.spi.UserId

    }

    @Test
    public void getActivityEntriesWithIdsTest() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);
        UserId id2 = new UserId(UserId.Type.userId, ID_2);
        HashSet<UserId> users = new HashSet<UserId>();
        users.add(id);
        users.add(id2);
        GroupId groupId = new GroupId(GroupId.Type.self, GROUP_ID);
        Set<String> fields = new HashSet<String>();
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.UserId

    }

    @Test
    public void getActivityEntryWithIdTest() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);

        GroupId groupId = new GroupId(GroupId.Type.self, GROUP_ID);
        Set<String> fields = new HashSet<String>();

View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.UserId

    }

    @Test
    public void deleteActivityEntryWithIdTest() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);

        GroupId groupId = new GroupId(GroupId.Type.self, GROUP_ID);
        Set<String> fields = new HashSet<String>();

View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.UserId

    }

    @Test
    @Ignore
    public void getPerson_allFields() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);
        Set<String> fields = new HashSet<String>();

        org.apache.rave.portal.model.Person dbPerson = getDbPerson();
        expect(repository.get(Long.parseLong(ID_1))).andReturn(dbPerson);
        replay(repository);
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.UserId

        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }

    @Test
    public void getPerson_restrictedFields() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);
        Set<String> fields = new HashSet<String>();
        fields.add(Person.Field.DISPLAY_NAME.toString());
        fields.add(Person.Field.ID.toString());

        org.apache.rave.portal.model.Person dbPerson = getDbPerson();
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.UserId

    }

    @Test
    @Ignore
    public void getPerson_nullFields() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_1);

        org.apache.rave.portal.model.Person dbPerson = getDbPerson();
        expect(repository.get(Long.parseLong(ID_1))).andReturn(dbPerson);
        replay(repository);
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.UserId

    }

    @Test
    @Ignore
    public void getPerson_viewer() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.viewer, ID_2);

        expect(token.getViewerId()).andReturn(ID_1);
        replay(token);

        org.apache.rave.portal.model.Person dbPerson = getDbPerson();
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.UserId

        assertThat(person.getDisplayName(), is(equalTo(DISPLAY_NAME)));
    }

    @Test(expected = ProtocolException.class)
    public void getPerson_nullValue() throws ExecutionException, InterruptedException {
        UserId id = new UserId(UserId.Type.userId, ID_2);

        expect(repository.get(Long.parseLong(ID_1))).andReturn(null);
        replay(repository);

        service.getPerson(id, null, token);
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.UserId

        return Lists.asList(getDbPerson(), new org.apache.rave.portal.model.Person[]{});
    }

    private Set<UserId> getUserIdSet() {
        Set<UserId> ids = new HashSet<UserId>();
        ids.add(new UserId(UserId.Type.userId, ID_2));
        ids.add(new UserId(UserId.Type.userId, ID_3));
        return ids;
    }
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.UserId

            case friends:
                return getUniqueListOfFriends(userIds, collectionOptions, token);
            case groupId:
                return getGroupMembersFromRepository(collectionOptions, groupId.getGroupId(), token.getAppId());
            case self:
                return Lists.newArrayList(getPersonForId(new UserId(UserId.Type.me, null), token));
            case deleted:
                throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Deleted Friends are not tracked by the container");
            default:
                throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Invalid group id specified by request");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.