Examples of DomainGroupModelView


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

        final List<Long> activityIds = new ArrayList<Long>();
        activityIds.add(ORIGINAL_ACTIVITY_ID);

        // set up private test group
        final DomainGroupModelView testGroup = new DomainGroupModelView();
        testGroup.setIsPublic(false);

        destinationStream.setUniqueIdentifier("testGroup");
        destinationStream.setType(EntityType.GROUP);

        // one result of private group
View Full Code Here

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

        final List<Long> activityIds = new ArrayList<Long>();
        activityIds.add(ORIGINAL_ACTIVITY_ID);

        // set up private test group
        final DomainGroupModelView testGroup = null;

        destinationStream.setUniqueIdentifier("testGroup");
        destinationStream.setType(EntityType.GROUP);

        // one result of private group
View Full Code Here

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

        final List<String> groupIds = new ArrayList<String>();
        groupIds.add("testGroup");

        // set up private test group
        final DomainGroupModelView testGroup = new DomainGroupModelView();
        testGroup.setIsPublic(true);

        destinationStream.setUniqueIdentifier("testGroup");
        destinationStream.setType(EntityType.GROUP);

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

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

    public void testTranslate()
    {
        final long groupId = 50L;
        NotificationTranslator<TargetEntityNotificationsRequest> sut = new PendingGroupApprovedTranslator(groupMapper,
                groupCoordinatorMapper);
        final DomainGroupModelView group = context.mock(DomainGroupModelView.class);

        context.checking(new Expectations()
        {
            {
                allowing(groupMapper).execute(groupId);
View Full Code Here

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

                            });

                        }
                        else if (result instanceof DomainGroupModelView)
                        {
                            final DomainGroupModelView group = (DomainGroupModelView) result;
                            itemPanel.add(new AvatarLinkPanel(EntityType.GROUP, group.getShortName(), group
                                    .getAvatarId(), Size.Small, false));
                            name.setText(group.getName());
                            name.setTitle(group.getName());
                            historyToken = Session.getInstance().generateUrl(
                                    new CreateUrlRequest(Page.GROUPS, group.getShortName()));

                            itemContainer.addClickHandler(new ClickHandler()
                            {
                                public void onClick(final ClickEvent event)
                                {
                                    ArrayList<String> views = new ArrayList<String>();
                                    views.add(group.getShortName());
                                    eventBus.notifyObservers(new UpdateHistoryEvent(new CreateUrlRequest(Page.GROUPS,
                                            views)));
                                }
                            });
                        }
View Full Code Here

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

    public void testValidate()
    {
        SetFollowingStatusRequest request = new SetFollowingStatusRequest("ntaccount", "groupshortname",
                EntityType.GROUP, false, Follower.FollowerStatus.FOLLOWING);

        final DomainGroupModelView testTarget = new DomainGroupModelView();
        testTarget.setEntityId(2L);

        context.checking(new Expectations()
        {
            {
                oneOf(domainGroupMapperMock).fetchUniqueResult(with(any(String.class)));
View Full Code Here

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

        people.add(new PersonModelView(5L, "e", "foo", "bar", null, "", 300, new Date(), 5L)); // 9
        people.add(new PersonModelView(6L, "f", "foo", "bar", null, "", 200, new Date(), 6L));
        people.add(new PersonModelView(7L, "g", "foo", "bar", null, "", 700, new Date(), 7L)); // 7
        people.get(4).setAccountLocked(true);

        groups.add(new DomainGroupModelView(8L, "h", "foobar", 50L, new Date(), 8L));
        groups.add(new DomainGroupModelView(9L, "i", "foobar", 250L, new Date(), 9L)); // 10
        groups.add(new DomainGroupModelView(10L, "j", "foobar", 200L, new Date(), 10L));
        groups.add(new DomainGroupModelView(11L, "k", "foobar", 300L, new Date(), 11L)); // 8
        groups.add(new DomainGroupModelView(12L, "l", "foobar", 700L, new Date(), 12L)); // 6
        groups.add(new DomainGroupModelView(13L, "m", "foobar", 900L, new Date(), 13L)); // 2
        groups.add(new DomainGroupModelView(14L, "n", "foobar", 800L, new Date(), 14L)); // 4
        groups.add(new DomainGroupModelView(15L, "o", "foobar", 950L, new Date(), 15L)); // 1

        // displayInfoSettables.addAll(result.getFeaturedStreams());
        // displayInfoSettables.addAll(result.getMostFollowedStreams());
        // displayInfoSettables.addAll(result.getMostRecentStreams());
        // displayInfoSettables.addAll(result.getMostViewedStreams());
View Full Code Here

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

                will(returnValue(TARGET_GROUP));

                oneOf(getCurrentUserFollowingStatusRequest).getEntityType();
                will(returnValue(EntityType.GROUP));

                DomainGroupModelView target = new DomainGroupModelView();
                target.setEntityId(TARGET_GROUP_ID);
                oneOf(getDomainGroupsByShortNames).execute(with(any(List.class)));
                will(returnValue(Collections.singletonList(target)));

                oneOf(getGroupFollowerIds).execute(TARGET_GROUP_ID);
                will(returnValue(Collections.singletonList(CURRENT_USER_ID)));
View Full Code Here

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

        eventBus.addObserver(InsertedGroupResponseEvent.class, new Observer<InsertedGroupResponseEvent>()
        {
            public void update(final InsertedGroupResponseEvent ev)
            {
                DomainGroupModelView group = ev.getResponse();

                // destination depends on whether org allows immediate creation of groups
                CreateUrlRequest urlRqst = !group.isPending() ? new CreateUrlRequest(Page.GROUPS, group.getShortName())
                        : new CreateUrlRequest(Page.DISCOVER, "");
                eventBus.notifyObservers(new UpdateHistoryEvent(urlRqst));

                // tell the user what just happened
                eventBus.notifyObservers(new ShowNotificationEvent(new Notification(group.isPending() ? // \n
                "Your group has been submitted to an organization coordinator for approval"
                        : "Your group has been successfully created")));
            }
        });
View Full Code Here

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

        notif5.setNotificationType(NotificationType.COMMENT_TO_COMMENTED_POST);

        final PersonModelView person = new PersonModelView();
        person.setAccountId("knownperson");
        person.setAvatarId("avatar1");
        final DomainGroupModelView group = new DomainGroupModelView();
        group.setShortName("knowngroup");
        group.setAvatarId("avatar2");
        final DomainGroupModelView group2 = new DomainGroupModelView();
        group2.setShortName("avatarlessgroup");
        group2.setAvatarId(null);

        context.checking(new Expectations()
        {
            {
                oneOf(alertMapper).execute(USER_ID);
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.