Examples of ExitWorkspace


Examples of org.zanata.webtrans.shared.rpc.ExitWorkspace

                log.info(
                        "Publishing ExitWorkspace event for user {} with editorClientId {} from workspace {}",
                        new Object[] { username, editorClientId,
                                workspace.getWorkspaceContext() });
                // Send GWT Event to client to update the userlist
                ExitWorkspace event =
                        new ExitWorkspace(editorClientId, new Person(
                                new PersonId(username), personName,
                                getGravatarService().getUserImageUrl(16,
                                        personEmail)));
                workspace.publish(event);
            }
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ExitWorkspace

                    httpSessionToEditorClientId.get(httpSessionId);
            if (clientIds != null) {
                clientIds.remove(editorClientId);

                // Send GWT Event to clients to update the user list
                ExitWorkspace event =
                        new ExitWorkspace(editorClientId, details.getPerson());
                publish(event);

                log.info(
                        "Removed user {} with editorClientId {} from workspace {}",
                        details.getPerson().getId(), editorClientId,
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ExitWorkspace

        spy.exitWorkspace("admin");

        verify(mockWorkspace).removeEditorClients("sessionId");
        verify(mockWorkspace, times(2)).publish(eventCaptor.capture());

        ExitWorkspace exitWorkspace1 = eventCaptor.getAllValues().get(0);
        assertThat(exitWorkspace1.getEditorClientId(),
                Matchers.equalTo(editorClientIds.get(0)));
        assertThat(exitWorkspace1.getPerson().getName(),
                Matchers.equalTo("patrick"));
        verify(mockWorkspace).publish(exitWorkspace1);

        ExitWorkspace exitWorkspace2 = eventCaptor.getAllValues().get(1);
        assertThat(exitWorkspace2.getEditorClientId(),
                Matchers.equalTo(editorClientIds.get(1)));
        verify(mockWorkspace).publish(exitWorkspace2);
        verify(gravatarServiceImpl, times(2)).getUserImageUrl(16,
                "pahuang@redhat.com");
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ExitWorkspace

        spy.exitWorkspace("admin");

        verify(mockWorkspace).removeEditorClients("sessionId");
        verify(mockWorkspace, times(2)).publish(eventCaptor.capture());

        ExitWorkspace exitWorkspace1 = eventCaptor.getAllValues().get(0);
        assertThat(exitWorkspace1.getEditorClientId(),
                Matchers.equalTo(editorClientIds.get(0)));
        assertThat(exitWorkspace1.getPerson().getName(),
                Matchers.equalTo("<unknown>"));
        verify(mockWorkspace).publish(exitWorkspace1);

        ExitWorkspace exitWorkspace2 = eventCaptor.getAllValues().get(1);
        assertThat(exitWorkspace2.getEditorClientId(),
                Matchers.equalTo(editorClientIds.get(1)));
        verify(mockWorkspace).publish(exitWorkspace2);
        verify(gravatarServiceImpl, times(2)).getUserImageUrl(16, "<unknown>");
    }
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.