Package org.eurekastreams.server.persistence.mappers.requests

Examples of org.eurekastreams.server.persistence.mappers.requests.GetFeedSubscriberRequest


        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)
View Full Code Here


    public void execute()
    {
      // Make sure user 42 has his 4 feeds.
      final long entityId = 42L;
        List<FeedSubscriber> feedSubs = getFeeds.execute(
            new GetFeedSubscriberRequest(0L, entityId, EntityType.PERSON, 0));
        assertEquals(4, feedSubs.size());
       
        // Delete feed 1.
        sut.execute(new FindByIdRequest("FeedSubscriber", 1L));
       
        List<FeedSubscriber> feedSubs2 = getFeeds.execute(
            new GetFeedSubscriberRequest(0L, entityId, EntityType.PERSON, 0));
        // Make sure he has 3 left.
        assertEquals(3, feedSubs2.size());
        // Make sure feed 1 isn't in there.
        assertEquals(2L, feedSubs2.get(0).getId());
        assertEquals(3L, feedSubs2.get(1).getId());
View Full Code Here

     */
    @Test
    public void execute()
    {
      final long entityId = 42L;
        List<FeedSubscriber> feedSubs = sut.execute(new GetFeedSubscriberRequest(0L, entityId, EntityType.PERSON, 0));
        assertEquals(4, feedSubs.size());

        assertEquals(1L, feedSubs.get(0).getId());
        assertEquals(2L, feedSubs.get(1).getId());
        assertEquals(3L, feedSubs.get(2).getId());
View Full Code Here

     */
    @Test
    public void executeWithNoResults()
    {
      final long entityId = 41L;
        List<FeedSubscriber> feedSubs = sut.execute(new GetFeedSubscriberRequest(0L, entityId, EntityType.PERSON, 0));
        assertEquals(0, feedSubs.size());

    }
View Full Code Here

    @Test
    public void testExecuteWithExisting()
    {
      final long id = 42L;

        GetFeedSubscriberRequest request = new GetFeedSubscriberRequest(2L, id, EntityType.PERSON, 0);

        FeedSubscriber feedSub = sut.execute(request);
        // Just make sure it found the right one.
        assertEquals(2L, feedSub.getId());
    }
View Full Code Here

    public void testExecuteWithOutExisting()
    {
      final long id = 42L;
      final long id2 = 142L;

      GetFeedSubscriberRequest request = new GetFeedSubscriberRequest(4L, id, EntityType.PERSON, id2);

        FeedSubscriber feed = sut.execute(request);
        // Make sure the created guy has all the right attributes.
        assertEquals(4L, feed.getFeed().getId());
        assertEquals(id, (long) feed.getEntityId());
View Full Code Here

        Feed feed = getMapper.execute(request);
        feed.setTitle(title);

        // And now find or create the subscriber.
        FeedSubscriber feedSubscriber =
                getFeedSubscriberMapper.execute(new GetFeedSubscriberRequest(feed.getId(), getEntityId
                        .getEntityId(values), type, principal.getId()));

        // Add any non system key/value pairs to the feed subscribers conf settings.
        feedSubscriber.getConfSettings().clear();
View Full Code Here

        values.put("EUREKA:USER", principal.getAccountId());
        values.put("EUREKA:GROUP", (String) context.getParams());

        List<PluginDefinition> plugins = getAllPluginsMapper.execute(new EmptyRequest());
        List<FeedSubscriber> feedSubs =
                getFeedSubsMapper.execute(new GetFeedSubscriberRequest(0L, getEntityId.getEntityId(values), type,
                        principal.getId()));
        for (FeedSubscriber feedSub : feedSubs)
        {
            feedSub.getFeed().getPlugin().getId();
            if (feedSub.getFeed().getLastUpdated() == null)
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.persistence.mappers.requests.GetFeedSubscriberRequest

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.