Package org.eurekastreams.server.action.request.feed

Examples of org.eurekastreams.server.action.request.feed.DeleteFeedSubscriptionRequest


     * @param inActionContext
     *            context for the strategy
     */
    public void authorize(final PrincipalActionContext inActionContext)
    {
        DeleteFeedSubscriptionRequest request = (DeleteFeedSubscriptionRequest) inActionContext.getParams();
        Serializable[] paramsForAuthorizor = new Serializable[1];
        paramsForAuthorizor[0] = request.getEntityId();

        HashMap<String, Serializable> values = new HashMap<String, Serializable>();
        Principal principal = inActionContext.getPrincipal();
        values.put("EUREKA:USER", principal.getAccountId());
        values.put("EUREKA:GROUP", request.getEntityId());

        List<FeedSubscriber> feedSubs =
                getFeedSubsMapper.execute(new GetFeedSubscriberRequest(0L, getEntityId.getEntityId(values), type,
                        principal.getId()));

        boolean found = false;

        for (FeedSubscriber feedSub : feedSubs)
        {
            if (feedSub.getId() == request.getFeedSubscriberId())
            {
                found = true;
                break;
            }
        }
View Full Code Here


                        public void onClick(final ClickEvent arg0)
                        {
                            if (jSNIFacade.confirm("Are you sure you want to unsubscribe to this feed?"))
                            {
                                ((Deletable<DeleteFeedSubscriptionRequest>) model)
                                        .delete(new DeleteFeedSubscriptionRequest(feedSubscription.getId(), Session
                                                .getInstance().getUrlViews().get(
                                                        Session.getInstance().getUrlViews().size() - 1)));

                            }
                        }
View Full Code Here

        }
        Principal principal = context.getActionContext().getPrincipal();
        if (values.containsKey("EUREKA:FEEDSUBID"))
        {
            ServiceActionContext deleteAC =
                    new ServiceActionContext(new DeleteFeedSubscriptionRequest((Long) values.get("EUREKA:FEEDSUBID"),
                            group), principal);
            deleteFeedSub.getExecutionStrategy().execute(deleteAC);
        }

        // Put the user in the values hash map so it's on equal footing for the strategies.
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public Boolean execute(final ActionContext inActionContext) throws ExecutionException
    {
        DeleteFeedSubscriptionRequest request = (DeleteFeedSubscriptionRequest) inActionContext.getParams();
        return deleteMapper.execute(request.getFeedSubscriberId());
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.feed.DeleteFeedSubscriptionRequest

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.