Examples of PersonModelView


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

                        name.addStyleName(StaticResourceBundle.INSTANCE.coreCss().globalSearchItemName());
                        name.addStyleName(StaticResourceBundle.INSTANCE.coreCss().ellipsisChild());

                        if (result instanceof PersonModelView)
                        {
                            final PersonModelView person = (PersonModelView) result;
                            itemPanel.add(AvatarLinkPanel.create(person, Size.Small, false));
                            name.setText(person.getDisplayName());
                            name.setTitle(person.getDisplayName());
                            historyToken = Session.getInstance().generateUrl(
                                    new CreateUrlRequest(Page.PEOPLE, person.getAccountId()));

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

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

                ListBox results = view.getResults();
                results.clear();

                for (int i = 0; i < count; i++)
                {
                    PersonModelView person = people.get(i);
                    results.addItem(person.getLastName() + ", " + person.getPreferredName(), person.getAccountId());
                }

                if (count == 1)
                {
                    results.setItemSelected(0, true);
View Full Code Here

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

     * Test objectToString with an invalid input type.
     */
    @Test(expected = RuntimeException.class)
    public void testObjectToStringForInvalidType()
    {
        sut.objectToString(new PersonModelView());
    }
View Full Code Here

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

     */
    @Test
    public final void performActionTest() throws Exception
    {
        final String request = "{ }";
        final PersonModelView personModel = new PersonModelView();

        context.checking(new Expectations()
        {
            {
                ActivityDTO dto = new ActivityDTO();
View Full Code Here

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

     */
    @Test
    public final void performActionDateSortWithKeywordTest() throws Exception
    {
        final String request = "{ query : { sortBy:\"date\", keywords:\"test\"} }";
        final PersonModelView personModel = new PersonModelView();

        context.checking(new Expectations()
        {
            {
                ActivityDTO dto = new ActivityDTO();
View Full Code Here

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

     */
    @Test
    public final void performActionWithCount() throws Exception
    {
        final String request = "{ count:1 }";
        final PersonModelView personModel = new PersonModelView();

        context.checking(new Expectations()
        {
            {
                ActivityDTO dto = new ActivityDTO();
View Full Code Here

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

    @Test
    public void testSetToList() throws MessagingException
    {
        final String to1 = "recipient1@email.com";
        final String to2 = "recipient2@email.com";
        PersonModelView person1 = new PersonModelView()
        {
            {
                setEmail(to1);
            }
        };
        PersonModelView person2 = new PersonModelView()
        {
            {
                setEmail(to2);
            }
        };
View Full Code Here

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

     * Tests execute.
     */
    @Test
    public void testExecuteWithState()
    {
        final PersonModelView recipient = context.mock(PersonModelView.class);

        context.checking(new Expectations()
        {
            {
                allowing(recipient).getId();
View Full Code Here

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

        final PrincipalActionContext actionContext = context.mock(PrincipalActionContext.class);
        final Principal principal = context.mock(Principal.class);

        final StreamDiscoverListsDTO result = new StreamDiscoverListsDTO();

        people.add(new PersonModelView(1L, "a", "foo", "bar", null, "", 100, new Date(), 1L));
        people.add(new PersonModelView(2L, "b", "foo", "bar", null, "", 900, new Date(), 2L)); // 3
        people.add(new PersonModelView(3L, "c", "foo", "bar", null, "", 200, new Date(), 3L));
        people.add(new PersonModelView(4L, "d", "foo", "bar", null, "", 800, new Date(), 4L)); // 5
        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));
View Full Code Here

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

                will(returnValue(targetUser));

                oneOf(targetUser).getAccountId();
                will(returnValue(TARGET_USER));

                PersonModelView target = new PersonModelView();
                target.setEntityId(TARGET_USER_ID);
                oneOf(getPersonModelViewsByAccountIdsMapper).execute(with(any(List.class)));
                will(returnValue(Collections.singletonList(target)));

                oneOf(getFollowerIds).execute(TARGET_USER_ID);
                will(returnValue(Collections.singletonList(CURRENT_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.