Package org.eurekastreams.server.search.modelview

Examples of org.eurekastreams.server.search.modelview.DomainGroupModelView


        testDestinationStream.setId(1L);
        testDestinationStream.setUniqueIdentifier("group1");
        testDestinationStream.setType(EntityType.GROUP);
        testActivity.setDestinationStream(testDestinationStream);

        DomainGroupModelView testGroupModelView = new DomainGroupModelView();
        testGroupModelView.setEntityId(5L);

        final List<DomainGroupModelView> testGroupModelViewList = new ArrayList<DomainGroupModelView>();
        testGroupModelViewList.add(testGroupModelView);

        List<Long> results = sut.execute(testActivity);
View Full Code Here


        String uniqueKey = activity.getDestinationStream().getUniqueIdentifier();

        switch (streamType)
        {
        case GROUP:
            DomainGroupModelView group = bulkDomainGroupsByShortNameMapper
                    .execute(Collections.singletonList(uniqueKey)).get(0);

            getCache().addToTopOfList(CacheKeys.ENTITY_STREAM_BY_SCOPE_ID + group.getStreamId(), activityId);
            break;
        case PERSON:
            PersonModelView person = getPersonModelViewByAccountIdMapper.execute(uniqueKey);

            getCache().addToTopOfList(CacheKeys.ENTITY_STREAM_BY_SCOPE_ID + person.getStreamId(), activityId);
View Full Code Here

                oneOf(originalObject).isPending();
                will(returnValue(false));
            }
        });

        DomainGroupModelView dgmv = sut.transform(originalObject);

        assertEquals("gsn", dgmv.getShortName());
        assertEquals(false, dgmv.isPending());

        context.assertIsSatisfied();
    }
View Full Code Here

            {
                log.info("Loading " + recordCounter + "th domainGroup record, clearing session.");
                getHibernateSession().clear();
            }

            DomainGroupModelView result = (DomainGroupModelView) scroll.get(0);
            getCache().set(CacheKeys.GROUP_BY_ID + result.getEntityId(), result);
            getCache().set(CacheKeys.GROUP_BY_SHORT_NAME + result.getShortName(), result.getEntityId());
        }

        log.info("Completed loading all domain groups in " + (System.currentTimeMillis() - start) + " milliseconds.");
    }
View Full Code Here

        // check the group short name lookup:
        assertEquals(1L, cache.get(CacheKeys.GROUP_BY_SHORT_NAME + "group1"));

        // get the domain group by id
        DomainGroupModelView group = (DomainGroupModelView) cache.get(CacheKeys.GROUP_BY_ID + "1");

        // check the standard properties
        assertEquals(1L, group.getEntityId());
        assertEquals("E Group 1 Name", group.getName());
        assertEquals("group1", group.getShortName());
        assertTrue(group.isPublic());

        // check the followers:
        final long person1 = 98L;
        final long person2 = 99L;
        final long person3 = 42L;
View Full Code Here

                displayModelView.setAccountLocked(person.isAccountLocked());
                displayModelViews.add(displayModelView);
            }
            else if (modelView instanceof DomainGroupModelView)
            {
                DomainGroupModelView group = (DomainGroupModelView) modelView;

                if (log.isTraceEnabled())
                {
                    log.trace("Found domain group '" + group.getShortName() + " with search prefix '" + searchText
                            + "'");
                }

                displayModelView.setDisplayName(group.getName());
                displayModelView.setStreamScopeId(group.getStreamId());
                displayModelView.setType(EntityType.GROUP);
                displayModelView.setUniqueKey(group.getShortName());
                displayModelViews.add(displayModelView);
            }
        }

        return displayModelViews;
View Full Code Here

                            });

                        }
                        else if (result instanceof DomainGroupModelView)
                        {
                            final DomainGroupModelView group = (DomainGroupModelView) result;
                            itemPanel.add(new AvatarLinkPanel(EntityType.GROUP, group.getShortName(), group
                                    .getAvatarId(), Size.VerySmall, false));
                            name.setText(group.getName());
                            name.setTitle(group.getName());
                            itemContainer.addClickHandler(new ClickHandler()
                            {
                                public void onClick(final ClickEvent event)
                                {
                                    StreamBookmarksModel.getInstance().insert(group.getStreamId());
                                }
                            });
                        }

                        itemContainer.addMouseOverHandler(new MouseOverHandler()
View Full Code Here

     * @return DomainGroupModelView created from param DomainGroup.
     */
    @Override
    public DomainGroupModelView transform(final DomainGroup inTransformType)
    {
        DomainGroupModelView result = new DomainGroupModelView();

        result.setShortName(inTransformType.getShortName());
        result.setPending(inTransformType.isPending());

        return result;
    }
View Full Code Here

    {
        final long activityId = 884872L;
        PostCachedActivity sut = new PostCachedActivity(personFollowersMapper, getPersonModelViewByAccountIdMapper);
        sut.setCache(cache);

        final DomainGroupModelView group = new DomainGroupModelView();
        final List<DomainGroupModelView> groups = new ArrayList<DomainGroupModelView>();
        groups.add(group);

        final List<String> orgShortNames = new ArrayList<String>();
        final String orgShortName1 = "abcdefg";
View Full Code Here

        final long activityId = 884872L;
        PostCachedActivity sut = new PostCachedActivity(personFollowersMapper, getPersonModelViewByAccountIdMapper);
        sut.setCache(cache);
        final long sharedResourceScopeId = 3838L;

        final DomainGroupModelView group = new DomainGroupModelView();
        final List<DomainGroupModelView> groups = new ArrayList<DomainGroupModelView>();
        groups.add(group);

        final List<String> orgShortNames = new ArrayList<String>();
        final String orgShortName1 = "abcdefg";
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.search.modelview.DomainGroupModelView

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.