Issue #427 minor fix
Change-Id: I341e046bcde321ae70a2afeb745bedb0078758ca Former-commit-id: 2d544b5c2fb48870173ea9d38b4c7370f6ebe49f
This commit is contained in:
parent
c4afe61f01
commit
fd1f337a92
5 changed files with 13 additions and 30 deletions
|
@ -160,8 +160,9 @@ public class CollaborationDataManager implements IRosterEventSubscriber {
|
|||
usersMap.put(rosterEntry.getUser(), rosterEntry);
|
||||
}
|
||||
|
||||
usersMap.put(connection.getUser(),
|
||||
new RosterEntry(connection.getUser()));
|
||||
RosterEntry me = new RosterEntry(connection.getUser());
|
||||
me.setPresence(connection.getPresence());
|
||||
usersMap.put(me.getUser(), me);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
package com.raytheon.uf.viz.collaboration.comm.identity;
|
||||
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.event.IEventPublisher;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID;
|
||||
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
|
@ -75,7 +75,7 @@ public interface ISession extends IEventPublisher {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
public IQualifiedID getUserID();
|
||||
public UserId getUserID();
|
||||
|
||||
/**
|
||||
* Gets the connection status of the session.
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.eclipse.ecf.presence.IPresenceContainerAdapter;
|
|||
import com.google.common.eventbus.EventBus;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.ISession;
|
||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID;
|
||||
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
|
@ -69,7 +69,7 @@ public abstract class BaseSession implements ISession {
|
|||
private Namespace connectionNamespace = null;
|
||||
|
||||
// The session manager that created this session.
|
||||
private CollaborationConnection sessionManager;
|
||||
private CollaborationConnection connection;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -97,7 +97,7 @@ public abstract class BaseSession implements ISession {
|
|||
managerEventBus = externalBus;
|
||||
eventBus = new EventBus();
|
||||
connectionContainer = container;
|
||||
sessionManager = manager;
|
||||
connection = manager;
|
||||
eventSubscribers = new HashMap<Object, Object>();
|
||||
setup();
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ public abstract class BaseSession implements ISession {
|
|||
* @throws CollaborationException
|
||||
*/
|
||||
PeerToPeerChat getP2PSession() throws CollaborationException {
|
||||
return (PeerToPeerChat) sessionManager.getPeerToPeerSession();
|
||||
return (PeerToPeerChat) connection.getPeerToPeerSession();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -162,7 +162,7 @@ public abstract class BaseSession implements ISession {
|
|||
* @return
|
||||
*/
|
||||
CollaborationConnection getSessionManager() {
|
||||
return sessionManager;
|
||||
return connection;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -186,8 +186,8 @@ public abstract class BaseSession implements ISession {
|
|||
* @see com.raytheon.uf.viz.collaboration.comm.identity.ISession#getUserID()
|
||||
*/
|
||||
@Override
|
||||
public IQualifiedID getUserID() {
|
||||
return null;
|
||||
public UserId getUserID() {
|
||||
return connection.getUser();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -213,7 +213,7 @@ public abstract class BaseSession implements ISession {
|
|||
// for(Object o : eventSubscribers.values()) {
|
||||
// managerEventBus.unregister(o);
|
||||
// }
|
||||
sessionManager.removeSession(this);
|
||||
connection.removeSession(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -399,7 +399,6 @@ public class CollaborationConnection implements IEventPublisher {
|
|||
if (session != null) {
|
||||
session.joinVenue(venueName);
|
||||
|
||||
session.setUserId(account);
|
||||
if (invitation.getInvite() instanceof SharedDisplayVenueInvite) {
|
||||
SharedDisplayVenueInvite invite = (SharedDisplayVenueInvite) invitation
|
||||
.getInvite();
|
||||
|
@ -431,7 +430,6 @@ public class CollaborationConnection implements IEventPublisher {
|
|||
session.createVenue(venueName, subject);
|
||||
session.setCurrentSessionLeader(account);
|
||||
session.setCurrentDataProvider(account);
|
||||
session.setUserId(account);
|
||||
|
||||
sessions.put(session.getSessionId(), session);
|
||||
return session;
|
||||
|
|
|
@ -115,8 +115,6 @@ public class VenueSession extends BaseSession implements IVenueSession {
|
|||
|
||||
private IChatRoomParticipantListener participantListener = null;
|
||||
|
||||
private IQualifiedID userID = null;
|
||||
|
||||
private String subject;
|
||||
|
||||
/**
|
||||
|
@ -140,16 +138,6 @@ public class VenueSession extends BaseSession implements IVenueSession {
|
|||
super(container, externalBus, manager);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the identification of the owner of this session.
|
||||
*
|
||||
* @see com.raytheon.uf.viz.collaboration.comm.identity.ISession#getUserID()
|
||||
*/
|
||||
@Override
|
||||
public IQualifiedID getUserID() {
|
||||
return userID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close this session. Closing clears all listeners and disposes of the
|
||||
* container. No errors for attempting to close an already closed session.
|
||||
|
@ -301,10 +289,6 @@ public class VenueSession extends BaseSession implements IVenueSession {
|
|||
}
|
||||
}
|
||||
|
||||
protected void setUserId(UserId id) {
|
||||
this.userID = id;
|
||||
}
|
||||
|
||||
protected void joinVenue(String venueName) throws CollaborationException {
|
||||
try {
|
||||
// Create chat room container from manager
|
||||
|
|
Loading…
Add table
Reference in a new issue