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

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


                    .add(new UserActionRequest(CreateNotificationsRequest.ACTION_NAME, null, notificationRequest));
        }
        // TODO: fix this so activityDTO fields related to specific user
        // are not saved in cache.

        queueRequests.add(new UserActionRequest("postActivityAsyncAction", null, new PostActivityRequest(
                persistedActivityDTO)));

        inActionContext.getUserActionRequests().addAll(queueRequests);

        PersonModelView person = getPersonModelViewByAccountIdMapper.execute(actorAccountName);
View Full Code Here


    @Override
    public void validate(final ServiceActionContext inActionContext)
    {
        ValidationException valEx = new ValidationException();

        PostActivityRequest currentRequest = (PostActivityRequest) inActionContext.getParams();

        ActivityDTO currentActivity = currentRequest.getActivityDTO();

        // All activities must have a destination stream.
        if (currentActivity.getDestinationStream() == null
                || currentActivity.getDestinationStream().getUniqueIdentifier() == null
                || currentActivity.getDestinationStream().getUniqueIdentifier().length() <= 0)
View Full Code Here

            }

            currentActivity.setVerb(ActivityVerb.POST);
            currentActivity.setDestinationStream(destStream);

            PostActivityRequest params = new PostActivityRequest(currentActivity);
            ServiceActionContext currentContext = new ServiceActionContext(params, currentUserPrincipal);
            // Make the call to the action to perform the create.
            serviceActionController.execute(currentContext, postActivityAction);
        }
        catch (Exception e)
View Full Code Here

                    ActivityDTO activity = activityPopulator.getActivityDTO(postBox.getText(),
                            DomainConversionUtility.convertToEntityType(currentStream.getScopeType()),
                            currentStream.getUniqueKey(), new PostPopulator(), objectStrat);

                    PostActivityRequest postRequest = new PostActivityRequest(activity);

                    ActivityModel.getInstance().insert(postRequest);

                    postButton.addStyleName(style.postButtonInactive());
                }
View Full Code Here

                BookmarkPopulator objectStrat = new BookmarkPopulator();
                objectStrat.setLinkInformation(link);
                ActivityDTO activity = activityPopulator.getActivityDTO(messageText, recipientType,
                        scope.getUniqueKey(), new PostPopulator(), objectStrat);
                PostActivityRequest postRequest = new PostActivityRequest(activity);

                ActivityModel.getInstance().insert(postRequest);
            }
        });
View Full Code Here

                        else
                        {
                            recipientType = EntityType.GROUP;
                        }

                        PostActivityRequest postRequest = new PostActivityRequest(new ActivityDTOPopulator()
                                .getActivityDTO("", recipientType, scope.getUniqueKey(), new SharePopulator(
                                        sharedMessage, commentBox.getText()), null));

                        processor.makeRequest(actionKeys.get(recipientType), postRequest,
                                new AsyncCallback<ActivityDTO>()
View Full Code Here

        }

        ActivityDTOPopulatorStrategy objectStrat = attachment != null ? attachment.getPopulator() : new NotePopulator();
        ActivityDTO activity = activityPopulator.getActivityDTO(messageText, recipientType, scope.getUniqueKey(),
                new PostPopulator(), objectStrat);
        PostActivityRequest postRequest = new PostActivityRequest(activity);

        ActivityModel.getInstance().insert(postRequest);
    }
View Full Code Here

            props.put("resourceUrl", resourceUrl);
            props.put("resourceTitle", resourceTitle);
            props.put("siteUrl", siteUrl);
            props.put("siteTitle", siteTitle);

            PostActivityRequest postRequest = new PostActivityRequest(activity);
            ActivityModel.getInstance().insert(postRequest);
        }
View Full Code Here

     * Check the DestinationStream type and perform the appropriate authorization strategy. {@inheritDoc}.
     */
    public void authorize(final ServiceActionContext inActionContext)
    {
        Principal currentPrincipal = inActionContext.getPrincipal();
        PostActivityRequest currentRequest = (PostActivityRequest) inActionContext.getParams();

        switch (currentRequest.getActivityDTO().getDestinationStream().getType())
        {
        case PERSON:
            if (logger.isTraceEnabled())
            {
                logger.trace("Performing authorization to post to a Person based stream: "
                        + currentRequest.getActivityDTO().getDestinationStream().getUniqueIdentifier());
            }
            performPersonAuthorization(currentPrincipal, currentRequest.getActivityDTO());
            break;
        case GROUP:
            if (logger.isTraceEnabled())
            {
                logger.trace("Performing authorization to post to a Group based stream: "
                        + currentRequest.getActivityDTO().getDestinationStream().getUniqueIdentifier());
            }
            performGroupAuthorization(currentPrincipal, currentRequest.getActivityDTO());
            break;
        case RESOURCE:
            // anyone can post to resource stream.
            break;
        default:
View Full Code Here

        activity.setDestinationStream(destination);
        activity.setBaseObjectType(BaseObjectType.NOTE);
        activity.setVerb(ActivityVerb.POST);

        new InlineExecutionStrategyExecutor()
                .execute(postActivityExecutor, new PostActivityRequest(activity), context);

        updateMapper.execute(new PersistenceRequest<Feed>(feed));
        return Boolean.TRUE;
    }
View Full Code Here

TOP

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

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.