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

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


     * Tests performAction with exception.
     */
    @Test
    public void testValidateValid()
    {
        sut.validate(new AsyncActionContext(new CreateNotificationsRequest(RequestType.FOLLOW_PERSON, 0)));
    }
View Full Code Here


     */
    @Test(expected = ValidationException.class)
    public void testValidateWithInvalidTranslatorType()
    {
        // Intentionally left out STREAM_POST from translators to be able to test this.
        sut.validate(new AsyncActionContext(new CreateNotificationsRequest(RequestType.POST_PERSON_STREAM, 0)));
    }
View Full Code Here

            insertLikedActivity.execute(likeActivityData);

            inActionContext.getUserActionRequests().add(
                    new UserActionRequest("loadLikedActivityIdsByUserId", null, userId));

            CreateNotificationsRequest notificationRequest = new ActivityNotificationsRequest(RequestType.LIKE,
                    userId, 0L, request.getActivityId());
            inActionContext.getUserActionRequests().add(
                    new UserActionRequest(CreateNotificationsRequest.ACTION_NAME, null, notificationRequest));
        }
        else
View Full Code Here

        }

        // Setup the queued requests.
        if (requestType != null)
        {
            CreateNotificationsRequest notificationRequest = new ActivityNotificationsRequest(requestType, actorId,
                    destinationId, persistedActivityDTO.getEntityId());
            queueRequests
                    .add(new UserActionRequest(CreateNotificationsRequest.ACTION_NAME, null, notificationRequest));
        }
        // TODO: fix this so activityDTO fields related to specific user
View Full Code Here

     * Validate that the requested type is supported by the translators available.
     */
    @Override
    public void validate(final ActionContext inActionContext) throws ValidationException
    {
        CreateNotificationsRequest currentRequest = (CreateNotificationsRequest) inActionContext.getParams();
        NotificationTranslator translator = translators.get(currentRequest.getType());
        if (translator == null)
        {
            throw new ValidationException("Invalid notification type: " + currentRequest.getType());
        }
    }
View Full Code Here

            return;
        default:
            return;
        }

        CreateNotificationsRequest notificationRequest = new CommentNotificationsRequest(requestType, personId,
                destinationId, activityId, commentId);

        // add request to queued request list
        queuedRequests.add(new UserActionRequest(CreateNotificationsRequest.ACTION_NAME, null, notificationRequest));
    }
View Full Code Here

    @Override
    public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext)
            throws ExecutionException
    {
        CreateNotificationsRequest currentRequest = (CreateNotificationsRequest) inActionContext.getActionContext()
                .getParams();

        log.info("Generating notifications for {}", currentRequest.getType());

        // ---- translate event to notifications ----

        NotificationTranslator translator = translators.get(currentRequest.getType());
        if (translator == null)
        {
            // exit if notification request type is disabled
            return Boolean.FALSE;
        }
View Full Code Here

     *             On notifier failure (shouldn't, since the notifier just queues an action).
     */
    private void notifyCoordinators(final TaskHandlerActionContext<PrincipalActionContext> inActionContext,
            final DomainGroup group, final ReviewPendingGroupRequest request) throws Exception
    {
        CreateNotificationsRequest notifRequest;
        if (request.getApproved())
        {
            notifRequest = new TargetEntityNotificationsRequest(RequestType.REQUEST_NEW_GROUP_APPROVED, 0L,
                    group.getId());
        }
View Full Code Here

TOP

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

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.