Package org.eurekastreams.server.domain.stream

Examples of org.eurekastreams.server.domain.stream.StreamEntityDTO


        // if a user clicks on a hashtag on the single activity view then search for the hashtag in the stream the
        // activity was posted to
        if (history.getPage() == Page.ACTIVITY && history.getViews().size() == 1
                && history.getViews().get(0).matches("\\d+"))
        {
            StreamEntityDTO destinationStream = activity.getDestinationStream();
            Page destinationPage = destinationStream.getEntityType() == EntityType.PERSON ? Page.PEOPLE : Page.GROUPS;
            String destinationView = destinationStream.getUniqueId();
            return "#"
                    + Session.getInstance()
                            .generateUrl(new CreateUrlRequest(destinationPage, destinationView, params));
        }
        // otherwise, search for hashtags in whatever stream the user is currently viewing
View Full Code Here


        boolean manageFlagged = "true".equals(Session.getInstance().getParameterValue("manageFlagged"));
        boolean showComment = "true".equals(Session.getInstance().getParameterValue("showComment"));
        addStyleName(StaticResourceBundle.INSTANCE.coreCss().singleActivityPanel());

        // build link to show all activity in the destination stream
        StreamEntityDTO destinationStream = activity.getDestinationStream();
        EntityType entityType = destinationStream.getEntityType();
        String title = null;
        Page page = null;
        switch (entityType)
        {
        case PERSON:
            page = Page.PEOPLE;
            title = "Show all activity in " + destinationStream.getDisplayName() + "'s stream";
            break;
        case GROUP:
            page = Page.GROUPS;
            title = "Show all activity in the " + destinationStream.getDisplayName() + " stream";
            break;
        default:
            page = null; // make checkstyle shut up
        }
        if (page != null)
        {
            FlowPanel showAllPanel = new FlowPanel();
            showAllPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().singleActivityShowAll());
            showAllPanel.add(new Hyperlink(title, Session.getInstance().generateUrl(
                    new CreateUrlRequest(page, destinationStream.getUniqueId()))));
            add(showAllPanel);
        }

        StreamMessageItemRenderer renderer = new StreamMessageItemRenderer(showRecipient);
        renderer.setShowComment(showComment);
View Full Code Here

        sut = new StreamResource(action, serviceActionController, principalDao, streamMapper,
                new RestletQueryRequestParser(globalWords, multipleEntityWords, otherWords));

        ActivityDTO activity = new ActivityDTO();
        StreamEntityDTO actor = new StreamEntityDTO();
        actor.setAvatarId("actorAvatarId");
        actor.setDisplayName("actorDisplayName");
        actor.setUniqueIdentifier("actorUniqueId");
        actor.setType(EntityType.PERSON);

        StreamEntityDTO origActor = new StreamEntityDTO();
        origActor.setAvatarId("origActorAvatarId");
        origActor.setDisplayName("origActorDisplayName");
        origActor.setUniqueIdentifier("origActorUn" + "iqueId");
        origActor.setType(EntityType.PERSON);

        HashMap<String, String> props = new HashMap<String, String>();
        props.put("content", "my content");

        activity.setServerDateTime(new Date());
View Full Code Here

        user.setOpenSocialId(ACTIVITYID_ONE);

        HashMap<String, String> testBaseObjectProperties = new HashMap<String, String>();
        testBaseObjectProperties.put("Context", "Test");

        StreamEntityDTO testDestinationStream = new StreamEntityDTO();
        testDestinationStream.setDisplayName("test");

        StreamEntityDTO testActor = new StreamEntityDTO();
        testActor.setUniqueIdentifier("testaccount");

        ActivityDTO authorActivity = new ActivityDTO();
        authorActivity.setBaseObjectType(BaseObjectType.NOTE);
        authorActivity.setBaseObjectProperties(testBaseObjectProperties);
        authorActivity.setActor(testActor);
View Full Code Here

        sut = new StreamXMLResource(action, serviceActionController, principalPopulator, streamMapper,
                new RestletQueryRequestParser(globalWords, multipleEntityWords, otherWords), "");

        ActivityDTO activity = new ActivityDTO();
        StreamEntityDTO actor = new StreamEntityDTO();
        actor.setAvatarId("actorAvatarId");
        actor.setDisplayName("actorDisplayName");
        actor.setUniqueIdentifier("actorUniqueId");
        actor.setType(EntityType.PERSON);

        StreamEntityDTO origActor = new StreamEntityDTO();
        origActor.setAvatarId("origActorAvatarId");
        origActor.setDisplayName("origActorDisplayName");
        origActor.setUniqueIdentifier("origActorUn" + "iqueId");
        origActor.setType(EntityType.PERSON);

        HashMap<String, String> props = new HashMap<String, String>();
        props.put("content", "my content");

        activity.setServerDateTime(new Date());
View Full Code Here

    public void testGetFollowersUnsupportedDestinationStream()
    {
        ActivityDTO testActivity = new ActivityDTO();
        testActivity.setId(1L);

        StreamEntityDTO testDestinationStream = new StreamEntityDTO();
        testDestinationStream.setId(1L);
        testDestinationStream.setUniqueIdentifier("group1");
        testDestinationStream.setType(EntityType.NOTSET);
        testActivity.setDestinationStream(testDestinationStream);

        sut.execute(testActivity);
    }
View Full Code Here

    {
        final String existingDisplayName = "abcdefg";
        final String newDisplayName = existingDisplayName;

        ActivityDTO activity = new ActivityDTO();
        StreamEntityDTO destinationStream = new StreamEntityDTO();
        destinationStream.setDisplayName(existingDisplayName);

        activity.setDestinationStream(destinationStream);

        sut.updateCachedEntity(activity, newDisplayName);

        assertFalse(sut.updateCachedEntity(activity, newDisplayName));
        assertEquals(newDisplayName, destinationStream.getDisplayName());
    }
View Full Code Here

    {
        final String existingDisplayName = "abcdefg";
        final String newDisplayName = "ABCDEFG";

        ActivityDTO activity = new ActivityDTO();
        StreamEntityDTO destinationStream = new StreamEntityDTO();
        destinationStream.setDisplayName(existingDisplayName);

        activity.setDestinationStream(destinationStream);

        assertTrue(sut.updateCachedEntity(activity, newDisplayName));
        assertEquals(newDisplayName, destinationStream.getDisplayName());
    }
View Full Code Here

    {
        final long activityId = 98765L;
        final long scopeId = 878;

        ActivityDTO activity = new ActivityDTO();
        StreamEntityDTO destinationStream = new StreamEntityDTO();
        destinationStream.setType(EntityType.GROUP);
        destinationStream.setUniqueIdentifier("group5");
        activity.setDestinationStream(destinationStream);
        activity.setId(activityId);

        final String cacheKey = CacheKeys.ENTITY_STREAM_BY_SCOPE_ID + scopeId;
View Full Code Here

    {
        final long activityId = 98766L;
        final long scopeId = 4;

        ActivityDTO activity = new ActivityDTO();
        StreamEntityDTO destinationStream = new StreamEntityDTO();
        destinationStream.setType(EntityType.PERSON);
        destinationStream.setUniqueIdentifier("mrburns");
        activity.setDestinationStream(destinationStream);
        activity.setId(activityId);

        final String cacheKey = CacheKeys.ENTITY_STREAM_BY_SCOPE_ID + scopeId;
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.stream.StreamEntityDTO

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.