Issue #427 fix non-collaboration sessions
Change-Id: I5f39311d65c16a097692a76e087598d577fe7a4b Former-commit-id:8625a90436
[formerly58633e1f18
] [formerlyb8cec96f21
] [formerly8625a90436
[formerly58633e1f18
] [formerlyb8cec96f21
] [formerlyfa0f61a85e
[formerlyb8cec96f21
[formerly 607ec4474b96f9670c53ba69295fa66a2880ff7e]]]] Former-commit-id:fa0f61a85e
Former-commit-id:347cf62f56
[formerly504f0768f0
] [formerly 4e92eef5bdc3650a2b4727cb75c5997f41d09866 [formerly9f055f8ec9
]] Former-commit-id: 96caf7d2303813696cf66f24913a22ca10bac6b5 [formerly6be9c44303
] Former-commit-id:a21876d150
This commit is contained in:
parent
fff330e866
commit
79d81e92e4
7 changed files with 46 additions and 25 deletions
|
@ -72,6 +72,7 @@ import com.raytheon.uf.viz.collaboration.ui.login.LoginDialog;
|
|||
import com.raytheon.uf.viz.collaboration.ui.role.ParticipantEventController;
|
||||
import com.raytheon.uf.viz.collaboration.ui.session.CollaborationSessionView;
|
||||
import com.raytheon.uf.viz.collaboration.ui.session.PeerToPeerView;
|
||||
import com.raytheon.uf.viz.collaboration.ui.session.SessionView;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
|
||||
/**
|
||||
|
@ -550,7 +551,14 @@ public class CollaborationDataManager implements IRosterEventSubscriber {
|
|||
| SWT.OK | SWT.CANCEL);
|
||||
box.setText("Invitation");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("You are invited to a collaboration.\n");
|
||||
boolean sharedDisplay = invitation.getInvite()
|
||||
.isSharedDisplayVenue();
|
||||
sb.append("You are invited to a ");
|
||||
if (sharedDisplay) {
|
||||
sb.append("collaboration session.\n");
|
||||
} else {
|
||||
sb.append("chat room.\n");
|
||||
}
|
||||
sb.append("Inviter: ").append(inviter.getName()).append("\n");
|
||||
sb.append("Room: ").append(room.getName()).append("\n");
|
||||
sb.append("Subject: ").append(invitation.getSubject());
|
||||
|
@ -568,17 +576,26 @@ public class CollaborationDataManager implements IRosterEventSubscriber {
|
|||
.joinCollaborationVenue(invitation);
|
||||
String sessionId = session.getSessionId();
|
||||
sessionsMap.put(sessionId, session);
|
||||
ISharedDisplaySession displaySession = session
|
||||
.spawnSharedDisplaySession();
|
||||
SharedDisplaySessionMgr.joinSession(displaySession,
|
||||
ParticipantRole.PARTICIPANT);
|
||||
if (sharedDisplay) {
|
||||
ISharedDisplaySession displaySession = session
|
||||
.spawnSharedDisplaySession();
|
||||
SharedDisplaySessionMgr.joinSession(displaySession,
|
||||
ParticipantRole.PARTICIPANT);
|
||||
|
||||
PlatformUI
|
||||
.getWorkbench()
|
||||
.getActiveWorkbenchWindow()
|
||||
.getActivePage()
|
||||
.showView(CollaborationSessionView.ID, sessionId,
|
||||
IWorkbenchPage.VIEW_ACTIVATE);
|
||||
PlatformUI
|
||||
.getWorkbench()
|
||||
.getActiveWorkbenchWindow()
|
||||
.getActivePage()
|
||||
.showView(CollaborationSessionView.ID,
|
||||
sessionId, IWorkbenchPage.VIEW_ACTIVATE);
|
||||
} else {
|
||||
PlatformUI
|
||||
.getWorkbench()
|
||||
.getActiveWorkbenchWindow()
|
||||
.getActivePage()
|
||||
.showView(SessionView.ID, sessionId,
|
||||
IWorkbenchPage.VIEW_ACTIVATE);
|
||||
}
|
||||
} catch (CollaborationException e) {
|
||||
// TODO Auto-generated catch block. Please revise as
|
||||
// appropriate.
|
||||
|
|
|
@ -177,7 +177,7 @@ public class CollaborationSessionView extends SessionView {
|
|||
boolean isDataProvider = Tools.parseName(user.getId()).equals(
|
||||
session.getCurrentDataProvider().getName());
|
||||
if (isSessionLeader || isDataProvider) {
|
||||
builder.append("-- Roles --");
|
||||
builder.append("\n-- Roles --");
|
||||
if (isSessionLeader) {
|
||||
builder.append("\nSession Leader");
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.collaboration.comm.identity.event;
|
||||
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.invite.SharedDisplayInvite;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.invite.VenueInvite;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID;
|
||||
|
||||
/**
|
||||
|
@ -58,5 +58,5 @@ public interface IVenueInvitationEvent {
|
|||
*/
|
||||
String getSubject();
|
||||
|
||||
public SharedDisplayInvite getInvite();
|
||||
public VenueInvite getInvite();
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IVenueParticipant;
|
||||
|
||||
/**
|
||||
* An invite message for inviting another user to a ISharedDisplaySession.
|
||||
* An invite message for inviting another user to a venue.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -41,7 +41,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.user.IVenueParticipant;
|
|||
*/
|
||||
|
||||
@DynamicSerialize
|
||||
public class SharedDisplayInvite {
|
||||
public class VenueInvite {
|
||||
|
||||
@DynamicSerializeElement
|
||||
private String subject;
|
||||
|
@ -98,4 +98,8 @@ public class SharedDisplayInvite {
|
|||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
public boolean isSharedDisplayVenue() {
|
||||
return (sessionLeader != null && dataProvider != null);
|
||||
}
|
||||
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
package com.raytheon.uf.viz.collaboration.comm.provider.event;
|
||||
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.event.IVenueInvitationEvent;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.invite.SharedDisplayInvite;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.invite.VenueInvite;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ public class VenueInvitationEvent implements IVenueInvitationEvent {
|
|||
|
||||
private String subject;
|
||||
|
||||
private SharedDisplayInvite invite;
|
||||
private VenueInvite invite;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -58,7 +58,7 @@ public class VenueInvitationEvent implements IVenueInvitationEvent {
|
|||
* @param body
|
||||
*/
|
||||
public VenueInvitationEvent(IQualifiedID venueId, IQualifiedID invitor,
|
||||
String subject, SharedDisplayInvite invite) {
|
||||
String subject, VenueInvite invite) {
|
||||
this.venueId = venueId;
|
||||
this.invitor = invitor;
|
||||
this.subject = subject;
|
||||
|
@ -91,7 +91,7 @@ public class VenueInvitationEvent implements IVenueInvitationEvent {
|
|||
return subject;
|
||||
}
|
||||
|
||||
public SharedDisplayInvite getInvite() {
|
||||
public VenueInvite getInvite() {
|
||||
return invite;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.event.IRosterEventSubscri
|
|||
import com.raytheon.uf.viz.collaboration.comm.identity.event.IVenueInvitationEvent;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.event.RosterChangeType;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.info.IVenueInfo;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.invite.SharedDisplayInvite;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.invite.VenueInvite;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterManager;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IChatID;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID;
|
||||
|
@ -731,9 +731,9 @@ public class SessionManager implements IEventPublisher {
|
|||
IChatID invitor = new RosterId(id.getName(),
|
||||
id.getHost(), id.getResource());
|
||||
|
||||
SharedDisplayInvite received;
|
||||
VenueInvite received;
|
||||
try {
|
||||
received = (SharedDisplayInvite) Tools
|
||||
received = (VenueInvite) Tools
|
||||
.unMarshallData(body);
|
||||
|
||||
if (subject == null) {
|
||||
|
|
|
@ -51,7 +51,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.event.IDisplayEvent;
|
|||
import com.raytheon.uf.viz.collaboration.comm.identity.event.IVenueParticipantEvent;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.event.ParticipantEventType;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.info.IVenue;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.invite.SharedDisplayInvite;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.invite.VenueInvite;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterManager;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IChatID;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID;
|
||||
|
@ -262,7 +262,7 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
|||
IChatRoomInvitationSender sender = getConnectionPresenceAdapter()
|
||||
.getChatRoomManager().getInvitationSender();
|
||||
if (sender != null) {
|
||||
SharedDisplayInvite invite = new SharedDisplayInvite();
|
||||
VenueInvite invite = new VenueInvite();
|
||||
invite.setDataProvider(this.getCurrentDataProvider());
|
||||
invite.setSessionLeader(this.getCurrentSessionLeader());
|
||||
invite.setMessage(body);
|
||||
|
|
Loading…
Add table
Reference in a new issue