Package org.eurekastreams.server.action.request.stream

Examples of org.eurekastreams.server.action.request.stream.DeleteIdsFromListsRequest


    public void testPerformAction() throws Exception
    {
        context.checking(new Expectations()
        {
            {
                DeleteIdsFromListsRequest request = new DeleteIdsFromListsRequest(Arrays.asList(
                        "someKey", "anotherKey"), Arrays.asList(1L, 2L));
                oneOf(actionContext).getParams();
                will(returnValue(request));

                allowing(removeMapper).execute(with(any(DeleteIdsFromListsRequest.class)));
View Full Code Here


            asyncRequests.add(new UserActionRequest("deleteCacheKeysAction", null, (Serializable) Collections
                    .singleton(CacheKeys.PERSON_BY_ID + followedPersonId)));

            // Remove the current user that is severing a relationship with the target
            // from the list of followers for that target user.
            asyncRequests.add(new UserActionRequest("deleteIdsFromLists", null, new DeleteIdsFromListsRequest(
                    Collections.singletonList(CacheKeys.FOLLOWERS_BY_PERSON + followedPersonId), Collections
                            .singletonList(followerPersonId))));

            // Remove the target user the current user is no longer following from the list of
            // users that the current is already following.
            asyncRequests.add(new UserActionRequest("deleteIdsFromLists", null, new DeleteIdsFromListsRequest(
                    Collections.singletonList(CacheKeys.PEOPLE_FOLLOWED_BY_PERSON + followerPersonId), Collections
                            .singletonList(followedPersonId))));

            // Post an async action to update the cache for the user's list of following activity ids.
            asyncRequests.add(new UserActionRequest("refreshFollowedByActivities", null, followerPersonId));
View Full Code Here

        assertEquals(6, getCache().getList(cacheKey2).size());
        assertEquals(9, getCache().getList(cacheKey3).size());

        List<String> keys = Arrays.asList(cacheKey1, cacheKey2, cacheKey3);
        List<Long> values = Arrays.asList(1L, 2L, 3L);
        DeleteIdsFromListsRequest request = new DeleteIdsFromListsRequest(keys, values);

        sut.execute(request);

        assertEquals(0, getCache().getList(cacheKey1).size());
        assertEquals(3, getCache().getList(cacheKey2).size());
View Full Code Here

    {
        for (String key : keys)
        {
            // Put an action on the queue to delete the activities from the appropriate lists
            inActionContext.getUserActionRequests().add(
                    new UserActionRequest("deleteIdsFromLists", null, new DeleteIdsFromListsRequest(Collections
                            .singletonList(key), values)));
        }
    }
View Full Code Here

            asyncRequests.add(new UserActionRequest("deleteCacheKeysAction", null, (Serializable) Collections
                    .singleton(CacheKeys.GROUP_BY_ID + targetId)));

            // Remove the current user that is severing a relationship with the target group
            // from the list of followers for that target group.
            asyncRequests.add(new UserActionRequest("deleteIdsFromLists", null, new DeleteIdsFromListsRequest(
                    Collections.singletonList(CacheKeys.FOLLOWERS_BY_GROUP + targetId), Collections
                            .singletonList(followerId))));

            // Remove the target group the current user is now following from the list of
            // groups that the current user is already following.
            asyncRequests.add(new UserActionRequest("deleteIdsFromLists", null, new DeleteIdsFromListsRequest(
                    Collections.singletonList(CacheKeys.GROUPS_FOLLOWED_BY_PERSON + followerId), Collections
                            .singletonList(targetId))));

            if (isToBeRemovedUserGroupCoordinator)
            {
View Full Code Here

        if (log.isInfoEnabled())
        {
            log.info("Queuing UserActionRequest for removing expired activity ids from lists cache keys: " + keys);
        }
        inActionContext.getUserActionRequests().add(
                new UserActionRequest("deleteIdsFromLists", null, new DeleteIdsFromListsRequest(keys, response
                        .getActivityIds())));

        if (log.isInfoEnabled())
        {
            log.info("Queuing UserActionRequests for removing expired activity ids from cache: "
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.stream.DeleteIdsFromListsRequest

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.