Package org.eurekastreams.server.action.request.notification

Examples of org.eurekastreams.server.action.request.notification.GroupMembershipResponseNotificationsRequest


                allowing(idToUniqueIdDAO).execute(GROUP_ID);
                will(returnValue("somegroup"));
            }
        });

        NotificationBatch results = sut.translate(new GroupMembershipResponseNotificationsRequest(
                RequestType.REQUEST_GROUP_ACCESS_APPROVED, ACTOR_ID, GROUP_ID, REQUESTOR_ID));

        // check recipients
        assertEquals(1, results.getRecipients().size());
        TranslatorTestHelper.assertRecipients(results, NotificationType.REQUEST_GROUP_ACCESS_APPROVED, REQUESTOR_ID);
View Full Code Here


                allowing(idToUniqueIdDAO).execute(GROUP_ID);
                will(returnValue("somegroup"));
            }
        });

        NotificationBatch results = sut.translate(new GroupMembershipResponseNotificationsRequest(
                RequestType.REQUEST_GROUP_ACCESS_DENIED, ACTOR_ID, GROUP_ID, REQUESTOR_ID));

        // check recipients
        assertEquals(1, results.getRecipients().size());
        TranslatorTestHelper.assertRecipients(results, NotificationType.REQUEST_GROUP_ACCESS_DENIED, REQUESTOR_ID);
View Full Code Here

        sut.execute(actionCtx);

        context.assertIsSatisfied();

        assertEquals(1, actionCtx.getUserActionRequests().size());
        GroupMembershipResponseNotificationsRequest notifRqst = (GroupMembershipResponseNotificationsRequest) (actionCtx
                .getUserActionRequests().get(0).getParams());
        assertEquals(RequestType.REQUEST_GROUP_ACCESS_DENIED, notifRqst.getType());
        assertEquals(USER_ID, notifRqst.getActorId());
        assertEquals(GROUP_ID, notifRqst.getTargetEntityId());
        assertEquals(PERSON_ID, notifRqst.getRequestorId());
    }
View Full Code Here

        mapper.execute(request);

        // send notification
        inActionContext.getUserActionRequests().add(
                new UserActionRequest(CreateNotificationsRequest.ACTION_NAME, null,
                        new GroupMembershipResponseNotificationsRequest(RequestType.REQUEST_GROUP_ACCESS_DENIED,
                                inActionContext.getActionContext().getPrincipal().getId(), request.getGroupId(),
                                request.getPersonId())));

        return null;
    }
View Full Code Here

            if (deleteRequestForGroupMembershipMapper
                    .execute(new RequestForGroupMembershipRequest(targetId, followerId)))
            {
                // if any requests were present, then user was just approved for access
                asyncRequests.add(new UserActionRequest(CreateNotificationsRequest.ACTION_NAME, null,
                        new GroupMembershipResponseNotificationsRequest(RequestType.REQUEST_GROUP_ACCESS_APPROVED,
                                inActionContext.getActionContext().getPrincipal().getId(), targetId, followerId)));
            }

            // remove person modelview from cache as groupstreamhiddenlineindex will be changed.
            deleteCacheKeyMapper.execute(Collections.singleton(CacheKeys.PERSON_BY_ID + followerId));
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.notification.GroupMembershipResponseNotificationsRequest

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.