Examples of StreamEntityDTO


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

     */
    @Test
    public void execute()
    {
        final ArrayList<StreamEntityDTO> entities = new ArrayList<StreamEntityDTO>();
        StreamEntityDTO person = new StreamEntityDTO();
        person.setType(EntityType.PERSON);
        person.setUniqueIdentifier("person1");
        entities.add(person);

        StreamEntityDTO group = new StreamEntityDTO();
        group.setType(EntityType.GROUP);
        group.setUniqueIdentifier("group1");
        entities.add(group);

        context.checking(new Expectations()
        {
            {
View Full Code Here

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

     * Test validation if the original actor is supplied.
     */
    @Test
    public void testFullOriginalActorValidate()
    {
        testActorEntityDTO = new StreamEntityDTO();
        testActorEntityDTO.setUniqueIdentifier(UNIQUE_ID);

        testActivity = new ActivityDTO();
        testActivity.setVerb(ActivityVerb.POST);
        testActivity.setOriginalActor(testActorEntityDTO);
View Full Code Here

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

     * Test the validation if the original actor is there with a null unique id.
     */
    @Test
    public void testPartialOriginalActorValidate()
    {
        testActorEntityDTO = new StreamEntityDTO();
        testActorEntityDTO.setUniqueIdentifier(null);

        testActivity = new ActivityDTO();
        testActivity.setVerb(ActivityVerb.POST);
        testActivity.setOriginalActor(testActorEntityDTO);
View Full Code Here

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

     * Test the validation if the original actor is there with an empty string unique id.
     */
    @Test
    public void testMissingUniqueIdOriginalActorValidate()
    {
        testActorEntityDTO = new StreamEntityDTO();
        testActorEntityDTO.setUniqueIdentifier("");

        testActivity = new ActivityDTO();
        testActivity.setVerb(ActivityVerb.POST);
        testActivity.setOriginalActor(testActorEntityDTO);
View Full Code Here

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

     * Tests filtering.
     */
    @Test
    public void testFilter()
    {
        final StreamEntityDTO e1 = context.mock(StreamEntityDTO.class, "e1");
        final StreamEntityDTO e2 = context.mock(StreamEntityDTO.class, "e2");
        final StreamEntityDTO e3 = context.mock(StreamEntityDTO.class, "e3");
        final StreamEntityDTO e1o = context.mock(StreamEntityDTO.class, "e1o");
        final StreamEntityDTO e3o = context.mock(StreamEntityDTO.class, "e3o");
        final ActivityDTO a1 = context.mock(ActivityDTO.class, "a1");
        final ActivityDTO a2 = context.mock(ActivityDTO.class, "a2");
        final ActivityDTO a3 = context.mock(ActivityDTO.class, "a3");
        final PersonModelView p7 = context.mock(PersonModelView.class, "p7");
        final PersonModelView p8 = context.mock(PersonModelView.class, "p8");
View Full Code Here

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

     * Test the translator.
     */
    @Test
    public void testTranslate()
    {
        final StreamEntityDTO actor = new StreamEntityDTO();
        actor.setId(AUTHOR_ID);

        final ActivityDTO activity = new ActivityDTO();
        activity.setActor(actor);

        context.checking(new Expectations()
View Full Code Here

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

     * Test the translator.
     */
    @Test
    public void testTranslateActorIsPostAuthor()
    {
        final StreamEntityDTO actor = new StreamEntityDTO();
        actor.setId(AUTHOR_ID);

        final ActivityDTO activity = new ActivityDTO();
        activity.setActor(actor);

        context.checking(new Expectations()
View Full Code Here

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

    public CommentPanel(final CommentDTO comment, final boolean truncate)
    {
        final FlowPanel commentContainer = new FlowPanel();
        commentContainer.addStyleName(StaticResourceBundle.INSTANCE.coreCss().messageComment());

        StreamEntityDTO author = new StreamEntityDTO(EntityType.PERSON, comment.getAuthorAccountId());
        author.setAvatarId(comment.getAuthorAvatarId());
        author.setActive(comment.isAuthorActive());
        author.setDisplayName(comment.getAuthorDisplayName());

        commentContainer.add(AvatarLinkPanel.create(author, Size.VerySmall));

        FlowPanel body = new FlowPanel();
        body.addStyleName(StaticResourceBundle.INSTANCE.coreCss().body());
View Full Code Here

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

                JSONArray recipientArray = json.get(getSelected()).isArray();
                for (int i = 0; i < recipientArray.size(); i++)
                {
                    JSONObject recipient = (JSONObject) recipientArray.get(i);
                    StreamEntityDTO entity = new StreamEntityDTO();
                    entity.setType(EntityType.valueOf(recipient.get(StreamJsonRequestFactory.ENTITY_TYPE_KEY)
                            .isString().stringValue()));
                    entity.setUniqueIdentifier(recipient.get(StreamJsonRequestFactory.ENTITY_UNIQUE_ID_KEY).isString()
                            .stringValue());
                    entities.add(entity);
                }
                BulkEntityModel.getInstance().fetch(entities, false);
            }
View Full Code Here

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

        if (activityContent == null)
        {
            return null;
        }

        StreamEntityDTO actor = activity.getOriginalActor() != null ? activity.getOriginalActor() : activity
                .getActor();
        final String actorDisplayName = actor != null ? actor.getDisplayName() : "";
        activityContent = activityContent.replace("%EUREKA:ACTORNAME%", actorDisplayName);

        ComplexPanel widget = new FlowPanel();
        widget.addStyleName(StaticResourceBundle.INSTANCE.coreCss().messageBody());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.