Package org.apache.shindig.social.opensocial.spi

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


        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(new UserId(UserId.Type.userId, VALID_USER_ID)));

        SecurityToken securityToken = getMockSecurityToken(ownerId, viewerId, applicationId, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
        GroupId groupId = new GroupId(GroupId.Type.self, "@self");
        expect(personService.getPeople(userIds, groupId, null, securityToken)).andReturn(users);
        replay(personService);

        expect(appDataRepository.getApplicationData(convertPeopleToUserIds(users), applicationId)).andReturn(
                applicationData == null ? new ArrayList<ApplicationData>() : Arrays.asList(applicationData));
View Full Code Here


        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(userId));

        SecurityToken securityToken = getMockSecurityToken(ownerId, viewerId, VALID_APPLICATION_ID, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
        GroupId groupId = new GroupId(GroupId.Type.self, "@self");
        expect(personService.getPeople(userIds, groupId, null, securityToken)).andReturn(users);
        replay(personService);

        expect(appDataRepository.getApplicationData(VALID_USER_ID, VALID_APPLICATION_ID)).andReturn(applicationData);
        Capture<ApplicationData> capturedApplicationData = new Capture<ApplicationData>();
View Full Code Here

        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(userId));

        SecurityToken securityToken = getMockSecurityToken(VALID_OWNER_ID, VALID_VIEWER_ID, VALID_APPLICATION_ID, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
        GroupId groupId = new GroupId(GroupId.Type.self, "@self");
        expect(personService.getPeople(userIds, groupId, null, securityToken)).andReturn(users);
        replay(personService);

        expect(appDataRepository.getApplicationData(VALID_USER_ID, VALID_APPLICATION_ID)).andReturn(applicationData);
        replay(appDataRepository);
View Full Code Here

        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(userId));

        SecurityToken securityToken = getMockSecurityToken(VALID_OWNER_ID, VALID_VIEWER_ID, VALID_APPLICATION_ID, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
        GroupId groupId = new GroupId(GroupId.Type.self, "@self");
        expect(personService.getPeople(userIds, groupId, null, securityToken)).andReturn(users);
        replay(personService);

        expect(appDataRepository.getApplicationData(VALID_USER_ID, VALID_APPLICATION_ID)).andReturn(applicationData);
        Capture<ApplicationData> capturedApplicationData = new Capture<ApplicationData>();
View Full Code Here

        String self = ID_1;
        expect(token.getViewerId()).andReturn(self);
        replay(token);

        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.self, GROUP_ID);

        expect(repository.findByUsername(self)).andReturn(getDbPerson());
        replay(repository);

        Future<RestfulCollection<Person>> people = service.getPeople(ids, groupId, null, null, token);
View Full Code Here

    }

    @Test
    public void getPeople_all() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.all, GROUP_ID);
        replay(token);

        expect(repository.findAllConnectedPeople(ID_2)).andReturn(getDbPersonList());
        expect(repository.findAllConnectedPeople(ID_3)).andReturn(getDbPersonList());
        expect(repository.findByUsername(ID_2)).andReturn(getDbPerson(ID_2));
View Full Code Here

    }

    @Test
    public void getPeople_friends() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.friends, GROUP_ID);
        replay(token);

        expect(repository.findByUsername(ID_2)).andReturn(getDbPerson(ID_2));
        expect(repository.findByUsername(ID_3)).andReturn(getDbPerson(ID_3));
View Full Code Here

    }

    @Test
    public void getPeople_groupId() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.objectId, GROUP_ID);

        expect(repository.findByGroup(GROUP_ID)).andReturn(getDbPersonList());
        replay(repository);

        Future<RestfulCollection<Person>> people = service.getPeople(ids, groupId, null, null, token);
View Full Code Here

    }

    @Test
    public void getPeople_GroupFilterField() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.objectId, GROUP_ID);
        replay(token);

        CollectionOptions options = new CollectionOptions();
        String field = Person.Field.ABOUT_ME.toString();
        String value = "AAA";
View Full Code Here

    }

    @Test
    public void getPeople_AllFilterField() throws ExecutionException, InterruptedException {
        Set<UserId> ids = getUserIdSet();
        GroupId groupId = new GroupId(GroupId.Type.all, GROUP_ID);
        replay(token);

        CollectionOptions options = new CollectionOptions();
        String field = Person.Field.ABOUT_ME.toString();
        String value = "AAA";
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.opensocial.spi.GroupId

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.