Package org.eurekastreams.server.action.request.opensocial

Examples of org.eurekastreams.server.action.request.opensocial.GetPeopleByOpenSocialIdsRequest


                oneOf(getPersonModelViewsByOpenSocialIdsMapper).execute(openSocialIds);
                will(returnValue(people));
            }
        });

        GetPeopleByOpenSocialIdsRequest currentRequest = new GetPeopleByOpenSocialIdsRequest(openSocialIds, "self");

        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principal);

        sut.execute(currentContext);
View Full Code Here


     * Validate the type of relationship provided in the request matches the set of options.
     */
    @Override
    public void validate(final PrincipalActionContext inActionContext) throws ValidationException
    {
        GetPeopleByOpenSocialIdsRequest currentRequest = (GetPeopleByOpenSocialIdsRequest) inActionContext.getParams();

        if (!currentRequest.getTypeOfRelationshipForPeopleReturned().equals("self")
                && !currentRequest.getTypeOfRelationshipForPeopleReturned().equals("all")
                && !currentRequest.getTypeOfRelationshipForPeopleReturned().equals("friends"))
        {
            throw new ValidationException("Unsupported relationship type provided.");
        }
    }
View Full Code Here

    {
        final LinkedList<String> openSocialIds = new LinkedList<String>();
        openSocialIds.add(SUBJECT_OPENSOCIAL_ID);
        openSocialIds.add(AUTHOR_OPENSOCIAL_ID);

        GetPeopleByOpenSocialIdsRequest currentRequest = new GetPeopleByOpenSocialIdsRequest(openSocialIds, "self");

        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principal);

        sut.validate(currentContext);
View Full Code Here

    {
        final LinkedList<String> openSocialIds = new LinkedList<String>();
        openSocialIds.add(SUBJECT_OPENSOCIAL_ID);
        openSocialIds.add(AUTHOR_OPENSOCIAL_ID);

        GetPeopleByOpenSocialIdsRequest currentRequest = new GetPeopleByOpenSocialIdsRequest(openSocialIds, "all");

        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principal);

        sut.validate(currentContext);
View Full Code Here

    {
        final LinkedList<String> openSocialIds = new LinkedList<String>();
        openSocialIds.add(SUBJECT_OPENSOCIAL_ID);
        openSocialIds.add(AUTHOR_OPENSOCIAL_ID);

        GetPeopleByOpenSocialIdsRequest currentRequest = new GetPeopleByOpenSocialIdsRequest(openSocialIds, "friends");

        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principal);

        sut.validate(currentContext);
View Full Code Here

    {
        final LinkedList<String> openSocialIds = new LinkedList<String>();
        openSocialIds.add(SUBJECT_OPENSOCIAL_ID);
        openSocialIds.add(AUTHOR_OPENSOCIAL_ID);

        GetPeopleByOpenSocialIdsRequest currentRequest = new GetPeopleByOpenSocialIdsRequest(openSocialIds, "testing");

        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principal);

        sut.validate(currentContext);
View Full Code Here

     * Retrieve the list of {@link PersonModelView} objects based on OpenSocial id.
     */
    @Override
    public LinkedList<PersonModelView> execute(final PrincipalActionContext inActionContext) throws ExecutionException
    {
        GetPeopleByOpenSocialIdsRequest currentRequest = (GetPeopleByOpenSocialIdsRequest) inActionContext.getParams();
        List<String> requestedOpenSocialIds = currentRequest.getOpenSocialIds();
        List<String> openSocialIds = new ArrayList<String>();
        List<String> accountIds = new ArrayList<String>();
        List<PersonModelView> people = new ArrayList<PersonModelView>();

        for(String currentUserId : requestedOpenSocialIds)
View Full Code Here

                // This is iterating through the list to avoid failing entire call for users that are not
                // in the Eureka db.
                people = new LinkedList<PersonModelView>();
                for (String userId : userIdList)
                {
                    GetPeopleByOpenSocialIdsRequest currentRequest = new GetPeopleByOpenSocialIdsRequest(
                            Arrays.asList(userId), groupId.getType().toString().toLowerCase());

                    ServiceActionContext currentContext = new ServiceActionContext(currentRequest, getPrincipal(token));
                    PersonModelView result = null;
                    try
View Full Code Here

            LinkedList<String> userIdList = new LinkedList<String>();
            userIdList.add(openSocialId);

            // Build up request to retrieve a single person.
            GetPeopleByOpenSocialIdsRequest currentRequest = new GetPeopleByOpenSocialIdsRequest(userIdList,
                    Type.all.toString());

            // Create the actionContext
            PrincipalActionContext ac = new ServiceActionContext(currentRequest, getPrincipal(token));
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.opensocial.GetPeopleByOpenSocialIdsRequest

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.